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

Function setProj

src/leaflet/mapping/initMap.js:159–164  ·  view source on GitHub ↗

* @private * @function setProj * @description 注册4214 4610 4490等投影。 * @param {string} epsgCodeStr - epsgCode。 * @param {string} initMapService - InitMapServiceBase 实例。

(epsgCodeStr, initMapService)

Source from the content-addressed store, hash-verified

157 * @param {string} initMapService - InitMapServiceBase 实例。
158 */
159async function setProj(epsgCodeStr, initMapService) {
160 if (!hasRegisterProj(epsgCodeStr, false)) {
161 const def = await initMapService.getWKT();
162 def && proj4.defs(epsgCodeStr, def);
163 }
164}
165
166/**
167 * @private

Callers 1

initMapFunction · 0.85

Calls 2

hasRegisterProjFunction · 0.85
getWKTMethod · 0.45

Tested by

no test coverage detected