MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / latLngToCoords

Function latLngToCoords

libs/leaflet/leaflet-src.js:9164–9169  ·  view source on GitHub ↗
(latlng, precision)

Source from the content-addressed store, hash-verified

9162 // Reverse of [`coordsToLatLng`](#geojson-coordstolatlng)
9163 // Coordinates values are rounded with [`formatNum`](#util-formatnum) function.
9164 function latLngToCoords(latlng, precision) {
9165 latlng = toLatLng(latlng);
9166 return latlng.alt !== undefined ?
9167 [formatNum(latlng.lng, precision), formatNum(latlng.lat, precision), formatNum(latlng.alt, precision)] :
9168 [formatNum(latlng.lng, precision), formatNum(latlng.lat, precision)];
9169 }
9170
9171 // @function latLngsToCoords(latlngs: Array, levelsDeep?: Number, closed?: Boolean, precision?: Number|false): Array
9172 // Reverse of [`coordsToLatLngs`](#geojson-coordstolatlngs)

Callers 2

latLngsToCoordsFunction · 0.85
leaflet-src.jsFile · 0.85

Calls 2

formatNumFunction · 0.85
toLatLngFunction · 0.70

Tested by

no test coverage detected