node-red-contrib-web-worldmap 2.21.2 → 2.21.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  ### Change Log for Node-RED Worldmap
2
2
 
3
+ - v2.21.3 - Add zoom to bounds action. Adjust map layers max zoom levels.
4
+ - v2.21.2 - Expand ship nav to ship navigation.
3
5
  - v2.21.1 - Fix ui check callback to not use .
4
6
  - v2.21.0 - Let config panel select maps to show, default map and choice of overlays.
5
7
  - v2.20.0 - Add support of .pbf map layers. Issue #123.
package/README.md CHANGED
@@ -11,6 +11,8 @@ map web page for plotting "things" on.
11
11
 
12
12
  ### Updates
13
13
 
14
+ - v2.21.3 - Add zoom to bounds action. Adjust map layers max zoom levels.
15
+ - v2.21.2 - Expand ship nav to ship navigation.
14
16
  - v2.21.1 - Fix ui check callback to not use .
15
17
  - v2.21.0 - Let config panel select maps to show, default map and choice of overlays.
16
18
  - v2.20.0 - Add support of .pbf map layers. Issue 123.
@@ -31,12 +33,6 @@ map web page for plotting "things" on.
31
33
  - v2.15.3 - Fix panit command to work, try to use alt units, popup alignments.
32
34
  - v2.15.0 - Let speed be text and specify units if required (kt,kn,knots,mph,kmh,kph) default m/s.
33
35
  - v2.14.0 - Let geojson features be clickable if added as overlay.
34
- - v2.13.4 - Fix list of map choices to be in sync. Fix popup auto sizing.
35
- - v2.13.3 - Fix unchanged layer propagation.
36
- - v2.13.2 - Add mayflower icon.
37
- - v2.13.0 - Tidy velocity layer. Feedback any url parameters.
38
- - v2.12.1 - Only show online layer options if we are online.
39
- - v2.12.0 - Add live rainfall radar data layer. Remove some non-loading overlays.
40
36
 
41
37
  - see [CHANGELOG](https://github.com/dceejay/RedMap/blob/master/CHANGELOG.md) for full list of changes.
42
38
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-web-worldmap",
3
- "version": "2.21.2",
3
+ "version": "2.21.3",
4
4
  "description": "A Node-RED node to provide a web page of a world map for plotting things on.",
5
5
  "dependencies": {
6
6
  "@turf/bezier-spline": "~6.5.0",
@@ -593,7 +593,7 @@ map.on('baselayerchange', function(e) {
593
593
  });
594
594
 
595
595
  function showMapCurrentZoom() {
596
- //console.log("zoom:",map.getZoom());
596
+ //console.log("ZOOM:",map.getZoom());
597
597
  for (var l in layers) {
598
598
  if (layers[l].hasOwnProperty("_zoom")) {
599
599
  if (map.getZoom() >= clusterAt) {
@@ -635,12 +635,12 @@ map.on('zoomend', function() {
635
635
  showMapCurrentZoom();
636
636
  window.localStorage.setItem("lastzoom", map.getZoom());
637
637
  var b = map.getBounds();
638
- ws.send(JSON.stringify({action:"bounds", south:b._southWest.lat, west:b._southWest.lng, north:b._northEast.lat, east:b._northEast.lng }));
638
+ ws.send(JSON.stringify({action:"bounds", south:b._southWest.lat, west:b._southWest.lng, north:b._northEast.lat, east:b._northEast.lng, zoom:map.getZoom() }));
639
639
  });
640
640
  map.on('moveend', function() {
641
641
  window.localStorage.setItem("lastpos",JSON.stringify(map.getCenter()));
642
642
  var b = map.getBounds();
643
- ws.send(JSON.stringify({action:"bounds", south:b._southWest.lat, west:b._southWest.lng, north:b._northEast.lat, east:b._northEast.lng }));
643
+ ws.send(JSON.stringify({action:"bounds", south:b._southWest.lat, west:b._southWest.lng, north:b._northEast.lat, east:b._northEast.lng, zoom:map.getZoom() }));
644
644
  });
645
645
 
646
646
  //map.on('contextmenu', function(e) {
@@ -735,7 +735,7 @@ var addBaseMaps = function(maplist,first) {
735
735
  //console.log("MAPS",first,maplist)
736
736
  if (navigator.onLine) {
737
737
  var layerlookup = { OSMG:"OSM grey", OSMC:"OSM", OSMH:"OSM Humanitarian", EsriC:"Esri", EsriS:"Esri Satellite",
738
- EsriT:"Esri Topography", EsriO:"Esri Ocean", EsriDG:"Esri Dark Grey", NatGeo: "National Geographic",
738
+ EsriR:"Esri Relief", EsriT:"Esri Topography", EsriO:"Esri Ocean", EsriDG:"Esri Dark Grey", NatGeo: "National Geographic",
739
739
  UKOS:"UK OS OpenData", UKOS45:"UK OS 1919-1947", UKOS00:"UK OS 1900", OpTop:"Open Topo Map",
740
740
  HB:"Hike Bike OSM", ST:"Stamen Topography", SW: "Stamen Watercolor", AN:"AutoNavi (Chinese)" }
741
741
 
@@ -794,21 +794,24 @@ var addBaseMaps = function(maplist,first) {
794
794
  if (maplist.indexOf("EsriR")!==-1) {
795
795
  basemaps[layerlookup["EsriR"]] = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}', {
796
796
  attribution:'Tiles © Esri',
797
- maxNativeZoom:13
797
+ maxNativeZoom:13,
798
+ maxZoom:16
798
799
  });
799
800
  }
800
801
 
801
802
  if (maplist.indexOf("EsriO")!==-1) {
802
803
  basemaps[layerlookup["EsriO"]] = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/tile/{z}/{y}/{x}', {
803
804
  attribution:'Tiles © Esri — Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri',
804
- maxNativeZoom:13
805
+ maxNativeZoom:10,
806
+ maxZoom:13
805
807
  });
806
808
  }
807
809
 
808
810
  if (maplist.indexOf("EsriDG")!==-1) {
809
811
  basemaps[layerlookup["EsriDG"]] = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}', {
810
812
  attribution: 'Tiles © Esri — Esri, DeLorme, NAVTEQ',
811
- maxNativeZoom:13
813
+ maxNativeZoom:16,
814
+ maxZoom:18
812
815
  });
813
816
  }
814
817