MCPcopy Create free account
hub / github.com/facebook/Rapid / decimalCoordinatePair

Method decimalCoordinatePair

modules/core/LocalizationSystem.js:849–855  ·  view source on GitHub ↗

* Returns the given coordinate pair in decimal format. * note: unlocalized to avoid comma ambiguity - see iD#4765 * @param {Array } coord - longitude and latitude * @return {string} Text to display

(coord)

Source from the content-addressed store, hash-verified

847 * @return {string} Text to display
848 */
849 decimalCoordinatePair(coord) {
850 const OSM_PRECISION = 7;
851 return this.t('units.coordinate_pair', {
852 latitude: numClamp(coord[1], -90, 90).toFixed(OSM_PRECISION),
853 longitude: numWrap(coord[0], -180, 180).toFixed(OSM_PRECISION)
854 });
855 }
856
857
858 /**

Callers 2

renderMethod · 0.80
renderMethod · 0.80

Calls 1

tMethod · 0.95

Tested by

no test coverage detected