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

Function createLayer

src/openlayers/mapping/InitMap.js:141–150  ·  view source on GitHub ↗
(url, result, sourceOptions, layerOptions)

Source from the content-addressed store, hash-verified

139}
140
141function createLayer(url, result, sourceOptions, layerOptions) {
142 let options = TileSuperMapRest.optionsFromMapJSON(url, result, true);
143 options = { ...options, ...sourceOptions };
144 var source = new TileSuperMapRest(options);
145 var layer = new Tile({
146 source,
147 ...layerOptions
148 });
149 return { layer, source };
150}

Callers 1

initMapFunction · 0.85

Calls 1

optionsFromMapJSONMethod · 0.45

Tested by

no test coverage detected