From 91c121647293dd04daf8c932371dbe7f17e96f98 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 2 Aug 2022 07:05:49 -0700 Subject: Fix bounds --- modern/src/map/main/MapDefaultCamera.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modern/src/map/main/MapDefaultCamera.js') diff --git a/modern/src/map/main/MapDefaultCamera.js b/modern/src/map/main/MapDefaultCamera.js index bb9ea404..f6b6ed9c 100644 --- a/modern/src/map/main/MapDefaultCamera.js +++ b/modern/src/map/main/MapDefaultCamera.js @@ -27,7 +27,7 @@ const MapDefaultCamera = () => { } else { const coordinates = Object.values(positions).map((item) => [item.longitude, item.latitude]); if (coordinates.length > 1) { - const bounds = coordinates.reduce((bounds, item) => bounds.extend(item), new maplibregl.LngLatBounds(coordinates[0], coordinates[0])); + const bounds = coordinates.reduce((bounds, item) => bounds.extend(item), new maplibregl.LngLatBounds(coordinates[0], coordinates[1])); const canvas = map.getCanvas(); map.fitBounds(bounds, { duration: 0, -- cgit v1.2.3