Fix missing drawing type property

to close #213
This commit is contained in:
Dave Conway-Jones 2022-11-22 14:26:52 +00:00
parent 89569f5827
commit ed728eb4db
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
3 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
### Change Log for Node-RED Worldmap
- v2.31.1 - Fix missing type property for drawings. Issue #213
- v2.31.0 - Better handling of KML files. Issue #211
- v2.30.3 - Fix for iframe height. Issue #210

View File

@ -11,6 +11,7 @@ map web page for plotting "things" on.
### Updates
- v2.31.1 - Fix missing type property for drawings. Issue #213
- v2.31.0 - Better handling of KML files. Issue #211
- v2.30.3 - Fix for iframe height. Issue #210
- v2.30.2 - Fix for bad handling of mapbox id. Issue #208

View File

@ -1015,7 +1015,7 @@ var addOverlays = function(overlist) {
else {
cent = e.layer.getBounds().getCenter();
}
var m = {action:"draw", name:name, layer:"_drawing", options:e.layer.options, radius:e.layer._mRadius, lat:la, lon:lo};
var m = {action:"draw", name:name, type:e.layerType, layer:"_drawing", options:e.layer.options, radius:e.layer._mRadius, lat:la, lon:lo};
if (e.layer.hasOwnProperty("_latlngs")) {
if (e.layer.options.fill === false) { m.line = e.layer._latlngs; }
else { m.area = e.layer._latlngs[0]; }