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

Method getLayerOtherOptions

src/openlayers/mapping/WebMap.js:1401–1412  ·  view source on GitHub ↗
(layerInfo)

Source from the content-addressed store, hash-verified

1399 }
1400
1401 getLayerOtherOptions(layerInfo) {
1402 const { layerType, extent, minZoom, maxZoom } = layerInfo;
1403 const extentVal = layerType === 'ZXY_TILE' ? this._getZXYTileMapBounds(layerInfo) : extent;
1404 const options = { extent: extentVal };
1405 if (typeof minZoom === 'number' && minZoom !== 0) {
1406 options.minZoom = minZoom - 1;
1407 }
1408 if (typeof maxZoom === 'number') {
1409 options.maxZoom = maxZoom;
1410 }
1411 return options;
1412 }
1413 _getZXYTileMapBounds(layerInfo) {
1414 const { mapBounds, tileSize = 256, resolutions, origin } = layerInfo;
1415 if (mapBounds) {

Callers 1

createBaseLayerMethod · 0.95

Calls 1

_getZXYTileMapBoundsMethod · 0.95

Tested by

no test coverage detected