Clickable on a theme that contains lines, rather than points in Java API

Hi,
I am working on a Java thick client application using the MapViewer API.
The use case I am trying to implement is to click on a line that has been rendered by MapViewer, and identify the object that this lines represents.
I have been able to implement a click on a point (e.g. defined as MDSYS.SDO_GEOMETRY(2001,null,MDSYS.SDO_POINT_TYPE(3,3,null),null,null).
However, I am having difficulty with a line. I have tried with a line defined as follows:
MDSYS.SDO_GEOMETRY(2002, null, null,
MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(3,3,4,4))
and also using the entry in the INTERSTATES table from the mvdemo sample database:
GEOM: MDSYS.SDO_GEOMETRY(2002,8307,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(-95.368599,29.77528,-95.366074,29.77133,-95.365822,29.771009,-95.365341,29.769661))
HIGHWAY: I 10/I 45
The approach I have taken is to use live features by making a JDBCTheme ("INTERSTATES_THEME") clickable.
The following is the code I used:
MapViewer map = new MapViewer("http://localhost:8888/mapviewer/omserver");
map.setServiceURL("http://localhost:8888/mapviewer/omserver");
map.setDataSourceName("mvdemo");
map.setImageFormat(MapViewer.FORMAT_PNG_URL);
map.addJDBCTheme(config.getDataSourceName(), "INTERSTATES_THEME",
"select HIGHWAY, geom from INTERSTATES where HIGHWAY = 'I 10/I 45'", "geom", "8307",
"L.DPH", null, null, true);
map.setFullExtent();
Then, I make a call to map.run(), map.getGeneratedMapImage() and render the generated image in a JPanel paintComponent method.
This all works fine, and I can see the highway being rendered.
However, if I add
map.setClickable(true, "INTERSTATES_THEME");
before the call to map.setFullExtent();
I get the following stack trace when map.run() is invoked:
java.lang.IllegalStateException: unread block data
     at java.io.ObjectInputStream$BlockDataInputStream.setBlockDataMode(ObjectInputStream.java:2377)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1361)
     at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
     at oracle.lbs.mapcommon.MapResponse.readObject(MapResponse.java:513)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
     at oracle.lbs.mapclient.MapViewer.processRawResponse(MapViewer.java:6706)
     at oracle.lbs.mapclient.MapViewer.run(MapViewer.java:6363)
Does anyone know if it is possible to make lines (rather than points) clickable on a thick client?
Any help is much appreciated.
Thanks.

Hi,
I want to have click event on Point.
I have written following code using Mapviewer API:
String serverUrl = "http://ps3962:7101/mapviewer/omserver";
mapClient = new MapViewer(serverUrl);
mapClient.setDataSourceName("mvdemo");
mapClient.setBaseMapName("demo_map");
mapClient.setCenterAndSize(-122.40, 37.80, 2.5);
mapClient.setDeviceSize(new java.awt.Dimension
(1280,768));
mapClient.setImageFormat(MapViewer.FORMAT_PNG_URL);
I have added point feature to it by mapClient.addPointFeature(cx, cy, 8307, "M.CIRCLE", "Point1",null,null);
After this I did mapClient.run()
and mapClient.getGeneratedImage()
The image returned is null.
I am able to get Image Url only.
And By using that URL if I rendered the image in jsf page, How can I make point feature clickable ?
In your first post You mentioned that you have used MapViewer.FORMAT_PNG_URL and still You are getting generatedImage.
Can you please tell me what can be the problem in my code?
I referred Mapviewer API and it is mentioned that for getting generatedMapImage the format should be FORMAT_RAW_COMPRESSED.
So could you please tell me how can you get Image by using FORMAT_PNG_URL ?
And also how to make point feature clickable ?
Its urgent. Your help will be greatly appreciated .
Thanks

Similar Messages

  • Goods despatched against to future schedule line rather than a current line

    Hi Guys,
    We have a problem with future schedule line in PSA  being ordered in the same time once previous lines is still open ( not yet issued and received).I thought it is related with Delivery creation where in VL10f you can select future line rather than any current lines.Even though when I selected any future entries, goods were despatched against to first open lines on delivery schedule therefore I has nothing in common.
    Have you seen it before and know what could cause that?
    Regards,
    JG

    .

  • Using pixels rather than points to specify the size of a font

    The font constructor takes the size in points as its 3rd parameter like so:
    new Font("Times New Roman", Font.PLAIN, 12);
    Is there any way to use pixels to specify the size instead? The reason I ask is that point specified fonts differ in size from one platform to another (depending on the systems DPI - Windows typically has 96 while the Mac has 72). Obviously if we specify the size in pixels we don't get this problem.
    Thanks in advance!
    -Peter

    Actually, that's the point of using points, to specify character size in a manner fairly independant of the pixel resolution.
    However, what you probably could do is to get a FontRendererContext from the GraphicsContext you propose to use, then get the point-to-pixel transform from that, and use that to transform pixels into points.

  • HT204350 How do I know if the migration assistant is actually working? I got as far as a screen that says it is "Transferring your information" and there is what looks like a progress bar but that has moving blue diagonal lines rather than any progress

    The fan on my target computer is whirring away and so it sounds like something is happening. But there doesnt seem to be any way of telling from either the traget or the source computer if the thing is actually working.  How many hours should I wait before concluding that something has gone wrong?  I have over 100GB of data so I am not expecting it to be fast! 
    Is it normal for the source computer to just drop out of migration asssistant at the begining, or should there be some sort of indication that it is working?  What about if I use activity monitor is there any clues I should be looking for there?

    Hello gatormommy97,
    If that migration happens to still be chugging along, you're in luck. We've got step-by-step instructions for performing an Erase & Install on the new MacBook Pro. This will restore it to 'factory defaults,' just like it came out of the box for the first time, allowing you to start fresh with an alternative migration method.
    OS X Mountain Lion: Erase and reinstall OS X
    http://support.apple.com/kb/PH11273
    Cheers,
    Allen

  • Starting and stopping X + booting into command line rather than GUI

    After installing Arch and struggling a bit to get the gui environment (gnome) to work I am now in a situation where the distro works fine but boots directly into a gnome session.
    I would like to be able to stop X and I have tried various recommended commands. The only one that works seems to be "kill -15 X" (after doing Ctrl+Alt+F2), which ends X but sort of stops mid-process without ever going back to any command line prompt.
    I copied etc/skel/.xinitrc into my home folder and uncommented "exec xterm", while re-commented "exec gnome-session". This did not make any difference at all so perhaps I'm not even using that script?
    As I had some difficulties installing X (or rather get it to work) I may have installed a whole plethora of packages that I may not need. There are references to Wayland for instance, packages I installed. But am I actually using them? How can I find out?
    I would like Arch to boot into a command line environment and then I'd start X from there - if that is what I want!
    Any pointers in any direction regarding the above are welcome!
    Cheers!

    What guide did you follow to install? The beginner's guide and the Xorg page contain the relevant information. Following just them should have allowed you avoid the mess you're in. Just saying that you've installed a whole plethora of packages will not help...it makes it near impossible to help.
    You ought to read this. It sounds like you installed a display manager and set up auto-login?
    Last edited by nullified (2015-02-20 17:26:59)

  • Looking for a zip application that will open rather than extract zip files

    In OS X, the built-in operation for zip files is that when you double-click on one, os x extracts the whole thing to a new folder. I am looking for an application that will open zip files without extracting them - what winzip does in Windows. Are there any apps that will do this in os x?
    Message was edited by: Jon R

    Try Zipeg - VersionTracker or MacUpdate.

  • Opening messages and having them save on desktop rather than mail downloads

    how do I make it so that when I click on an attachment in an email message, it will be downloaded into my desktop and not my mail downloads folder. when I had panther, it always just moved any documents or files I opened on the message directly onto desktop so I could find it and move it into the proper folder quicker. I never even used the save function on the message so the downloads folder on my dock would be obsolete. maybe thats why its there, but honestly it takes more time to do it like that so I prefer to just have the ones I need and want to open moved to the desktop as I open it for the first time.

    I guess my question wasn't specific enough. Im actually talking about when I double click an attachment that is on the email and it opens with the correct application, the attachment then saves itself onto the Mail Downloads folder which is located under the Library folder. I think what you mean is when I press Save for my attachments, that I can change where it goes. Which is not my concern at this time. With the previous OS, I could double click an attachment and it would immediately save to my desktop and not the Mail Downloads folder in the Libary.

  • How can I sort my yahoo passwords in mail so that they work rather than not be found

    In Mail my yahoo account seems unable to find the password. Is there step by step procedure so Mail can find it confirmed without difficulty
    fingers crossed
    Keenlad

    Try this addon:
    *[https://addons.mozilla.org/en-US/android/addon/mobile-password-manager/ Mobile Password Manager]

  • Firefox asks me everytime on JNLP files rather than its set 'Java Web Start'

    See I have classes with a 'Java Web Start' program which every week I download different JNLP files to start the Java program.
    I have set fire fox to use 'Java Web Start Launcher' for JNLP files but every time it ignores my setting and still asks every time. What can I do to make not ask and open the JNLP files?
    This Happened: Firefox does this all the time.
    I have Firefox 5.0 Installed.

    Hi,
    You mention that "I've downloaded "jcert.jar", "jnet.jar" and "jsse.jar" and put them in "..jre/lib/ext" used by JWS in client". Did you manually move these jar files into ..jre/lib/ext or using jnlp extension. I been trying to use jnlp extension (wanted to make it unnoticable to our client) to do this for a while now without luck. Can you tell me how you going about do this?
    thanks.

  • When I restart Firefox, my pinned tabs open to the page that I last viewed rather than the page that I originally pinned. For example, if I pinned to a local ne

    When I restart Firefox, my pinned tabs open to the last webpage that I viewed rather than the page that I originally pinned. For example, if I pinned to a local newspaper's website, navigate to espn while on the pinned tab and then close Firefox, the next time I open Firefox, the pinned tab goes to espn rather than the local newspaper's site.
    Additionally, the same thing happens if I am reading an article on the pinned tab. When reopening Firefox, the pinned tab goes to the last article viewed.

    Hi don.w,
    That is just the way that pinned tabs are designed. They are meant to be left on the page you want them left on e.g. a web mail account.
    If you want to pin a newspaper then I would pin the front page and then open any article you want to read in a new tab.
    Having said that there is an addon called [https://addons.mozilla.org/en-US/firefox/addon/tab-utilities/ Tab-utilities] which contains an option to automatically revert a pinned tab to the original URL.
    I hope that helps.
    --Edward

  • How to customize a List object to contain line items other than String

    I'd like to create a List that contains line items with the following form:
    check box followed by a string followed by a button.
    I'd like the list to be backed by an object array that has a similar form:
    boolean, String, boolean
    which define if the item is checked, it's title, and whether or not to display the button.
    So I'd like to have code something like this:
    // ten items in this lists
    MyList myList = new MyList(10);
    // first item
    MyObject myObject = new MyObject(false, "Item 1", true);
    myList.add(myObject);
    // add the rest of the items...I can't use Swing, I only have AWT available in a J2ME environment.
    Where do I start?
    Can I do this with List?
    I've looked at GridBagLayout but I'm unfamiliar with it. Would a GridBagLayout work?
    Do I need to create a custom control from scratch (based on Panel or ScrollPane, for example) to accomplish this?
    Thanks,
    Nick.

    List only takes Strings. Here's an possibility with GridBagLayout:
    import java.awt.*;
    import java.awt.event.*;
    public class ListTest implements ActionListener
        Object[][] data =
            { Boolean.TRUE,  "John Ericsen",   Boolean.TRUE  },
            { Boolean.FALSE, "Heidi Pall",     Boolean.TRUE  },
            { Boolean.FALSE, "Gregg Fletcher", Boolean.FALSE },
            { Boolean.TRUE,  "Pieter Gaynor",  Boolean.TRUE  },
            { Boolean.TRUE,  "Janice Clarke",  Boolean.TRUE  },
            { Boolean.TRUE,  "May McClatchie", Boolean.FALSE },
            { Boolean.TRUE,  "Bill Horton",    Boolean.TRUE  },
            { Boolean.FALSE, "Helmet Krupp",   Boolean.TRUE  },
            { Boolean.FALSE, "Ian George",     Boolean.TRUE  },
            { Boolean.TRUE,  "Jill Smythe",    Boolean.FALSE }
        public void actionPerformed(ActionEvent e)
            Button button = (Button)e.getSource();
            String ac = button.getActionCommand();
            System.out.println("ac = " + ac);
        private Panel getPanel()
            Panel panel = new Panel(new GridBagLayout());
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.insets = new Insets(2,2,2,2);
            //gbc.weightx = 1.0;         // horizontal dispersion
            //gbc.weighty = 1.0;         // vertical dispersion
            for(int j = 0; j < data.length; j++)
                Checkbox cb = new Checkbox("", ((Boolean)data[j][0]).booleanValue());
                gbc.gridwidth = 1;
                panel.add(cb, gbc);
                gbc.gridwidth = GridBagConstraints.RELATIVE;
                gbc.anchor = GridBagConstraints.WEST;
                panel.add(new Label((String)data[j][1]), gbc);
                gbc.anchor = GridBagConstraints.CENTER;
                gbc.gridwidth = GridBagConstraints.REMAINDER;
                if(((Boolean)data[j][2]).booleanValue())
                    Button b = new Button("call");
                    b.setActionCommand((String)data[j][1]);
                    b.addActionListener(this);
                    panel.add(b, gbc);
                else
                    panel.add(new Label("  "), gbc);
            return panel;
        private Panel getList()
            Panel child = getPanel();
            ScrollPane scrollPane = new ScrollPane()
                public Dimension getPreferredSize()
                    return new Dimension(200, 125);
            scrollPane.add(child);
            Panel panel = new Panel(new GridBagLayout());
            panel.add(scrollPane, new GridBagConstraints());
            return panel;
        private static WindowListener closer = new WindowAdapter()
            public void windowClosing(WindowEvent e)
                System.exit(0);
        public static void main(String[] args)
            Frame f = new Frame();
            f.addWindowListener(closer);
            f.add(new ListTest().getList());
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    }

  • Quicktime plugin displaying SDP file rather than video in Internet Explorer

    I'm developing a streaming video application. Quicktime plug-in with firefox works fine. With I.E., the contents of the SDP file gets displayed (line by line) rather than the specified video.
    Any thoughts?
    Thanks,
    Hal

    You need to write your HTML so that it supports both the <EMBED> and <OBJECT> tags AND you need to invoke the QuickTime plug-in so that your stream plays in QT regardless of the browser's default settings. There is a great deal of information on these techniques in Apple's updated guide to HTML & QuickTime, including instructions on how to simplify coding by using Apple's AC_QuickTime javascript library.
    http://developer.apple.com/documentation/QuickTime/Conceptual/QTScriptingHTML/QTScripting_HTML_AIntroduction/chapter_1_section_1.html#//apple_ref/doc/uid /TP40001525-CH202-DontLinkElementID2

  • Is there a way to gift a playlist of say 10 songs all at once rather than one at a time?

    Wanting to send small playlists as valentine gifts but can't figure out how to do it. I would like to gift them all at once rather than one at a time.
    Is it possible?
    Thanks,
    Lis

    Not that I have encountered, but if your provider supports webmail, you can generally accomplish it that way.

  • OLAP query returning "name" rather than "key" attribute for a dimension

    Hello,
    I am busy with a project that involves drawing data from an OLAP cube (in SAP BW), then transforming and contextualising for use in an EMI environment. The project runs on MII 12.1.
    The standard OLAP connector and OLAP queries have been used (would prefer not to go the route of creating a call to the OLAP XMLA web service directly). One of the important dimensions is returned as a name (descriptive text) rather than a key (the cost element code itself), preventing us from reliably applying business rules to classify cost elements. Categorising cost elements based on their text descriptions is not a sustainable solution.
    The output needs to allow for two dimensions (cost element and an equipment identifier) against which individual cost values will be listed. It appears that the two dimensions must both be on the "x-axis", as result columns are automatically renamed, e.g. C000001, C000002, etc. If anyone knows of a way to suppress this renaming behaviour, please let me know.
    Is it possible to force the "key" attribute to be returned instead of the "name" attribute? I have identified two preferred options:
    1. MDX syntax of the query itself
    2. configuration of the OLAP connector
    I have not found a way to do this through MDX syntax, but would welcome any suggestions.
    Alternatively, perhaps there is a non-standard way of configuring the OLAP connector so that the key rather than the name attribute is returned for all dimensions. Has anyone anything, e.g. chosen a non-standard ColumnNameAttribute or DataTypeAttribute, in this regard?
    Thanks,
    Marc Chaplin

    <b>Apologies for the formatting above</b>
    Part 1:
    Hello,
    I am busy with a project that involves drawing data from an OLAP cube (in SAP BW), then transforming and contextualising for use in an EMI environment. The project runs on MII 12.1.
    The standard OLAP connector and OLAP queries have been used (would prefer not to go the route of creating a call to the OLAP XMLA web service directly). One of the important dimensions is returned as a name (descriptive text) rather than a key (the cost element code itself), preventing us from reliably applying business rules to classify cost elements. Categorising cost elements based on their text descriptions is not a sustainable solution.
    The output needs to allow for two dimensions (cost element and an equipment identifier) against which individual cost values will be listed. It appears that the two dimensions must both be on the <i>x-axis</i>, as result columns are automatically renamed, e.g. C000001, C000002, etc. If anyone knows of a way to suppress this renaming behaviour, please let me know.

  • Which menu does the "Line Manager" responsibility point to?

    Hi,
    I unwittingly applied BIS PF.H back in August and it changed some of the Daily Business Intelligence responsibilities to point to the Oracle Fusion Business Intelligence product. Since I can't roll back to an August backup, I'm trying to find the menu name that the "Line Manager" responsibility points to before 11i BIS PF.H. If you're on PF.G or earlier, could someone please go in as sysadmin and query the Line Manager responsibility and tell me the name of the menu it's attached to?
    Thanks so much!
    Mark

    Thanks! Just in case you're looking, in PF.H Oracle changed the Line Manager responsibility to point to the OBIEE functionality. If you want the DBI functionality you need to use the HR Line Manager responsibility instead. It doesn't use the OBIEE functionality.
    Thanks for the menu's!

Maybe you are looking for