Hallo Andreas Right, that worked. Many thanks! Actually I only had to ad maxResolution.
Yours, S. P.S. My other question regarding failing access to markers array from a Layer.Text seems to me harder one :-> 2011/1/15 Andreas Hocevar <[email protected]>: > Hi, > > why not just > > var clearBaseLayer = new OpenLayers.Layer("None", {isBaseLayer: true}); > > Make sure to maxResolution, maxExtent and units to your map configuration if > you work with anything else than EPSG:4326. > > Regards, > Andreas. > > On Jan 14, 2011, at 10:52 , Stefan Keller wrote: > >> Hi, >> >> I'd like to switch on/off basemap. I found the following which works so far: >> >> // Empty layer in order to switch off basemap (given a transparent >> image called clear.gif) >> var clearBaseLayer = new OpenLayers.Layer.Image( >> "None", >> 'img/clear.gif', >> new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34); >> // BOUNDS_OF_MERCATOR >> new OpenLayers.Size(8, 8), >> {isBaseLayer: true} >> ); >> >> The only problem here is, that when switching back to th original >> basemap (whatever this is in your application) the extent was/is set >> back to some larger area. >> >> What can I do? >> -S. >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.osgeo.org/mailman/listinfo/openlayers-users > > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > > _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
