aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/PositionsMap.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/PositionsMap.js
parentf2c65d56b20998384c1539b5d1c62c0605a0b8f8 (diff)
downloadtrackermap-web-d187ed9b1ffa1835c5498ff5f2e3652447d7c68c.tar.gz
trackermap-web-d187ed9b1ffa1835c5498ff5f2e3652447d7c68c.tar.bz2
trackermap-web-d187ed9b1ffa1835c5498ff5f2e3652447d7c68c.zip
Migrate to MapLibre
Diffstat (limited to 'modern/src/map/PositionsMap.js')
-rw-r--r--modern/src/map/PositionsMap.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/map/PositionsMap.js b/modern/src/map/PositionsMap.js
index baa801fb..35d6d926 100644
--- a/modern/src/map/PositionsMap.js
+++ b/modern/src/map/PositionsMap.js
@@ -1,6 +1,6 @@
import React, { useCallback, useEffect } from 'react';
import ReactDOM from 'react-dom';
-import mapboxgl from 'mapbox-gl';
+import maplibregl from 'maplibre-gl';
import { Provider, useSelector } from 'react-redux';
import { map } from './Map';
@@ -54,7 +54,7 @@ const PositionsMap = ({ positions }) => {
placeholder
);
- new mapboxgl.Popup({
+ new maplibregl.Popup({
offset: 25,
anchor: 'top'
})
@@ -129,7 +129,7 @@ const PositionsMap = ({ positions }) => {
map.on('click', clusters, onClusterClick);
return () => {
- Array.from(map.getContainer().getElementsByClassName('mapboxgl-popup')).forEach(el => el.remove());
+ Array.from(map.getContainer().getElementsByClassName('maplibregl-popup')).forEach(el => el.remove());
map.off('mouseenter', id, onMouseEnter);
map.off('mouseleave', id, onMouseLeave);