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
|
// @method cloneLatLng(LatLng): L.LatLng
|
||||||
// Clone the latLng and return a new LatLng object.
|
// Clone the latLng and return a new LatLng object.
|
||||||
cloneLatLng: function (latlng) {
|
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;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue