Hi Chris-
You can do it in a much simpler way:
map.addEventListener(MapMouseEvent.MOUSE_MOVE,
function(e:MapMouseEvent):void {
map.addOverlay(new Marker(e.latLng));
});
That bit of code is pretty fun, actually. :)
- pamela
On Sat, Mar 21, 2009 at 3:54 AM, chris <[email protected]> wrote:
>
> Hi all,
> I've seen a related thread (http://groups.google.com/group/google-
> maps-api-for-flash/browse_thread/thread/
> 7d00704ecdedc7e8/0cb368d4835e87b0) , but no answers for this specific
> question.
>
> I want to display the current lat/long of the mouse pointer as the
> user moves the mouse around the map.
>
> I added a MOUSE_MOVE event listenter to the map and it calls a
> function with the following code that displays the LatLng in a text
> field:
> toolboxPop.mouse_latlong_text.text=map.fromPointToLatLng(new Point
> (evt.localX ,evt.localY));
>
> The problem is that the LatLng numbers are way off the map. What am I
> doing wrong?
>
> Thanks,
> Chris
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API For Flash" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-maps-api-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---