From b881ca0f303fc2261a325035aed12affc8c3f1b5 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Wed, 29 Nov 2023 11:03:08 +0000 Subject: [PATCH] Load pmtiles from userdir rather than node_modules to survive an upgrade Bump to 4.5.0 --- CHANGELOG.md | 1 + README.md | 3 ++- package.json | 2 +- worldmap.html | 40 ++++++++++++++++++++-------------------- worldmap.js | 12 ++++++++++-- 5 files changed, 34 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e6b769..2187047 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### Change Log for Node-RED Worldmap + - v4.5.0 - Fix pmtiles to look for maps in userdir rather than modules - v4.4.0 - Add quad(copter) drone icon. - v4.3.3 - Fix for objects changing layers. - v4.3.2 - Fix geojson popup missing label name. diff --git a/README.md b/README.md index 25bb5f6..059e674 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ Feel free to [![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D% ### Updates +- v4.5.0 - Fix pmtiles to look for maps in userdir rather than modules - v4.4.0 - Add quad(copter) drone icon. - v4.3.3 - Fix for objects changing layers. - v4.3.2 - Fix geojson popup missing label name. @@ -720,7 +721,7 @@ You can use a PMtiles format map archive file from [Protomaps](https://docs.prot **Note**: the whole planet file is over 100GB so be warned both for local storage and your download speed. You can download or extract just a portion of it if you use the **pmtiles** command line with the extract option. Use `pmtiles extract --help` to see the options. -Copy, or create an alias to, your .pmtiles file(s) into your `~/.node-red/node_modules/node-red-contrib-web-worldmap/worldmap/` directory. On re-starting Node-RED the node will detect the file(s) and add them to the base map layer menu, using the file name as the layer name. +Copy your .pmtiles file(s) into your `~/.node-red` user directory. On re-starting Node-RED the node will detect the file(s) and add them to the base map layer menu, using the file name as the layer name. ### Using a Docker Map Server diff --git a/package.json b/package.json index 69c565f..8f05e3e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-web-worldmap", - "version": "4.4.0", + "version": "4.5.0", "description": "A Node-RED node to provide a web page of a world map for plotting things on.", "dependencies": { "@turf/bezier-spline": "~6.5.0", diff --git a/worldmap.html b/worldmap.html index 940cad3..2e9c979 100644 --- a/worldmap.html +++ b/worldmap.html @@ -1,4 +1,8 @@ @@ -155,6 +155,10 @@ If Web Path is left empty, then by default ⌘⇧m - c @@ -593,6 +593,10 @@ If Web Path is left empty, then by default ⌘⇧m - c