[Users] MapPanel Class and allOverlays properties
Andreas Hocevar
ahocevar at opengeo.org
Mon Aug 3 16:01:25 CEST 2009
Hi Arnaud,
no need to change the MapPanel class. The allOverlays:true property is
set using applyIf, which means only if this property is not provided by
the user.
So you just need a slightly modified mappanel config:
var mapPanel = new GeoExt.MapPanel({
map: {
allOverlays: false,
controls: [
new OpenLayers.Control.Navigation()
,new OpenLayers.Control.PanPanel()
,new OpenLayers.Control.ZoomPanel()
]
}
,region : 'center'
,title : 'map'
,layers: [bluemarble]
,extent: [-5, 35, 15, 55]
});
Arnaud Vandecasteele wrote:
> So my question is why the GeoExt developpers have decided to force the
> allOverlays properties to false instead of true?
Because most users will be working with OGC services, which don't make a
distinction between base layers and overlays.
Also note that you can still have exclusive layers, by leaving
allOverlays:true and configuring the tree differently. The advantage is
that you can drag/drop overlays to base layers and vice versa. The
config option to look at (for the layer nodes) is checkedGroup.
Regards,
Andreas.
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list