Skip to content

Commit

Permalink
fix: wrong calculation to get the initial view of map for planters Gr…
Browse files Browse the repository at this point in the history
…eenstand#153

(last recalculation if the zoomLevel is less than 14)
  • Loading branch information
SuokN committed Feb 2, 2023
1 parent e806468 commit 31c534a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ export default class Map {
//we need recalculate view, but we can't use view.zoomLevel, because it can be a lot of trees in new zoom.
//so it more like a hack, we need to try research this issue on the Server with the height and width of the map
view = await calculateInitialView(14)
view.zoomLevel = 14
if (view.zoomLevel > 14) view.zoomLevel = 14
}
log.warn('get initial view:', view)
return {
Expand Down

0 comments on commit 31c534a

Please sign in to comment.