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

The Bun rosario.carbone at ipl.com
Fri Dec 14 09:29:24 EST 2007


 >  I have done this by having an array of zoom max/mins and then I control
my own layer list in a form. It’s a long winded way but it works for me.
 >  Have a look at http://demo.cubewerx.com.au/osdm/interopdemo.html

Thanks Bradley

Yours is a solution but I preferred aesthetically adopt a different one. For
TMS you need to implement a function which is defined in the getURL
parameter, in my case is get_osm_url, there I check the zoom level and if it
is less than 9 I force this.map.zoomTo(minZoom); if it is bigger than 16 I
force this.map.zoomTo(manZoom); and also I set the zoom level of the tiles I
get again so the effect for the user is that nothing happen and he cannot
got over the maximum and below the minimum.

Ideally he shouldn't see the zooming level not implemented but seems it is
not possible.



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




More information about the Users mailing list