Hi, I'd say not creating an OpenLayers.Map instance yourself and adding layers to it is a good practice. Adding layers to the MapPanel.layers config is probably the simplest.
Regards, Andreas. On Oct 20, 2010, at 16:05 , Vince Lotito wrote: > > > Hi Andreas, > > Yes, this helps -- I was thinking that this might be the issue... I am mixing > techniques. Since I am walking this path, is there a "best practice" for > loading layers eg. the LayerStore vs. MapPanel layers config option vs. > map.addLayers(...). > > Thanks > Vince > >> -----Original Message----- >> From: Andreas Hocevar [mailto:[email protected]] >> Sent: Wednesday, October 20, 2010 3:16 AM >> To: Vince Lotito >> Cc: [email protected] >> Subject: Re: [Users] Map Panel Layer Issues.. >> >> Hi, >> >> the API change is that we now add layers from the MapPanel's layers config >> much later than before. >> >> To have control over the order of layers, you should not mix techniques to >> add layers to the map before the MapPanel is rendered. This means: either >> stick with the layers config option of the MapPanel, or create a >> LayerStore that you add your layer records to, or add all layers to the >> OpenLayers.Map. >> >> Once the MapPanel is rendered, you can mix techniques again. >> >> Hope this helps, >> Andreas. >> >> On Oct 19, 2010, at 16:57 , Vince Lotito wrote: >> >>> Hi, >>> I am upgrading to GeoExt 1.0 - and with that I am now experiencing >> issues in the z-index of the layers in the map panel ... This is also >> reflect in the order of the nodes in the tree panel. I've read the release >> notes and was wondering if changes to the API around the MapPanel's layer >> rendering could cause this and if so, what type of things should I be >> looking at in my code to deal with this behavior. >>> Vince >>> >>> _______________________________________________ >>> Users mailing list >>> [email protected] >>> http://www.geoext.org/cgi-bin/mailman/listinfo/users >> >> >> >> -- >> Andreas Hocevar >> OpenGeo - http://opengeo.org/ >> Expert service straight from the developers. > > _______________________________________________ > Users mailing list > [email protected] > http://www.geoext.org/cgi-bin/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
