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

Method _isSameResolutions

src/common/mapping/WebMapV2.js:847–851  ·  view source on GitHub ↗
(resolutions, tileSize, mapTileSize = 512)

Source from the content-addressed store, hash-verified

845 return this.numberEqual(origin[0], extent[0]) && this.numberEqual(origin[1], extent[3]);
846 }
847 _isSameResolutions(resolutions, tileSize, mapTileSize = 512) {
848 const mapResolutions = this._getMapResolutions();
849 const conversion = mapTileSize / tileSize;
850 return resolutions.every((item, i) => this.numberEqual(item, conversion * mapResolutions[i]));
851 }
852 _getMapResolutions() {
853 return this._getResolutionsByExtent({extent: this.map.getCRS().getExtent(), maxZoom: this.map.getMaxZoom() + 1, tileSize: 512})
854 }

Callers 1

Calls 2

_getMapResolutionsMethod · 0.95
numberEqualMethod · 0.95

Tested by

no test coverage detected