MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / registerProj

Function registerProj

src/openlayers/mapping/InitMap.js:130–139  ·  view source on GitHub ↗
(epsgCode, wkt, bounds)

Source from the content-addressed store, hash-verified

128}
129
130function registerProj(epsgCode, wkt, bounds) {
131 const extent = [bounds.left, bounds.bottom, bounds.right, bounds.top];
132 let epsgCodeStr = `EPSG:${epsgCode}`;
133 !get(epsgCodeStr) && proj4.defs(epsgCodeStr, wkt);
134 if (olProj4 && olProj4.register) {
135 olProj4.register(proj4);
136 var prj = get(epsgCodeStr);
137 prj.setExtent(extent);
138 }
139}
140
141function createLayer(url, result, sourceOptions, layerOptions) {
142 let options = TileSuperMapRest.optionsFromMapJSON(url, result, true);

Callers 1

initMapFunction · 0.85

Calls 3

registerMethod · 0.80
getFunction · 0.50
setExtentMethod · 0.45

Tested by

no test coverage detected