[OpenLayers-Users] OpenStreetMap - trying to limit zoom levels

The Bun rosario.carbone at ipl.com
Thu Dec 13 12:30:42 EST 2007


Hi

I am using OSM and connecting successfully to their mapnik server.
Everything works OK, this is my code:

		map = new OpenLayers.Map ("map", {
			controls:[
				new OpenLayers.Control.Permalink(),
				new OpenLayers.Control.MouseDefaults(),
				new OpenLayers.Control.LayerSwitcher(),
				new OpenLayers.Control.MousePosition(),
				new OpenLayers.Control.PanZoomBar()],
			maxExtent: new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
			numZoomLevels:17, 
                  maxResolution:156543, 
                  units:'meters', 
                  projection: "EPSG:41001"} );
		
	layerMapnik = new OpenLayers.Layer.TMS( 
		"Mapnik (updated weekly)",
		"http://tile.openstreetmap.org/mapnik/",
		{type:'png', getURL: get_osm_url, displayOutsideMaxExtent: true },
{'buffer':1} );

etc. etc.

What I am not understanding is how to limit the zoom levels to just from
zoom 9 to zoom 16 I tried different ways: An array of scales, an array of
resolutions, changing the maxResolution, change the numZoomLevels etc etc
always failed, is there someone in the list who can help with this issue?

Kind Regards
Rosario Carbone
-- 
View this message in context: http://www.nabble.com/OpenStreetMap---trying-to-limit-zoom-levels-tp14320769p14320769.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list