[OpenLayers-Dev] MinZoomLevel in OSM layer

christopher.schmidt at nokia.com christopher.schmidt at nokia.com
Sun Oct 31 10:37:10 EDT 2010


On Oct 31, 2010, at 8:16 AM, ext Andrea Pogliaghi wrote:

> Hi everybody,
> 
> I am having a problem in displaying an OSM layer with openlayers. Basically I want to cover a certain region and I want to limit the zoom between two levels (let's say 10 and 17). I investigated a bit in the matter but it seems OSM layer doesn't take into account the "minLevel" parameter, it only lets you set the overall max number of levels, but it always start from level 0.

Correct.

> I did some research and I found this: http://trac.osgeo.org/openlayers/ticket/2189.
> I applied the patch on my version of openlayers and now it seems working.
> I am wondering if there is a reason why the patch hasn't been applied in the codebase? Does the patch fix the issue but breaks something else?

Because the whole situation is a damn mess. We have a million different tile
layers, each of which has a slightly different set of code to change the min
zoom level, and the idea of making it worse by applying another monkey patch
to one layer that doesn't affect all the others makes me cringe, and I don't
really want to be the one to make it worse in that way.

I'd really just rather rewrite the entire way we solve this problem for OL3,
but I realize that isn't a real solution for most people.  I'm happy to have
another committer push this patch in, it just makes me twitch too much.

-- Chris

> thanks
> andrea
> 
> <ATT00001..txt>



More information about the Dev mailing list