aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/ReplayPathMap.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-07-04 10:34:53 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-07-04 10:34:53 -0700
commitd187ed9b1ffa1835c5498ff5f2e3652447d7c68c (patch)
tree9980db1c83d4c659151915879ca85c47eb3db6df /modern/src/map/ReplayPathMap.js
parentf2c65d56b20998384c1539b5d1c62c0605a0b8f8 (diff)
downloadetbsa-traccar-web-d187ed9b1ffa1835c5498ff5f2e3652447d7c68c.tar.gz
etbsa-traccar-web-d187ed9b1ffa1835c5498ff5f2e3652447d7c68c.tar.bz2
etbsa-traccar-web-d187ed9b1ffa1835c5498ff5f2e3652447d7c68c.zip
Migrate to MapLibre
Diffstat (limited to 'modern/src/map/ReplayPathMap.js')
-rw-r--r--modern/src/map/ReplayPathMap.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/map/ReplayPathMap.js b/modern/src/map/ReplayPathMap.js
index feab071..b40aa69 100644
--- a/modern/src/map/ReplayPathMap.js
+++ b/modern/src/map/ReplayPathMap.js
@@ -1,4 +1,4 @@
-import mapboxgl from 'mapbox-gl';
+import maplibregl from 'maplibre-gl';
import { useEffect } from 'react';
import { map } from './Map';
@@ -46,7 +46,7 @@ const ReplayPathMap = ({ positions }) => {
},
});
if (coordinates.length) {
- const bounds = coordinates.reduce((bounds, item) => bounds.extend(item), new mapboxgl.LngLatBounds(coordinates[0], coordinates[0]));
+ const bounds = coordinates.reduce((bounds, item) => bounds.extend(item), new maplibregl.LngLatBounds(coordinates[0], coordinates[0]));
map.fitBounds(bounds, {
padding: { top: 50, bottom: 250, left: 25, right: 25 },
});