Fix missing drawing type property

to close #213
pull/215/head
Dave Conway-Jones 2 years ago
parent 89569f5827
commit ed728eb4db
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF

@ -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

@ -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

@ -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]; }

Loading…
Cancel
Save