Search code examples
mapsopenlayerszooming

OpenLayers MinZoomLevel


I want to set the MinZoomLevel for a OpenLayers-map with a Zoomify layer. But it doesn't work. It has no effects whether I put it to the map-options or to the layer options. Further it seems to me, that it only works with FixedZoomLayers but I need it with a zoomify-layer.


Solution

  • Got it at netzwolf.info/kartografie/openlayers/restrictedzoom2.htm

    There is a patch to restrict the zoom between a min/max-level and a "hack" for the correct panZoomBar. But it seems that last one doesn't fits for release 2.12.

    I've changed it a bit: http://pastebin.com/yuVT0tEF

    And here is the Patch: http://pastebin.com/wh9rE3Pv