We're using the leaflet JavaScript API with a tile layer which supports zoom level up to 19. I'd like users to be able to zoom further even if the tiles blur as they have to place markers to a high degree of accuracy.

Is this possible ?

We want the map to zoom not the markers or other elements.

up vote 17 down vote accepted

You can do it now, as of version 0.7 there is an additional option called 'maxNativeZoom' after which it will interpolate tiles.

Here's a link to the latest documentation for maxNativeZoom

Here's the info:

minZoom Number  0   Minimum zoom number.
maxZoom Number  18  Maximum zoom number.
maxNativeZoom   Number  null    Maximum zoom number the tiles source has available. If it is specified, the tiles on all zoom levels higher than maxNativeZoom will be loaded from maxZoom level and auto-scaled.

A code example that I use to achieve it is here:

var aerial = new L.tileLayer(serverURL + "/arcgis/rest/services/Basemaps/Orthophoto/ImageServer/tile/{z}/{y}/{x}", {
    attribution: attribution,
    maxZoom: 20,
    maxNativeZoom: 18
});
  • 1
    perfect solution – ajayel Nov 28 '13 at 19:38

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.