Skip to content

Commit 189823a

Browse files
committed
【fix】修复测试 review by xiongjj
1 parent 227328f commit 189823a

File tree

4 files changed

+817
-819
lines changed

4 files changed

+817
-819
lines changed

src/mapboxgl/mapping/WebMap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,10 @@ export class WebMap extends mapboxgl.Evented {
205205
zoomBase = 0;
206206
// zoom = zoom === 0 ? 0 : zoom - 1;
207207
if (mapInfo.minScale && mapInfo.maxScale) {
208-
zoomBase = this._transformScaleToZoom(mapInfo.minScale, mapboxgl.CRS.get(this.baseProjection));
208+
zoomBase = this._transformScaleToZoom(mapInfo.minScale, mapboxgl.CRS ? mapboxgl.CRS.get(this.baseProjection):'EPSG:3857');
209209
} else {
210210
zoomBase = +Math.log2(
211-
this._getResolution(mapboxgl.CRS.get(this.baseProjection).getExtent()) / this._getResolution(mapInfo.extent)
211+
this._getResolution(mapboxgl.CRS ? mapboxgl.CRS.get(this.baseProjection).getExtent():[-20037508.3427892, -20037508.3427892, 20037508.3427892, 20037508.3427892]) / this._getResolution(mapInfo.extent)
212212
).toFixed(2);
213213
}
214214
zoom += zoomBase;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy