refs #16 modify cloneLatLng to avoid alt and time loss when L.draw makes layer backups (cancel edition was provoking losses)
parent
814c681e60
commit
daa3597e70
|
@ -2829,7 +2829,14 @@ L.LatLngUtil = {
|
|||
// @method cloneLatLng(LatLng): L.LatLng
|
||||
// Clone the latLng and return a new LatLng object.
|
||||
cloneLatLng: function (latlng) {
|
||||
return L.latLng(latlng.lat, latlng.lng);
|
||||
var ll = L.latLng(latlng.lat, latlng.lng);
|
||||
if (latlng.alt) {
|
||||
ll.alt = latlng.alt;
|
||||
}
|
||||
if (latlng.time) {
|
||||
ll.time = latlng.time;
|
||||
}
|
||||
return ll;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -4384,4 +4391,4 @@ L.EditToolbar.Delete = L.Handler.extend({
|
|||
|
||||
|
||||
}(window, document));
|
||||
//# sourceMappingURL=leaflet.draw-src.map
|
||||
//# sourceMappingURL=leaflet.draw-src.map
|
||||
|
|
Loading…
Reference in New Issue