Skip to content

Commit 592a8ea

Browse files
authored
fix: use minZoom instead of minNativeZoom (#1150)
* fix: use minZoom instead of minNativeZoom By setting `minNativeZoom` we were constructing low zoom tiles from many higher-zoom tile requests! This is not the intended effect of the minzoom setting. We can still overzoom by using maxNativeZoom. * update changelog
1 parent 47c7fb1 commit 592a8ea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* add `/preview/{width}x{height}.{format}` endpoints
1111
* update rio-tiler requirement to `>=7.7,<8.0`
1212
* allow users to pass only one of `width` or `heigh` size parameters for `preview`, `part` and `feature` requests
13+
* use `minZoom` instead of `minNativeZoom` in the `/map.html` html template
1314

1415
### titiler.application
1516

src/titiler/core/titiler/core/templates/map.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
const tileLayer = L.tileLayer(
207207
data.tiles[0], {
208208
maxNativeZoom: data.maxzoom,
209-
minNativeZoom: data.minzoom,
209+
minZoom: data.minzoom,
210210
bounds: L.latLngBounds([bottom, left], [top, right]),
211211
}
212212
);
@@ -221,7 +221,7 @@
221221
.catch(err => {
222222
console.warn(err);
223223
});
224-
224+
225225
// run point query on right-click
226226
map.on('contextmenu', function(e) {
227227
const lat = e.latlng.lat.toFixed(3);
@@ -285,7 +285,6 @@
285285
}
286286
});
287287
});
288-
289288
</script>
290289
</body>
291290
</html>

0 commit comments

Comments
 (0)