From d187ed9b1ffa1835c5498ff5f2e3652447d7c68c Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 4 Jul 2021 10:34:53 -0700 Subject: Migrate to MapLibre --- modern/src/map/PositionsMap.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modern/src/map/PositionsMap.js') diff --git a/modern/src/map/PositionsMap.js b/modern/src/map/PositionsMap.js index baa801f..35d6d92 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); -- cgit v1.2.3