[OpenLayers-Users] Blank base layer with other base layer options

Andreas Hocevar ahocevar at opengeo.org
Thu Mar 24 05:44:27 EDT 2011


Hi,

give your empty base layer the same maxExtent, maxResolution, units and projection as your other base layers, or set them as options on the map instance.

Regards,
Andreas.

On Mar 8, 2011, at 22:49 , Charles Galpin wrote:

> I have seen this asked before, and the solution was to do
> 
> baseLayer = new OpenLayers.Layer("Blank",{isBaseLayer: true});
> 
> However in my case I have other base layers like google and osm, and I just want to add the option of having no base map. But when I select a layer defined like this it appears to immediately zoom out to it's max extent which appears to be heavily zoomed in (scale of 1:5022).
> 
> How can I set it to keep at the scale it was before selecting it, or have the same extent and resolutions as say the google map?
> 
> thanks,
> charles
> 
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list