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

Method _getResolution

src/common/mapping/WebMapV2.js:3123–3128  ·  view source on GitHub ↗
(bounds, tileSize = 512.0)

Source from the content-addressed store, hash-verified

3121 }
3122
3123 _getResolution(bounds, tileSize = 512.0) {
3124 if (bounds.leftBottom && bounds.rightTop) {
3125 return Math.max(bounds.rightTop.x - bounds.leftBottom.x, bounds.rightTop.y - bounds.leftBottom.y) / tileSize;
3126 }
3127 return Math.max(bounds[2] - bounds[0], bounds[3] - bounds[1]) / tileSize;
3128 }
3129
3130 _transformScaleToZoom(scale, crs, tileSize) {
3131 tileSize = tileSize || 512

Callers 1

_createMapMethod · 0.95

Calls 1

maxMethod · 0.80

Tested by

no test coverage detected