[OpenLayers-Users] How to change the maxScale of the map dynamically?
Reber Tobias
Tobias.Reber at bd.so.ch
Thu Mar 6 03:26:28 PST 2014
Hej-
I want to change the maxScale oft he map dynamically.
I have been doing following unsuccessfull aproaches:
// *************************************************
var MapOptions = {
projection: new OpenLayers.Projection(authid),
units: "m",
maxScale:50,
minScale:750000,
transitionEffect:"resize",
controls: []
};
...
// change the maxScale in the MapOptions
MapOptions.maxScale =5000;
// set new Options to the map
geoExtMap.map.setOptions(MapOptions); //set the Options
// BUT - THE Controller do not respect the change of maxScale
// unsuccessfull try to make a new Controller
geoExtMap.map.removeControl(geoExtMap.map.getControlsBy('displayClass','olControlPanZoomBar')[0])
geoExtMap.map.addControl(new OpenLayers.Control.PanZoomBar({zoomWorldIcon:true,forceFixedZoomLevel:false}));
// BUT - THE Controller do not respect the change of maxScale
// *************************************************
Does someone out there know how to change the maxScale of the map dynamically telling Controllers respect this change?
Thanking you a lot in advance
Greetings,
Tobias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140306/07482225/attachment.html>
More information about the Users
mailing list