diff options
Diffstat (limited to 'modern/src/map/GeofenceMap.js')
-rw-r--r-- | modern/src/map/GeofenceMap.js | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/modern/src/map/GeofenceMap.js b/modern/src/map/GeofenceMap.js deleted file mode 100644 index bca4d20..0000000 --- a/modern/src/map/GeofenceMap.js +++ /dev/null @@ -1,25 +0,0 @@ -import '@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css' -import MapboxDraw from '@mapbox/mapbox-gl-draw'; -import { useEffect } from 'react'; - -import { map } from './Map'; - -const draw = new MapboxDraw({ - displayControlsDefault: false, - controls: { - polygon: true, - trash: true, - }, -}); - -const GeofenceMap = () => { - useEffect(() => { - const mm = map; - map.addControl(draw, 'top-left'); - return () => map.removeControl(draw); - }, []); - - return null; -} - -export default GeofenceMap; |