You could have your custom overlay essentially 'wrap' a polygon and
marker overlay.
You could then listen for overlay added, overlay removed so your
custom overlay knows when to remove the marker and polygon. This way
you don't have to implement positionOverlay.

        //Setup event handlers to know when the overlay is added or
removed
        this.addEventListener(MapEvent.OVERLAY_ADDED, onOverlayAdded);
        this.addEventListener(MapEvent.OVERLAY_REMOVED,
onOverlayRemoved);

        override public function getDefaultPane(map:IMap):IPane {
            return map.getPaneManager().getPaneById
(PaneId.PANE_OVERLAYS);
        }

If that doesn't make sense I can probably whip up a more detailed
example.

On Feb 20, 9:19 am, gabby <[email protected]> wrote:
> Hello,
> I'd like to create an object that has both a customized Polygon and a
> customized Marker. It would be most convenient if they could be added
> to the map simultaneously.
>
> Would you suggest a Custom Overlay that subclasses OverlayBase (would
> this even work)? I have begun to try this, but can't figure out how to
> override positionOverlay() and getDefaultPane() correctly.
>
> Otherwise, I'd have to deal with 2 separate objects of Polygon and
> Marker type.
>
> Thanks for any help you can provide.
--~--~---------~--~----~------------~-------~--~----~
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