better handle random geojson

This commit is contained in:
Dave Conway-Jones 2020-05-06 15:52:20 +01:00
parent bea77d3d39
commit 8ec7a623c9
No known key found for this signature in database
GPG Key ID: 302A6725C594817F
4 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
### Change Log for Node-RED Worldmap
- v2.3.9 - improve geojson layer and name handling.
- v2.3.10 - improve geojson layer and name handling.
- v2.3.8 - fix fa-marker offset to improve accuracy.
- v2.3.7 - show icon within circle if icon present. Issue #128
- v2.3.6 - show ruler if grid is turned on.

View File

@ -11,7 +11,7 @@ map web page for plotting "things" on.
### Updates
- v2.3.9 - improve geojson layer and name handling.
- v2.3.10 - improve geojson layer and name handling.
- v2.3.8 - fix fa-marker offset to improve accuracy.
- v2.3.7 - show icon within circle if icon present. Issue #128
- v2.3.6 - show ruler if grid is turned on.

View File

@ -1,6 +1,6 @@
{
"name": "node-red-contrib-web-worldmap",
"version": "2.3.9",
"version": "2.3.10",
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
"dependencies": {
"cgi": "0.3.1",

View File

@ -2082,6 +2082,8 @@ function doGeojson(n,g,l,o) {
markers[n].lay = lay;
if (typeof layers[lay] == "undefined") { // add layer if if doesn't exist
layers[lay] = new L.LayerGroup();
overlays[lay] = layers[lay];
layercontrol.addOverlay(overlays[lay],lay);
}
layers[lay].addLayer(markers[n]);
map.addLayer(layers[lay]);