diff options
Diffstat (limited to 'modern')
-rw-r--r-- | modern/src/map/MapCamera.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modern/src/map/MapCamera.js b/modern/src/map/MapCamera.js index 63f070f8..46936513 100644 --- a/modern/src/map/MapCamera.js +++ b/modern/src/map/MapCamera.js @@ -9,7 +9,7 @@ const MapCamera = ({ if (positions) { const coordinates = positions.map((item) => [item.longitude, item.latitude]); if (coordinates.length) { - const bounds = coordinates.reduce((bounds, item) => bounds.extend(item), new maplibregl.LngLatBounds(coordinates[0], coordinates[1])); + const bounds = coordinates.reduce((bounds, item) => bounds.extend(item), new maplibregl.LngLatBounds(coordinates[0], coordinates[0])); const canvas = map.getCanvas(); map.fitBounds(bounds, { padding: Math.min(canvas.width, canvas.height) * 0.1, |