Customize zoom level in browser?

I was looking at a bit of the OSM map and one zoom level showed my area of interest too small, while the next zoom level up was so zoomed in that I couldn’t fit the two locations I was interested in on the page at the same time.

Is there a way you can get a user-specified zoom level?

I’m using Opera 48 as my browser but I think the question would apply to any browser.

Only by creating your own map tiles, see recent postings on that subject.

What you are seeing is not the map, but rendered bit map images derived from the map. In the case of the standard rendering, all except the highest zoom level are pre-computed. for the other options, they are probably all pre-computed.

The name of the tile includes the zoom level, and the corner coordinates, and you can only request tiles that match the coordinates and zoom levels known to the system.

There is an option to export PDF, which will give you a scalable image, but the zoom levels still determine whether or not features are included. I think the PDFs are all generated on the fly.

Also note that the rendered maps are there to help mappers and as proofs of concept. OSM does not have the resources or funding to support end user map services similar to Google or Bing.

What zoom level are you looking for and where?

The “Humanitarian” layer is available on OpenStreetMap.org to zoom 20. OSM’s “standard” layer and the Humanitarian layer both use technology that’s limited to zoom 20. Other options using other technologies may be available in other locations. For example, I made a fork of “mod_tile” at https://github.com/SomeoneElseOSM/mod_tile/tree/zoom that handles up to zoom 24 http://www.openstreetmap.org/user/SomeoneElse/diary/39423 and render tiles for the UK and Ireland based on that.

I think that the OP’s problem is not the maximum zoom but the 2:1 ratio between zoom levels.

Leafet supports fractional zoom levels: http://leafletjs.com/examples/zoom-levels/ , so it’d be possible to do something with that. Tiles still have whole number zooms, but Leaflet scales these to match the fractional zoom level desired.

There’s one other thing to mention - many map styles don’t have sizes for everything at every zoom level. For example, look at the road widths here:

https://github.com/gravitystorm/openstreetmap-carto/blob/5aef1d5c7eb59a8796516623cb69d6a16b8781ec/roads.mss#L99

There are fewer z14 values than z13 and z15 ones, which means that you’ll see a single “jump” in size between z15 and z13 rather than 2, and that single jump will be larger, which makes the effect you’re seeing even worse.

To summarise this:

o If you created your own leaflet-based website (but not necessarily your own tiles) you could use fractional zooms which would remove some of the effect that you’re seeing, but:

o you’d probably need to change the underlying map style as well to support all zoom levels for more things to eliminate some of the “not all zoom levels catered for” effects.