I have written a post to address extending Google Maps API for Flash,
check it out.

http://postbabel.com/wordpress/2009/06/extending-google-maps-api-for-flash/

The problem I see in your code is that at compose time, you cannot get
your pane Id which is created through IPaneManager.createPane at run
time. so your "MyPanes.MY_CUSTOM_PANE" may refer to some predefined
pane, but not the actual pane you created. You may realize that
IPane.id is read-only. You can decide it, but let IPaneManager does
it.

Code like,

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

, is OK only the Id is from predefined pane list, by PaneIds.

What I suggest you is to forget to override this function - leave it
alone, and call IPane.addOverlay on your customized pane. This is much
more manageable than otherwise.

my 2 cents.

Juguang



On Jun 21, 10:13 pm, Sébastien Varlet <[email protected]>
wrote:
> Hi,
>
> I made a custom Marker class and I would like to add those in a
> specific pane.
>
> Therefore, I overrode the getDefaultPane method in my custom marker
> class.
> It currently looks like this:
> override public function getDefaultPane(map:IMap):IPane
> {
>     return map.getPaneManager.getPaneById(MyPanes.MY_CUSTOM_PANE);}
>
> I did the same with a custom overlay I wanted to be visually under
> those markers.
>
> This is how I add my Marker/Overlays :
> mymap.addOverlay(/* a marker / an overlay */);
>
> The problem is I always see my markers visually under my overlays. I
> changed the order of my createPane calls to test and the same problem
> occurred.
> So, I decided to put a breakpoint in my getDefaultPane method in the
> custom marker class. It never stops on it ! (Yes I used the debug mod
> of FlexBuilder :D)
>
> So, what should I do ?
--~--~---------~--~----~------------~-------~--~----~
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