Skip to content

Commit b353a80

Browse files
committed
【fix】修复缺陷,TileSuperMapRest参数可传入maxZoom,minZoom,tileSize。防止layer设置maxZoom,minZoom和source不一致时(特别是当source的maxzoom小于layer的maxzoom时),出现瓦片加载错乱或者不加载的问题
1 parent c3c51cf commit b353a80

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/openlayers/mapping/TileSuperMapRest.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export class TileSuperMapRest extends TileImage {
157157
function tileUrlFunction(tileCoord, pixelRatio, projection) {
158158
if (!me.tileGrid) {
159159
if (options.extent) {
160-
me.tileGrid = TileSuperMapRest.createTileGrid(options.extent);
160+
me.tileGrid = TileSuperMapRest.createTileGrid(options.extent,options.maxZoom, options.minZoom, options.tileSize);
161161
if (me.resolutions) {
162162
me.tileGrid.resolutions = me.resolutions;
163163
}
@@ -168,11 +168,11 @@ export class TileSuperMapRest extends TileImage {
168168
-20037508.3427892,
169169
20037508.3427892,
170170
20037508.3427892
171-
]);
171+
],options.maxZoom, options.minZoom, options.tileSize);
172172
me.extent = [-20037508.3427892, -20037508.3427892, 20037508.3427892, 20037508.3427892];
173173
}
174174
if (projection.getCode() === 'EPSG:4326') {
175-
me.tileGrid = TileSuperMapRest.createTileGrid([-180, -90, 180, 90]);
175+
me.tileGrid = TileSuperMapRest.createTileGrid([-180, -90, 180, 90], options.maxZoom, options.minZoom, options.tileSize);
176176
me.extent = [-180, -90, 180, 90];
177177
}
178178
}

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