node-red-contrib-web-worldmap 2.23.4 → 2.23.5
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 +1 -0
- package/README.md +6 -3
- package/package.json +1 -1
- package/worldmap/worldmap.js +4 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ map web page for plotting "things" on.
|
|
|
11
11
|
|
|
12
12
|
### Updates
|
|
13
13
|
|
|
14
|
+
- v2.23.5 - Fix addtoheatmap. Issue #192
|
|
14
15
|
- v2.23.4 - Fix opacity of area borders
|
|
15
16
|
- v2.23.3 - Fix initial load of maps
|
|
16
17
|
- v2.23.2 - Add convex-hull example
|
|
@@ -127,6 +128,7 @@ then rather than draw a point and icon it draws the polygon. If the "area" array
|
|
|
127
128
|
elements, then it assumes this is a bounding box for a rectangle and draws a rectangle.
|
|
128
129
|
|
|
129
130
|
Likewise if it contains a **line** property it will draw the polyline.
|
|
131
|
+
If the payload also includes a property `fit:true` the map will zoom to fit the line or area.
|
|
130
132
|
|
|
131
133
|
There are extra optional properties you can specify - see Options below.
|
|
132
134
|
|
|
@@ -230,14 +232,15 @@ Areas, Rectangles, Lines, Circles and Ellipses can also specify more optional pr
|
|
|
230
232
|
|
|
231
233
|
- **layer** : declares which layer you put it on.
|
|
232
234
|
- **color** : can set the colour of the polygon or line.
|
|
235
|
+
- **opacity** : the opacity of the line or outline.
|
|
233
236
|
- **fillColor** : can set the fill colour of the polygon.
|
|
234
237
|
- **fillOpacity** : can set the opacity of the polygon fill colour.
|
|
235
238
|
- **dashArray** : optional dash array for polyline.
|
|
236
239
|
- **clickable** : boolean - set to true to allow click to show popup.
|
|
237
240
|
- **popup** : html string to display in popup (as well as name).
|
|
238
|
-
- **editable** : boolean - set to true to allow simple edit/delete right click contextmenu
|
|
239
|
-
- **contextmenu** : html string to display a more complex right click contextmenu
|
|
240
|
-
- **weight** : the width of the line
|
|
241
|
+
- **editable** : boolean - set to true to allow simple edit/delete right click contextmenu.
|
|
242
|
+
- **contextmenu** : html string to display a more complex right click contextmenu.
|
|
243
|
+
- **weight** : the width of the line or outline.
|
|
241
244
|
|
|
242
245
|
Other properties can be found in the leaflet documentation.
|
|
243
246
|
|
package/package.json
CHANGED
package/worldmap/worldmap.js
CHANGED
|
@@ -1428,6 +1428,9 @@ function setMarker(data) {
|
|
|
1428
1428
|
if (!data.hasOwnProperty("opacity")) { opt.opacity = 0.8; }
|
|
1429
1429
|
var polyln = L.polyline(data.line, opt);
|
|
1430
1430
|
polygons[data.name] = rightmenu(polyln);
|
|
1431
|
+
if (data.hasOwnProperty("fit") && data.fit === true) {
|
|
1432
|
+
map.fitBounds(polygons[data.name].getBounds(),{padding:[50,50]})
|
|
1433
|
+
}
|
|
1431
1434
|
}
|
|
1432
1435
|
else if (data.hasOwnProperty("area") && Array.isArray(data.area)) {
|
|
1433
1436
|
var polyarea;
|
|
@@ -1994,7 +1997,7 @@ function setMarker(data) {
|
|
|
1994
1997
|
fb.action = "click";
|
|
1995
1998
|
ws.send(JSON.stringify(fb));
|
|
1996
1999
|
});
|
|
1997
|
-
if (heat && ((data.addtoheatmap
|
|
2000
|
+
if (heat && ((data.addtoheatmap != false) || (!data.hasOwnProperty("addtoheatmap")))) { // Added to give ability to control if points from active layer contribute to heatmap
|
|
1998
2001
|
if (heatAll || map.hasLayer(layers[lay])) { heat.addLatLng(lli); }
|
|
1999
2002
|
}
|
|
2000
2003
|
markers[data.name] = marker;
|