aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/MainMap.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/map/MainMap.js')
-rw-r--r--modern/src/map/MainMap.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/modern/src/map/MainMap.js b/modern/src/map/MainMap.js
index 0b7eea25..4ee6d4dc 100644
--- a/modern/src/map/MainMap.js
+++ b/modern/src/map/MainMap.js
@@ -6,6 +6,7 @@ import mapboxgl from 'mapbox-gl';
import mapManager from './mapManager';
import store from '../store';
import StatusView from '../StatusView';
+import { calculateBounds } from './mapUtil';
import { useHistory } from 'react-router-dom';
const MainMap = () => {
@@ -92,7 +93,7 @@ const MainMap = () => {
});
mapManager.addLayer('device-icon', 'positions', '{category}', '{name}', markerClickHandler);
- const bounds = mapManager.calculateBounds(positions.features);
+ const bounds = calculateBounds(positions.features);
if (bounds) {
mapManager.map.fitBounds(bounds, {
padding: 100,