Skip to content

Commit f18de48

Browse files
committed
re-fix maxNativeZooom for pmtiles
1 parent b1d71bd commit f18de48

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### Change Log for Node-RED Worldmap
22

3+
- v5.5.1 - Fix maxNativeZoom for pmtiles to pull from tiles files. Issue #312
34
- v5.5.0 - Add ability to load raster pmtiles files. Issue #312
45
- v5.4.0 - Let msg.payload.command.zoomLevels set an array of acceptable zoom levels. Issue #312
56
- v5.3.0 - Let msg.payload.popupOptions object set Leaflet popup options so it can be customised. Issue #311

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Feel free to [![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%
1313

1414
### Updates
1515

16+
- v5.5.1 - Fix maxNativeZoom for pmtiles to pull from tiles files. Issue #312
1617
- v5.5.0 - Add ability to load raster pmtiles files. Issue #312
1718
- v5.4.0 - Let msg.payload.command.zoomLevels set an array of acceptable zoom levels. Issue #312
1819
- v5.3.0 - Let msg.payload.popupOptions object set Leaflet popup options so it can be customised. Issue #311
@@ -758,7 +759,7 @@ You can set some default options for the pmtiles by creating a file called **pmt
758759

759760
{
760761
"attribution": "Protomaps and OSM",
761-
"maxDataZoom": 15,
762+
"maxNativeZoom": 15,
762763
"maxZoom": 20,
763764
"theme": "dark"
764765
}

worldmap/worldmap.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2730,8 +2730,9 @@ function doCommand(cmd) {
27302730
const p = new pmtiles.PMTiles(cmd.map.pmtiles);
27312731
p.getHeader().then((h) => {
27322732
var opt = cmd.map.opt || {};
2733-
if (!opt.maxZoom) { opt.maxZoom = h.maxZoom || 20; }
2734-
opt.maxDataZoom = opt.maxDataZoom || 15;
2733+
if (!opt.minNativeZoom) { opt.minNativeZoom = h.minZoom || 5; }
2734+
if (!opt.maxNativeZoom) { opt.maxNativeZoom = h.maxZoom || 15; }
2735+
opt.maxZoom = opt.maxZoom || 20;
27352736
opt.attribution = opt.attribution || '© Protomaps & OSM';
27362737
if (!opt.paintRules && !opt.labelRules && !opt.backgroundColor && !opt.theme) {
27372738
opt.theme = "light"; // light, dark, white, black, grayscale

0 commit comments

Comments
 (0)