In a previous thread,
http://groups.google.com/group/google-maps-api-for-flash/browse_thread/thread/739dd521e008eeba/8c80c6ccf5e7197c?lnk=gst&q=what+events+fire#8c80c6ccf5e7197c,
it lists the events that fire for an overlay (marker).
However, I cannot seem to get certain of those events to fire.
Specifically, I never get MOUSE_UP or MOUSE_MOVE events for markers.
The event seems to fire for the map control itself but not for the
markers. The code is below (it is simply the marker example program
with a couple added event listeners). I imagine there is something
simply I am missing but I cannot see it.
private function onMapReady(event:Event):void {
map.setCenter(new LatLng(48.858842, 2.346997), 14,
MapType.NORMAL_MAP_TYPE);
var markerA:Marker = new Marker(
new LatLng(48.858842, 2.346997),
new MarkerOptions({
strokeStyle: new StrokeStyle({color: 0x987654}),
fillStyle: new FillStyle({color: 0x223344, alpha:
0.8}),
radius: 12,
hasShadow: true
})
);
map.addEventListener(MapMouseEvent.MOUSE_UP, onMapMouseUp);
markerA.addEventListener(MapMouseEvent.MOUSE_UP, onMapMouseUp);
markerA.addEventListener(MapMouseEvent.MOUSE_DOWN,
onMapMouseDown);
markerA.addEventListener(MapMouseEvent.MOUSE_MOVE,
onMapMouseMove);
map.addOverlay(markerA);
}
private function onMapMouseDown(event:MapMouseEvent):void
{
trace("MapMouseDown:" + event.feature + ", " + event.target);
}
private function onMapMouseUp(event:MapMouseEvent):void
{
trace("MapMouseUp:" + event.feature + ", " + event.target);
}
private function onMapMouseMove(event:MapMouseEvent):void
{
trace("MapMouseMove:" + event.feature + ", " + event.target);
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---