Fetch lat and long

30 views
Skip to first unread message

Mannu

unread,
Feb 24, 2012, 12:46:31 AM2/24/12
to openscales-dev, manees...@yahoo.com
Hi all,


Can anyone help me to find out the lat and long dynamically in
open scales.

Thank You

WillPetty

unread,
Feb 27, 2012, 8:39:53 AM2/27/12
to opensca...@googlegroups.com, manees...@yahoo.com
Something .like this should work, if what you are trying to do is get the lat long of a point under the mouse...

                var p:Pixel = new Pixel(map.mouseX, map.mouseY);
                var l:Location = map.getLocationFromMapPx(p);
                var lat:Number = l.lat;
                var lon:Number = l.lon;

Simon Lopez

unread,
Feb 28, 2012, 3:04:50 AM2/28/12
to opensca...@googlegroups.com, WillPetty, manees...@yahoo.com
Hi,
do not forget to reproject the result if not explained in your favorite projection.

Regards,
Simon L.
--
You received this message because you are subscribed to the Google Groups "openscales-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/openscales-dev/-/mFghPhDFSTwJ.
To post to this group, send email to opensca...@googlegroups.com.
To unsubscribe from this group, send email to openscales-de...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openscales-dev?hl=en.

Mike C

unread,
Mar 7, 2012, 2:20:54 AM3/7/12
to opensca...@googlegroups.com, manees...@yahoo.com
I haven't really had to do this, but I suddenly remembered you could probably just use the mouse position handler Flex wrapper object. And grab the lat long from there?

-Mike
Reply all
Reply to author
Forward
0 new messages