aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/Map.js
diff options
context:
space:
mode:
authorDesmond Kyeremeh <elDekyfin@gmail.com>2021-07-09 19:19:34 +0000
committerDesmond Kyeremeh <elDekyfin@gmail.com>2021-07-09 19:19:34 +0000
commitefe18c504a834760242937572b369530c552e589 (patch)
tree913c472f0fb37bd2ef47a5890e512ba41a5d8480 /modern/src/map/Map.js
parent2a0705f1c26befa75703238462930847b18895e1 (diff)
parent627cf95d59f625dcb0544bfd4c067d99dee4bb93 (diff)
downloadetbsa-traccar-web-efe18c504a834760242937572b369530c552e589.tar.gz
etbsa-traccar-web-efe18c504a834760242937572b369530c552e589.tar.bz2
etbsa-traccar-web-efe18c504a834760242937572b369530c552e589.zip
Merge remote-tracking branch 'upstream/master' into group-config
Diffstat (limited to 'modern/src/map/Map.js')
-rw-r--r--modern/src/map/Map.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/modern/src/map/Map.js b/modern/src/map/Map.js
index a973cf7..46c59d2 100644
--- a/modern/src/map/Map.js
+++ b/modern/src/map/Map.js
@@ -1,6 +1,6 @@
-import 'mapbox-gl/dist/mapbox-gl.css';
+import 'maplibre-gl/dist/maplibre-gl.css';
import './switcher/switcher.css';
-import mapboxgl from 'mapbox-gl';
+import maplibregl from 'maplibre-gl';
import { SwitcherControl } from './switcher/switcher';
import React, { useRef, useLayoutEffect, useEffect, useState } from 'react';
import { deviceCategories } from '../common/deviceCategories';
@@ -14,7 +14,7 @@ const element = document.createElement('div');
element.style.width = '100%';
element.style.height = '100%';
-export const map = new mapboxgl.Map({
+export const map = new maplibregl.Map({
container: element,
style: styleOsm(),
});
@@ -55,7 +55,7 @@ const initMap = async () => {
map.on('load', initMap);
-map.addControl(new mapboxgl.NavigationControl({
+map.addControl(new maplibregl.NavigationControl({
showCompass: false,
}));
@@ -89,7 +89,7 @@ const Map = ({ children }) => {
const mapboxAccessToken = useAttributePreference('mapboxAccessToken');
useEffect(() => {
- mapboxgl.accessToken = mapboxAccessToken;
+ maplibregl.accessToken = mapboxAccessToken;
}, [mapboxAccessToken]);
useEffect(() => {