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

Function defineProjection

src/common/mapping/utils/epsg-define.js:5–14  ·  view source on GitHub ↗
(epsgCode, projection, proj4)

Source from the content-addressed store, hash-verified

3import { transformServerUrl } from './util';
4
5function defineProjection(epsgCode, projection, proj4) {
6 if (proj4.defs(epsgCode)) {
7 return;
8 }
9 if (!projection) {
10 console.error(`${epsgCode} not define`);
11 return;
12 }
13 proj4.defs(epsgCode, projection);
14}
15
16export function registerProjection(epsgKey, epsgValue, proj4 = proj4FromNpm) {
17 if (Object.prototype.toString.call(arguments[0]) === '[object Object]') {

Callers 1

registerProjectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected