GeoMap Mouse Coordinates to Longitude & Latitude

Is there a method on GeoMap to take the mouse coordinates generated by attachBrowserEvent('click', onClick) ev.getOffsetX(), into map coordinates (Lng & Lat)? I was hoping that the attachClick method would have provided an event with geo-coordinates, but attachClick doesn't seem to be working so I was advised to use attachBroswerEvent instead.

Please close discussion by choosing correct answer - How to close a discussion and why

Similar Messages

  • Flash player in firefox is not giving the exact mouse coordinates while running a flex application in firefox. Actually it was working fine in the previous versions. I mean in the ver 5.5. In the latest version its not working fine

    Hi Friends,
    I face some mouse issues with the later versions of the Firefox (6 and above). When a flex application is executed in a Firefox, It runs on the flash player in the browser. While getting the mouse coordinates, flash player is returning some bad coordinates. Please respond to this as soon as possible

    A good place to ask advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
    The helpers at that forum are more knowledgeable about web development issues.<br />
    You need to register at the mozillaZine forum site in order to post at that forum.<br />
    See http://forums.mozillazine.org/viewforum.php?f=25

  • About get mouse coordinates on screen?

    how to get mouse coordinates in java, i don't look for a appropriate method.

    The MouseEvent which is given to the MouseMotionListener or the MouseListener has one getX() and one getY() method. That are the coordinates in your applicetion window starting with (0,0) in the upper left corner.
    Hope this helps
    Markus

  • Mouse Coordinate issues caused by Scaling Components in a JScrollPane

    Hi All,
    I've been attempting to write a program that includes a simple modeler. However, I've been having some trouble with being able to select components when attempting to implement zoom functionality - when I "zoom" (which is done via scroll wheel) using the scale Graphics2D method, while it zooms correctly, the mouse location of components do not seem scale.
    I've tried one of the solutions found on the forums here (create a custom event queue that adjusts the mouse coordinates) and while it seemed to work initially, if I zoom in and adjust the current view position using the scrollbars, certain components contained in the JPane will become un-selectable and I haven't been able to work out why.
    I've attached a SSCCE that reproduces the problem below - it implements a JScrollPane with a JPane with a few selectable shapes set as the Viewport. The zoom is done using the mouse scroll wheel (with wheel up being zoom in and wheel down being zoom out)
    Any help in order to fix the selection/de-selection issues on zoom would be greatly appreciated! I've spent some time reading through the forums here but have unfortunately not been able to find a workable solution around it.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class Tester extends JScrollPane
        public Tester() {
            this.setViewportView(new Model());
        public static void main (String[] args) {
            JFrame main = new JFrame();
            main.add(new Tester());
            main.setSize(500,300);
            main.setResizable(false);
            main.setVisible(true);
    class Model extends JPanel implements MouseListener, MouseWheelListener
        private GfxClass selection = null;
        private static double zoomLevel = 1;
        // zoom methods
        public void setZoom(double zoom) {
            if( zoom < 0 && zoomLevel > 1.0)
                zoomLevel += zoom;
            if( zoom > 0 && zoomLevel < 5.0)
                zoomLevel += zoom;
        public static double getZoom() { return zoomLevel; }
        public void resetZoom() { zoomLevel = 1; }
        public Model() {
            super(null);
            addMouseListener(this);
            addMouseWheelListener(this);
            MyEventQueue meq = new MyEventQueue();
            Toolkit.getDefaultToolkit().getSystemEventQueue().push(meq);
            for(int i = 0; i <7; i++) {
                double angle = Math.toRadians(i * 360 / 7);
                GfxClass oc_tmp = new GfxClass((int)(200 + 150 * Math.cos(angle)), (int)(125 + 100 * Math.sin(angle)), "Element"+i);
                add(oc_tmp);
            repaint();
        public void paint (Graphics g) {
            Graphics2D g2 = (Graphics2D) g.create();
            AffineTransform oldTr=g2.getTransform();
            g2.scale(getZoom(),getZoom());
            super.paint(g2);
            g2.setTransform(oldTr);
            setBackground (Color.white);
            super.paintBorder(g2);
        private static class MyEventQueue extends EventQueue  {
            protected void dispatchEvent(AWTEvent event) {
                AWTEvent event2=event;
                if ( !(event instanceof MouseWheelEvent) && (event instanceof MouseEvent) ) {
                    if ( event.getSource() instanceof Component && event instanceof MouseEvent) {
                        MouseEvent me=(MouseEvent)event2;
                        Component c=(Component)event.getSource();
                        Component cursorComponent=SwingUtilities.getDeepestComponentAt(c, me.getX(), me.getY());
                        JPanel zContainer= getZoomedPanel(cursorComponent);
                        if (zContainer!=null) {
                            int x=me.getX();
                            Point p=SwingUtilities.convertPoint(zContainer,0,0,(Component)event.getSource());
                            int cX=me.getX()-p.x;
                            x=x-cX+(int)(cX/getZoom());
                            int y=me.getY();
                            int cY=me.getY()-p.y;
                            y=y-cY+(int)(cY/getZoom());
                            MouseEvent ze = new MouseEvent(me.getComponent(), me.getID(), me.getWhen(), me.getModifiers(), x, y, me.getClickCount(), me.isPopupTrigger());
                            event2=ze;
                super.dispatchEvent(event2);
        public static JPanel getZoomedPanel(Component c) {
            if (c == null)
                return null;
            else if (c instanceof Model)
                return (Model)c;
            else
                return getZoomedPanel(c.getParent());
        private void deselectAll() {
            if(selection != null)
                selection.setSelected(false);
            selection = null;
        public void mouseClicked(MouseEvent arg0)  {    }
        public void mouseEntered(MouseEvent arg0)  {    }
        public void mouseExited(MouseEvent arg0)   {    }
        public void mouseReleased(MouseEvent arg0) {    }   
        public void mousePressed(MouseEvent me) {
            Component c1 = findComponentAt(me.getX(),me.getY());
            if(c1 instanceof GfxClass)
                if(selection != null)
                    selection.setSelected(false);
                selection = (GfxClass)c1;
                selection.setSelected(true);
            else
                deselectAll();
            repaint();
            return;
        public void mouseWheelMoved(MouseWheelEvent e) { // controls zoom
                int notches = e.getWheelRotation();
                if (notches < 0)
                    setZoom(0.1);
                else
                    setZoom(-0.1);
                this.setSize(new Dimension((int)(500*getZoom()),(int)(300*getZoom())));           
                this.setPreferredSize(new Dimension((int)(500*getZoom()),(int)(300*getZoom())));     
                repaint();
    class GfxClass extends Component { // simple graphical component
        private boolean isSelected = false;
        private String name;
        public GfxClass(int xPos, int yPos, String name) {
            this.name = name;
            this.setLocation(xPos,yPos);
            this.setSize(100,35);
        public void setSelected(boolean b) {
            if( b == isSelected )
                return;
            isSelected = b;
            repaint();
        public boolean isSelected() {
            return isSelected;
        public void paint(Graphics g2) {
            Graphics2D g = (Graphics2D)g2;
            if( isSelected )
                g.setColor(Color.RED);
            else
                g.setColor(Color.BLUE);
            g.fill(new Ellipse2D.Double(0,0,100,35));
            g.setColor(Color.BLACK);
            g.drawString(name, getSize().width/2 - 25, getSize().height/2);
    }Edited by: Kys99 on Feb 22, 2010 9:09 AM
    Edited by: Kys99 on Feb 22, 2010 9:10 AM

    Delete your EventQueue class. Change one line of code in your mouse pressed method.
    public void mousePressed(MouseEvent me) {
        Component c1 = findComponentAt((int) (me.getX()/getZoom()),
                                       (int) (me.getY()/getZoom()));
    }

  • GIS question: visualisation of locations based on longitude/latitude

    Hi,
    First of all: I'm a total beginner for everything related to GIS. I'm a bit lost at where to start, so any hints are welcome.
    I have a table with a number of locations, for each location I have values for the longitude and latitude (Oracle format).
    Would it be able to visualize these locations on a map using Oracle Locator, MapViewer or Google Earth ? I'm using Oracle 10g with patch set 10.2.0.4.
    Thanks,
    Matthias

    Oracle Database are having through Oracle Locator support for spatial data storage via its datatype sdo_geometry.
    A good place to start is the user documentation:
    http://download.oracle.com/docs/html/B14255_01/toc.htm
    In your particular case your Longitude latitude columns could be use as follows:
    Add a column GEOMETRY of datatype sdo_geometry to your table
    UPdate that via:
    update YOUR_TABLE a
    set geometry=
    sdo_geometry(
    2001, ---2D point
    8307, --- SRID (assuming WGS84 for your lon/lat)
    sdo_point_type(a.longitude, b.latitude, null), ---specific point notation
    null,
    null);
    create an entry in the user_sdo_geom_metadata (see user manual)
    create an index (see user manual)
    Once you have these in place, you can start looking to some solutions as you mentioned or as described by Ivan to use this data to be visualised.
    Hoping this gives you a an idea where and how to start
    Luc

  • In Photoshop CS6 how do I turn off the move tool popup showing the mouse coordinates?

    I just installed Creative Suite CS6 and in Photoshop, when I use the move tool a small popup window shows the mouse coordinates. I can't see any option to turn this off, either in the Options bar or the Preferences. It's really annoying. Can someone please help?
    Thanks,
    Joanne

    Thank you so much! Sometimes I miss the lack of user manuals but I know it saves trees.

  • Plotting on xy graph based on mouse coordinates

    I am looking into plotting Mouse coordinates on XY Graph continuously based on where i move. My computer's resolution is 1200x800 and i would like it to plot based on where i move.,
    Attached is my progress so far.
    Attachments:
    progress.png ‏74 KB

    The XY Graph has a method which converts coordinates to XY values. You can call it by right clicking the graph and selecting Create>>Invoke Node>>Map Coordinates to XY.
    However, if you look at the help for it, you will see that the coordinates it expects are those of the pane the graph is in, and the coordinates you have are of the screen. You can convert your global coords to pane coords by getting the VI's Front Panel Window. Panel Bounds property, building two matching XY clusters from the data and subtracting them (assuming the VI only has one pane) or you can use another loop with an event structure and a Mouse Move event (which returns local data) on the graph and then transfer the position data to your loop (you could also use a single loop, but that might be more complicated because the event structure will process every move of the mouse as a new event).
    You will also need to keep the data to place in the graph somewhere. If you open the context help window and hover over the graph's BD terminal, you will see the data types it expects and you will need to build one of those yourself. A shift register is something you might want to look into. There are also some examples showing working with graphs in the example finder (Help>>Find Examples).
    Try to take over the world!

  • Mouse coordinate in oracle form canvase

    Hi,
    Is there any way to know the mouse coordinate when the mouse is moving in oracle form canvase.
    I will appreciate for help..... Thanks.
    Regards,

    System variables should give u information
    this forms example might help
    /* Trigger:  When-Mouse-Click
    **   Example:  Dynamically repositions an item if:
    **             1) the operator clicks mouse button 2
    **                on an item and
    **             2) the operator subsequently clicks mouse button
    **                2 on an area of the canvas that is
    **                not directly on top of another item.
    DECLARE
       item_to_move       VARCHAR(50);
       the_button_pressed VARCHAR(50);
       target_x_position  NUMBER(3);
       target_y_position  NUMBER(3);
       the_button_pressed VARCHAR(1);
    BEGIN
       /* Get the name of the item that was clicked.
       item_to_move := :System.Mouse_Item;
       the_button_pressed := :System.Mouse_Button_Pressed;
       **  If the mouse was clicked on an area of a canvas that is
       **  not directly on top of another item, move the item to
       **  the new mouse location.
       IF item_to_move IS NOT NULL AND the_button_pressed =  '2' THEN
          target_x_position := To_Number(:System.Mouse_X_Pos);
          target_y_position := To_Number(:System.Mouse_Y_Pos);
          Set_Item_Property(item_to_move,position,
              target_x_position,target_y_position);
          target_x_position := NULL;
          target_y_position := NULL;
          item_to_move := NULL;
       END IF;
    END; plz mark correct/helpful if it is

  • Mouse Coordinates and Timer Resolution

    First - I am not a Flash or ActionScript programmer. I have
    been asked by someone if I could port my ActiveX code (private) to
    the Flash client. In researching all of the Flash, Flex and
    ActionScript documentation, it appears that almost everything I
    need is present... Almost....
    A. My program relies on Mouse Coordinates being fed to it in
    twips. The only possible references I get to this issue have come
    from searching this forum.
    - Is it true that the X and Y coordinates are returned to
    ActionScript as floating point values that represent fractional
    pixel values that I can translate to twips?
    B. My program also relies on good timer resolution. The
    Windows GetTicks() API is not sufficient, because it is returned
    via the Windows message queue and can be off enormously at a
    MouseMove event. Therefore, in my ActiveX code, I call the
    QueryPerformanceCounter(), which gives me the resolution I need.
    - Can anyone tell me what timer API the Flash client engine
    is using for the values it returns?
    Thank you,
    Grant

    I still don't understand your problem and apparently nobody else does either since there are no responses. Why don't you write a simple program (like I did for you on your last post) that demonstrates the problem.
    "A picture is worth a thousand words".

  • Geocoding Longitude Latitude Java API(s)

    Hello,
    I only need to get the longitude and latitude (no maps no nothing else) for a given address. The problem I am having is that I have about 12000 stored addresses and would like to get their corresponding longitudes and latitudes. But the free services offered by some websites allow you to retrieve only one at the time so it is time consuming.
    Does anyone know about either a trial version or some Java API(s) -so I can write my own program- to retrieve the longitude/latitude of an address?
    Thank you very much.

    This is not quite the answer, but I it is close and free of charge:
    I saw this page:
    http://www.personal.psu.edu/users/m/j/mjl284/proj6.htm
    I have looked into this, so go to
    http://www.esri.com/software/arcexplorer/index.html
    launch ARCExplorer
    Push add service and add the ESRI "Service", then add Census_TIGER2000
    Use Binoculars button to type in a street address in the area of interest.
    Zoom in and push the Identify "i" button. Click on a street.
    A window will come up with a bunch of yucky field names and values.
    Those numbers are the key. Especially note the numbers for the state and county.
    Now, go to the Tiger2000 web site. For instance, for California:
    http://www2.census.gov/geo/tiger/tiger2002/CA/
    Get the county data, for instance for Santa Clara,
    http://www2.census.gov/geo/tiger/tiger2002/CA/tgr06085.zip (about 5MB when zipped)
    Unpack the data files, which are text, and go back to the Indentify window with all the codes
    The other numbers are indices. In particular, TLID.
    The TLID for my 1/10 section of my street where my building is is 122955605
    Now, I already know that my geocode is approximately: Lat 37.391 Long. -122.068
    My address is 67 E. Evelyn Ave.
    Here is that line in those files:
    file: TGR06085.RT1, line 32046:
    11102 122955609 AE Evelyn Ave A41 100 198
    101 19900009404194041 06060850859283092830
    496704967050910950910910111013-122066172+37390040-122063872+37389240
    and now I see in in this data.
    The FNODE 6558, TNODE 6755 from the window mean that, I think, it goes from-node street address 65 to-node street address 67.
    You can go read the Census web pages for docs on the other fields.

  • No longitude\latitude in compass ,help me please!!!!!!!!!

    i bought a new iphone 3gs yesterday.when i was back home,found nit is empety in longitude\latitude area when using compass.anybody can tell me why? by the way,my sim card can't use internet.is that the reason?
    please! anyone help me.thanks!

    Is location services turned On? Settings > General > Location Services...
    If it is on...then try a hard reset...Hold both Sleep and Home buttons at same time for about 10-15 seconds until you see the white Apple symbol...then release...
    Lastly, are you outside when this issue is seen...since GPS location first needs location services to be on then it needs a sat signal...being inside may be causing it not to show up

  • Mouse coordinates on the screen

    is it possible to get mouse coordinates on the screen? i want to make a program which makes screenshots of areas on the screen and i want use the mouse to mark them.
    how could i do that? is it possible to get mousecoordinates even if the mouse is outside the java JFrame?
    there must be a way! i searched in the forum but i found no answer.
    please don't tell me i have to use jni, the app should be platform independent.

    Yeah, basically there's no way to do this. This should be requested if it hasn't already (too lazy to check). It's not hard for sun to add, they just need to add it. Ok, anyway, I looked into it and see if there was a way to do this even somewhat reasonably in Java. I was very disappointed. I pretty much had no luck, but I did get a lame way of implementing this :P After some thought, this is what I ended up with:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class MousePosition extends JFrame implements MouseMotionListener
        private int x = 0;
        private int y = 0;
        private boolean isAP = true;
        public MousePosition()
            setSize(300, 300);
            setLocation(200, 200);
            addMouseMotionListener(this);
            addMouseListener(new MouseAdapter()
                public void mousePressed(MouseEvent e)
                    isAP = false;
            setVisible(true);
            try
                Robot r = new Robot();
                r.mouseMove(getLocation().x + 50, getLocation().y + 50);
                r.mousePress(InputEvent.BUTTON1_MASK);
            } catch(AWTException e) {}
        public void mouseDragged(MouseEvent e)
            System.out.println(e.getX() + getLocation().x + ", " + (e.getY() + getLocation().y));
        public void mouseMoved(MouseEvent e) {}
        public static void main(String[] args)
            new MousePosition();
    }So it'll "lock" the program getting the absolute coordinates until you press the mouse, then you're free to do what you want. You could also do this with keyPressed or anything else you want. JNI would be the real solution as of now, until then I think sun should address the problem.

  • Mouse coordinates.

    I want to make an applet (dimensions cca 50x100).
    But I want it to display the mouse coordinates, no matter where the cursor is (over the applet or elsewhere on the desktop).
    Can you give me some ideas? What classes to use, some approaches to my problem etc.
    Advanced thanks (like this forum is).
    iulian

    I think your only way out of this would be to use JNI. On Windows you can then use thr MouseCapture functions (or a hook function) to get mouse messages wherever the mouse is, but of course that is platform specific. Otherwise, the JVM will only get mouse messages when the mouse is over the Java window(s)

  • Get mouse coordinates when its moved over a powerpoint slideshow -URGENT

    i am writing a code to get the mouse coordinates as its moved over the screen(especially over powerpoint slide show. plz help me if u know a simple code that perform this function without a plug-in, but if i have to use a plug-in advice me.
    tahnk u very much :)

    sorry for not using the code tags..just learn about it...thanx
    my problem is.when i want to record every coordinates of the mouse while it moves..but using the printstream,it only records the end point of the mouse and not while the mouse moves/dragged.I'm developing a sketch pad program. the program needs to capture the coordinates and saved it into a file.i tried using it but keeps on saving the last point but not all
    example
    point A..........................point N............................point Z
    i want the program to save the coordinate of point A,point B,C,D...point N....and last point Z
    but it keeps on saving only point Z.can u help or give any ideas..thanx

  • How to find out the mouse Coordinates

    How can I find out the mouse coordinates, where I am clicking on the screen.
    I tried to use MouseEvent e, e.getX() and e.getY() but it is giving that particular components X,Y coordinates

    In SwingUtilities there is a method called that can be used to convert a local location to a screen location.
    public static void convertPointToScreen(Point p,
    Component c)
    Convert a point from a component's coordinate system to screen coordinates.
    Parameters:
    p - a Point object (converted to the new coordinate system)
    c - a Component object

Maybe you are looking for

  • Hyperlinked images thin line in iExplorer

    When I tested my website it worked fine in Firefox and Chrome, but not in iExplorer. Hyperlinked images got a  thin purple line around them. Does anyone know how to remove that? It'd be very helpful! Thanks in advance!

  • How can I link my iPad1 to Hp h470 bluetooth printer?

    I got a Hp h470 bluetooth mobile printer, does anyone know how to link it to my ipad1. so that i could print stuff directly from ipad. Many thanks

  • IPhoto Cannot Be Launched!!!!

    My iPhoto application was working fine until I enabled Photo Stream and tried to move some pics. to Photo Stream. Now when I try to launch iPhoto, I get a screen that the says "iPhoto application unexpectedly quit while trying to restore its windows.

  • Logic songs won't open or are corrupted - FW 400 - 800 problem!

    Been having all sorts of problems not being able to open songs, or they say they are damaged and when I repair them they're empty. Worked out, through trial and error, it had to be a hard drive problem, then realised I'd just changed the cable on the

  • Frame dropped under OS 10.4 but was working great under 10.3.7 ???

    I've just upgraded my system to 10.4 and all bad things suddently happened... Frame dropped under OS 10.4 but was working great under 10.3.7 ??? any specific issue addressed by updating OS would lead to frame drop?