Commit f4fadffb authored by JOE XMG's avatar JOE XMG
Browse files

update

parent abe537c0
Pipeline #6174 passed with stage
in 6 seconds
This diff is collapsed.
/**
* @class L.LatLngUtil
* @aka LatLngUtil
*/
L.LatLngUtil = {
// Clones a LatLngs[], returns [][]
// @method cloneLatLngs(LatLngs[]): L.LatLngs[]
// Clone the latLng point or points or nested points and return an array with those points
cloneLatLngs: function (latlngs) {
var clone = [];
for (var i = 0, l = latlngs.length; i < l; i++) {
// Check for nested array (Polyline/Polygon)
if (Array.isArray(latlngs[i])) {
clone.push(L.LatLngUtil.cloneLatLngs(latlngs[i]));
} else {
clone.push(this.cloneLatLng(latlngs[i]));
}
}
return clone;
},
// @method cloneLatLng(LatLng): L.LatLng
// Clone the latLng and return a new LatLng object.
cloneLatLng: function (latlng) {
return L.latLng(latlng.lat, latlng.lng);
}
};
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment