I am trying to put together some code that allows the use to drag a marker onto a polyline in the Flex version of Google Maps. This is not so easy. I am close, but not there yet. Here's what I've tried so far:
Attempt 1
On MOUSE_DOWN of a marker, I save a reference to the marker, then whenever the pointer moves over the map, I move the marker right under the pointer - this achieves the drag-n-drop of the marker (see code - Map.as, app.mxml)), however, when the marker is dragged above the polyline, I don't get the ROLL_OVER event on the polyline fired, and when the mouse button is released, I don't get the MOUSE_UP event on the polyline fired, because the marker itself is on top of the polyline at that point, blocking the event from the polyline overlay.
Attempt 2
I put an invisible pane on top of the map, and drew a dot on that pane underneath the pointer as a marker is dragged - to indicate dragging - rather than moving the marker itself (code Map.as, app.mxml). However, the dot blocks the events from the map overlays as well, and so the polyline does not get those events fired either. However, a side-effect of this approach is that when you release the mouse on top of a polyline, a ROLL_OVER event is fired on it - I could use this to detect a drop, but not to detect hovering over the polyline though, which I would really like to do.
Any help/fresh ideas on this is greatly appreciated.