diff --git a/CHANGELOG.md b/CHANGELOG.md
index ba60556..f7da07d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
### Change Log for Node-RED Worldmap
+ - v2.23.1 - Fix saving of custom map layer
- v2.23.0 - Give logo and id so it can be overridden by toplogo command. PR #188.
- v2.22.3 - Don't show empty popup for geojson object. Issue #186. Add wobble to null island.
- v2.22.2 - Be more tolerant of speed string types
diff --git a/README.md b/README.md
index 0844c4a..dd05615 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,7 @@ map web page for plotting "things" on.
### Updates
+- v2.23.1 - Fix saving of custom map layer
- v2.23.0 - Give logo and id so it can be overridden by toplogo command. PR #188.
- v2.22.3 - Don't show empty popup for geojson object. Issue #186. Add wobble to null island.
- v2.22.2 - Be more tolerant of speed string types
diff --git a/package.json b/package.json
index fc8ea6a..3c45154 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "node-red-contrib-web-worldmap",
- "version": "2.23.0",
+ "version": "2.23.1",
"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 410825a..eb145dc 100644
--- a/worldmap.html
+++ b/worldmap.html
@@ -383,6 +383,7 @@ If Web Path is left empty, then by default ⌘⇧m
- c
return 'The map can be found [here]('+RED.settings.httpNodeRoot.slice(0,-1)+this.path+').';
},
oneditprepare: function() {
+ var mshort;
if (this.maplist === undefined) {
$("#node-input-maplist").val("OSMG,OSMC,EsriC,EsriS,EsriT,EsriO,EsriDG,NatGeo,UKOS,OpTop,SW");
this.maplist = "OSMG,OSMC,EsriC,EsriS,EsriT,EsriO,EsriDG,NatGeo,UKOS,OpTop,SW";
@@ -398,7 +399,7 @@ If Web Path is left empty, then by default ⌘⇧m
- c
}]});
$("#node-input-layer").typedInput({type:"laye", types:[{
value: "laye",
- options: mlist
+ options: mshort
}]});
$("#node-input-overlist").typedInput({type:"overlay", types:[{
value: "overlay",
@@ -406,7 +407,7 @@ If Web Path is left empty, then by default ⌘⇧m
- c
options: olist
}]});
$("#node-input-maplist").on('change', function(event, type, value) {
- var mshort = mlist.filter(e => value.indexOf(e.value)!==-1);
+ mshort = mlist.filter(e => value.indexOf(e.value)!==-1);
mshort.push({ value:"Custom", label:"Custom Map Provider" });
$("#node-input-layer").typedInput("types", [{
value: "laye",
@@ -493,6 +494,7 @@ If Web Path is left empty, then by default ⌘⇧m
- c
return this.name?"node_label_italic":"";
},
oneditprepare: function() {
+ var mshort;
if (this.maplist === undefined) {
$("#node-input-maplist").val("OSMG,OSMC,EsriC,EsriS,EsriT,EsriO,EsriDG,NatGeo,UKOS,OpTop,SW");
this.maplist = "OSMG,OSMC,EsriC,EsriS,EsriT,EsriO,EsriDG,NatGeo,UKOS,OpTop,SW";
@@ -508,7 +510,7 @@ If Web Path is left empty, then by default ⌘⇧m
- c
}]});
$("#node-input-layer").typedInput({type:"laye", types:[{
value: "laye",
- options: mlist
+ options: mshort
}]});
$("#node-input-overlist").typedInput({type:"overlay", types:[{
value: "overlay",
@@ -516,7 +518,7 @@ If Web Path is left empty, then by default ⌘⇧m
- c
options: olist
}]});
$("#node-input-maplist").on('change', function(event, type, value) {
- var mshort = mlist.filter(e => value.indexOf(e.value)!==-1);
+ mshort = mlist.filter(e => value.indexOf(e.value)!==-1);
mshort.push({ value:"Custom", label:"Custom Map Provider" });
$("#node-input-layer").typedInput("types", [{
value: "laye",
diff --git a/worldmap/worldmap.js b/worldmap/worldmap.js
index 2d47b94..6cf7542 100644
--- a/worldmap/worldmap.js
+++ b/worldmap/worldmap.js
@@ -673,7 +673,7 @@ var addThing = function() {
var hdg = parseFloat(bits[4] || 0);
var drag = true;
var regi = /^[S,G,E,I,O][A-Z]{3}.*/i; // if it looks like a SIDC code
- var d = {action:"point", name:bits[0].trim(), layer:lay, draggable:drag, lat:rclk.lat, lon:rclk.lng, hdg:hdg};
+ var d = {action:"point", name:bits[0].trim(), layer:lay, draggable:drag, lat:rclk.lat, lon:rclk.lng, hdg:hdg, ttl:0 };
if (regi.test(icon)) {
d.SIDC = (icon.toUpperCase()+"------------").substr(0,12);
}