From 31c534a829ac817c8b61292630126972ffb89c46 Mon Sep 17 00:00:00 2001 From: SuokN Date: Thu, 2 Feb 2023 14:43:13 +0100 Subject: [PATCH] fix: wrong calculation to get the initial view of map for planters #153 (last recalculation if the zoomLevel is less than 14) --- src/Map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Map.js b/src/Map.js index a8407c7..57cb1cb 100644 --- a/src/Map.js +++ b/src/Map.js @@ -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 {