pasichnykvasyl / Leaflet.BigImage

A leaflet plugin that allows users to receive a large map area and download it.
https://pasichnykvasyl.github.io/Leaflet.BigImage/
MIT License
80 stars 27 forks source link

MaxNativeZoom #18

Open MDrumm90 opened 2 years ago

MDrumm90 commented 2 years ago

The plugin does not work with maxNativeZoom and maxZoom settings. Open street maps have only tiles with max zoom 18. Therefore when someone use settings like:

var osmTiles = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';

//Create the basemap and add it to the map
osmLayer= L.tileLayer(osmTiles, {
    maxZoom: 30,
    maxNativeZoom: 18,
    opacity:0.6
});

The plugin will throw errors and search for wrong tiles (X, Y, Z are wrong) image

junewai1993 commented 9 months ago

Hi, @MDrumm90 do you able to solve this?