diff --git a/README.md b/README.md
index 12a7e11..b573b5a 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,7 @@ map web page for plotting "things" on.
### Updates
+- v1.5.15 - Allow setting clusterAt to 0 to fully disable it - Issue #61
- v1.5.14 - Stop delete marker feedback to allow updating multiple maps - Issue #59
- v1.5.13 - Send click message to websocket on marker click - Issue #56, #57
- v1.5.11 - Let search also try geocoding lookup if not found in marks.
diff --git a/package.json b/package.json
index 5aefb30..03ec294 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "node-red-contrib-web-worldmap",
- "version": "1.5.14",
+ "version": "1.5.15",
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
"dependencies": {
"cgi": "0.3.1",
diff --git a/worldmap.html b/worldmap.html
index 01b97e6..95a69d9 100644
--- a/worldmap.html
+++ b/worldmap.html
@@ -76,7 +76,7 @@
-
diff --git a/worldmap/index.html b/worldmap/index.html
index 17ec47b..0ae47d0 100644
--- a/worldmap/index.html
+++ b/worldmap/index.html
@@ -880,7 +880,11 @@ var delMarker = function(dname,note) {
// the MAIN add something to map function
function setMarker(data) {
//console.log("DATA",typeof data, data);
- data = allData[data.name] = Object.assign(allData[data.name]||{},data);
+ if (data.deleted) { // remove markers we are told to
+ delMarker(data.name);
+ return;
+ }
+ data = allData[data.name] = Object.assign(allData[data.name] || {}, data);
var ll;
var lli = null;
var opt = {};
@@ -908,13 +912,17 @@ function setMarker(data) {
}
var lay = data.layer || "unknown";
if (typeof layers[lay] == "undefined") { // add layer if if doesn't exist
- //layers[lay] = new L.LayerGroup();
- layers[lay] = new L.MarkerClusterGroup({
- maxClusterRadius:50,
- spiderfyDistanceMultiplier:1.8,
- disableClusteringAtZoom:clusterAt
- //zoomToBoundsOnClick:false
- });
+ if (clusterAt > 0) {
+ layers[lay] = new L.MarkerClusterGroup({
+ maxClusterRadius:50,
+ spiderfyDistanceMultiplier:1.8,
+ disableClusteringAtZoom:clusterAt
+ //zoomToBoundsOnClick:false
+ });
+ }
+ else {
+ layers[lay] = new L.LayerGroup();
+ }
overlays[lay] = layers[lay];
if (showLayerMenu !== false) {
layercontrol.addOverlay(layers[lay],lay);
@@ -929,10 +937,7 @@ function setMarker(data) {
}
if (typeof polygons[data.name] != "undefined") { layers[lay].removeLayer(polygons[data.name]); }
- if (data.deleted) { // remove markers we are told to
- delMarker(data.name);
- }
- else if (data.hasOwnProperty("line") && Array.isArray(data.line)) {
+ if (data.hasOwnProperty("line") && Array.isArray(data.line)) {
delete opt.fill;
if (!data.hasOwnProperty("weight")) { opt.weight = 3; } //Standard settings different for lines
if (!data.hasOwnProperty("opacity")) { opt.opacity = 0.8; }
@@ -1194,7 +1199,7 @@ function setMarker(data) {
// send new position at end of move event if point is draggable
if (data.draggable === true) {
if (data.icon) { marker.icon = data.icon; }
- if (data.iconCOlor) { marker.iconColor = data.iconColor; }
+ if (data.iconColor) { marker.iconColor = data.iconColor; }
if (data.SIDC) { marker.SIDC = data.SIDC.toUpperCase(); }
marker.on('dragend', function (e) {
var l = marker.getLatLng().toString().replace('LatLng(','lat, lon : ').replace(')','')
diff --git a/worldmap/worldmap.appcache b/worldmap/worldmap.appcache
index a233238..2805fab 100644
--- a/worldmap/worldmap.appcache
+++ b/worldmap/worldmap.appcache
@@ -1,5 +1,5 @@
CACHE MANIFEST
-# date: Dec 12th 2018 - v1.5.14
+# date: Dec 22nd 2018 - v1.5.15
CACHE:
index.html