Skip to content

Commit 4542431

Browse files
committed
2 parents 5f69dc6 + 1b1acc8 commit 4542431

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

src/openlayers/overlay/VectorTileSuperMapRest.js

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,23 @@ export class VectorTileSuperMapRest extends VectorTile {
285285
source = xhr.response;
286286
}
287287
if (source) {
288-
success.call(
289-
this,
290-
format.readFeatures(source, {
291-
extent: extent,
292-
featureProjection: projection
293-
}),
294-
format.readProjection(source)
295-
);
288+
if (['4', '5'].includes(Util.getOlVersion())) {
289+
success.call(
290+
this,
291+
format.readFeatures(source, { featureProjection: projection }),
292+
format.readProjection(source),
293+
format.getLastExtent()
294+
);
295+
} else {
296+
success.call(
297+
this,
298+
format.readFeatures(source, {
299+
extent: extent,
300+
featureProjection: projection
301+
}),
302+
format.readProjection(source)
303+
);
304+
}
296305
} else {
297306
failure.call(this);
298307
}

0 commit comments

Comments
 (0)