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

Method _getZXYTileMapBounds

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

Source from the content-addressed store, hash-verified

1411 return options;
1412 }
1413 _getZXYTileMapBounds(layerInfo) {
1414 const { mapBounds, tileSize = 256, resolutions, origin } = layerInfo;
1415 if (mapBounds) {
1416 return mapBounds;
1417 }
1418 if (resolutions) {
1419 const maxResolution = resolutions.sort((a, b) => b - a)[0];
1420 const size = maxResolution * tileSize;
1421 return [origin[0], origin[1] - size, origin[0] + size, origin[1]];
1422 }
1423 // 兼容之前的3857全球剖分
1424 if (this.baseProjection == 'EPSG:3857') {
1425 return [-20037508.3427892, -20037508.3427892, 20037508.3427892, 20037508.3427892];
1426 }
1427 }
1428 /**
1429 * @private
1430 * @function WebMap.prototype.createXYZTileSource

Callers 1

getLayerOtherOptionsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected