[OpenLayers-Users] RestrictedExtent on Overview Map

Peter pfischer at proveo.com
Mon Jul 9 00:42:52 PDT 2012


Hey all,

I want that my overview map has a restricted extent. I tried to add this
like in the following code:

var mapOptions; 
			var extent = new
OpenLayers.Bounds(103.9508,1.3205,104.0287,1.3972).transform(map.displayProjection, 
map.projection);
	        var controlOptions = {
	            maximized: false,
	            mapOptions: OpenLayers.Util.extend(mapOptions, {
	            	numZoomLevels: 1,
	            	 restrictedExtent: extent        	
		       
	            }),
	            layers: [new OpenLayers.Layer.OSM("OpenStreetMap", null,null)]
	        };
	        overview = new OpenLayers.Control.OverviewMap(controlOptions);
	        map.addControl(overview);

but this does not work. it behaves still normal. Can you please tell me what
i am doing wrong.

Thanks and Greetings

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/RestrictedExtent-on-Overview-Map-tp4986841.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list