Yeah sure, Thank you very much! Appreciated.
Javier. On Mar 15, 2009, at 1:01 PM, pamela fox wrote: > > Hi Javier- > > It's a documentation issue. Here's the response from Mike: > > "Basically, at any given instance we've only got layers with indices > [0 .. paneManager.paneCount-1]. > > paneManager.createPane(index) will add the pane at the given index > providing 0 <= index <= paneCount. If you specify a value larger than > paneCount, then it works as though you'd specified a value of > paneCount. > > So what happened here was that the creating the first custom pane > added it at an index of paneCount (20 > paneCount, so it was clamped). > Adding the second custom pane added it at an index of the new value of > paneCount taking account of the previously added pane. > > I've tested the following code and it works: > > // Save original number of panes. > var paneCount:int = paneManager.paneCount; > // Add new pane on top of all the others. > var paneHigher:IPane = paneManager.createPane(paneCount); > // Add a pane, inserting it at the original value of paneCount so > that it is placed underneath paneHigher. > var paneLower:IPane = paneManager.createPane(paneCount);" > > We'll fix up the documentation for next release. Does that help? > > - pamela > > On Mon, Mar 9, 2009 at 12:12 PM, pamela fox <[email protected]> > wrote: >> Hi Javier- >> >> Sorry for the delay; we're looking into the issue. >> >> - pamela >> >> On Fri, Feb 6, 2009 at 12:42 AM, Javier de la Torre <[email protected] >> > wrote: >>> >>> Hi, >>> >>> I am trying to make use of Panes to control wich overlays stay on >>> top >>> of the others. But it seems that the indexes are not being taken in >>> consideration. Look at this code: >>> >>> ------ >>> >>> var polygon1:Polygon = new Polygon([ >>> new LatLng(10,10), >>> new LatLng(20,10), >>> new LatLng(20,20), >>> new LatLng(10,20), >>> new LatLng(10,10)], new PolygonOptions({fillStyle: new >>> FillStyle({color:Color.RED,alpha:1})})); >>> >>> var polygon2:Polygon = new Polygon([ >>> new LatLng(10,10), >>> new LatLng(15,10), >>> new LatLng(15,15), >>> new LatLng(10,15), >>> new LatLng(10,10)], new PolygonOptions({fillStyle: new >>> FillStyle({color:Color.BLUE,alpha:1})})); >>> >>> var pane1:IPane = map.getPaneManager().createPane(20); >>> var pane2:IPane = map.getPaneManager().createPane(10); >>> >>> pane1.addOverlay(polygon1); >>> pane2.addOverlay(polygon2); >>> >>> ----------- >>> >>> The two polygons overlay and are in different panes with different >>> index. >>> >>> With this I would expect that the polygon1 stay over polygon 2, but >>> no. If I set the pane index the other way around, there is also no >>> change. >>> >>> I tried using the updatePosition but also no luck. >>> >>> Finally the only thing that I managed to make work was using >>> >>> map.getPaneManager().placePaneAt(pane1,10); >>> >>> But this also has very curious effects. It does not matter what >>> index >>> you give as parameter, this method will place the referenced pane on >>> top of the others. >>> >>> Any idea of what is going on? Maybe I do not understand correctly >>> panes? A little bit more of documentation about them would also >>> help. >>> >>> Thanks again, >>> >>> Javier. >>> >>>>> >>> >> > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
