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

Function registerProjection

src/common/mapping/utils/epsg-define.js:16–25  ·  view source on GitHub ↗
(epsgKey, epsgValue, proj4 = proj4FromNpm)

Source from the content-addressed store, hash-verified

14}
15
16export function registerProjection(epsgKey, epsgValue, proj4 = proj4FromNpm) {
17 if (Object.prototype.toString.call(arguments[0]) === '[object Object]') {
18 const projections = arguments[0];
19 for (const epsgCode in projections) {
20 defineProjection(epsgCode, projections[epsgCode], proj4);
21 }
22 return;
23 }
24 defineProjection(epsgKey, epsgValue, proj4);
25}
26
27export function getProjection(epsgKey, proj4 = proj4FromNpm) {
28 if (!proj4.defs(epsgKey)) {

Callers 4

epsgDefineSpec.jsFile · 0.90
getLayerFeaturesMethod · 0.90
getProjectionFunction · 0.85

Calls 1

defineProjectionFunction · 0.85

Tested by

no test coverage detected