Hi ,

         I am trying to get x,y screen co-ordinates of mouse Click on
google map. This is what i have done. I have attached a mouse Click
event listener. On that eventListener i am using
map.fromLatLngToViewport(event.latLng).

First time i get  proper x y but then as soon as i drag the map or a
map MOVE event occurs  map.fromLatLngToViewport(event.latLng) gives me
wrong x and y and my object goes out of screen i am  giving my code
below


map.addEventListener(MapMouseEvent.CLICK, onMapClick)

function onMapClick(event:MapMouseEvent):void {
        var loc:Point = map.fromLatLngToViewport(event.latLng);
        TweenLite.to(i.getOptions().icon, 3, {x:loc.x, y:loc.y});
}



-- 
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.

Reply via email to