Tighter bounds for dynamicTileSource

This commit is contained in:
Pieter Vander Vennet 2023-11-15 04:13:02 +01:00
parent d3472f99bd
commit 40d32890fe

View file

@ -30,6 +30,7 @@ export default class DynamicTileSource extends FeatureSourceMerger {
if (options?.isActive && !options?.isActive.data) { if (options?.isActive && !options?.isActive.data) {
return undefined return undefined
} }
if (mapProperties.zoom.data < minzoom) { if (mapProperties.zoom.data < minzoom) {
return undefined return undefined
} }
@ -40,8 +41,8 @@ export default class DynamicTileSource extends FeatureSourceMerger {
bounds.getSouth(), bounds.getSouth(),
bounds.getWest() bounds.getWest()
) )
if (tileRange.total > 10000) { if (tileRange.total > 500) {
console.error( console.warn(
"Got a really big tilerange, bounds and location might be out of sync" "Got a really big tilerange, bounds and location might be out of sync"
) )
return undefined return undefined