Skip to content

Commit

Permalink
Adjust zoom constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
quincylvania committed Feb 8, 2025
1 parent 252e6aa commit 9439916
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ async function getSnapshotTileJson(id) {
return getSnapshotBounds(id)
.then(wgsBounds => {
const smallestTileZoom = bboxToTile(wgsBounds)[2];
const center = [(wgsBounds[2] + wgsBounds[0]) / 2, (wgsBounds[3] + wgsBounds[1]) / 2, Math.min(smallestTileZoom + 6, maxZoom)];
const center = [(wgsBounds[2] + wgsBounds[0]) / 2, (wgsBounds[3] + wgsBounds[1]) / 2, Math.min(smallestTileZoom + 4, maxZoom)];

return {
name: `fp-snapshot-${id}`,
minzoom: Math.min(smallestTileZoom + 3, maxZoom),
minzoom: Math.min(smallestTileZoom + 2, maxZoom),
maxzoom: Math.min(smallestTileZoom + 9, maxZoom),
bounds: wgsBounds,
center: center,
Expand Down

0 comments on commit 9439916

Please sign in to comment.