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

Function transformCoodinates

src/common/mapping/utils/epsg-define.js:63–69  ·  view source on GitHub ↗
({ coordinates, sourceProjection, destProjection = 'EPSG:4326', proj4 = proj4FromNpm })

Source from the content-addressed store, hash-verified

61}
62
63export function transformCoodinates({ coordinates, sourceProjection, destProjection = 'EPSG:4326', proj4 = proj4FromNpm }) {
64 try {
65 return proj4(sourceProjection, destProjection, coordinates);
66 } catch (error) {
67 throw `${error} is not defined`;
68 }
69}
70
71export function getEpsgCodeInfo(epsgCode, iPortalUrl) {
72 const espgNum = epsgCode.replace(/^EPSG:/, '');

Callers 3

epsgDefineSpec.jsFile · 0.90
_unprojectMethod · 0.90
transformCoordinateFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected