Skip to content

Commit 372dd0d

Browse files
committed
max-zoom bug fix
1 parent edf37b7 commit 372dd0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/geodataWorker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ async function downloadAndProcessGeodataFiles(fileUrls) {
223223
function selectEntries(bounds, hashlevel) {
224224
const { minLat, maxLat, minLon, maxLon } = bounds;
225225

226-
const geohashes = ngeohash.bboxes(minLat, minLon, maxLat, maxLon, hashlevel+1);
226+
const geohashes = ngeohash.bboxes(minLat, minLon, maxLat, maxLon, Math.min(hashlevel+1, 8));
227227
let results = geohashes.map(g => geoTrie.getBestEntry(g));
228228

229229
// Filter out null entries and entries outside the bounds

0 commit comments

Comments
 (0)