1/** 2 * @class L.LatLngUtil 3 * @aka LatLngUtil 4 */ 5L.LatLngUtil = { 6 // Clones a LatLngs[], returns [][] 7 8 // @method cloneLatLngs(LatLngs[]): L.LatLngs[] 9 // Clone the latLng point or points or nested points and return an array with those points 10 cloneLatLngs: function (latlngs) { 11 var clone = []; 12 for (var i = 0, l = latlngs.length; i < l; i++) { 13 // Check for nested array (Polyline/Polygon) 14 if (Array.isArray(latlngs[i])) { 15 clone.push(L.LatLngUtil.cloneLatLngs(latlngs[i])); 16 } else { 17 clone.push(this.cloneLatLng(latlngs[i])); 18 } 19 } 20 return clone; 21 }, 22 23 // @method cloneLatLng(LatLng): L.LatLng 24 // Clone the latLng and return a new LatLng object. 25 cloneLatLng: function (latlng) { 26 return L.latLng(latlng.lat, latlng.lng); 27 } 28};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.