From 704b6d57fb0e7a27a2fffbd9bdc3093515de7feb Mon Sep 17 00:00:00 2001 From: Farnoosh Johnson Date: Mon, 10 Oct 2022 16:18:00 -0700 Subject: [PATCH] Add Display map navigation controls : https://docs.mapbox.com/mapbox-gl-js/example/navigation/ --- src/App.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/App.js b/src/App.js index b5dd87c..74973ea 100644 --- a/src/App.js +++ b/src/App.js @@ -41,6 +41,10 @@ class App extends Component { doubleClickZoom: true, touchZoomRotate: false, }); + + // Add zoom and rotation controls to the map. + map.addControl(new mapboxgl.NavigationControl()); + // Find all active markers and de-activate. function clearMarkers() { const activeMarkers = document.getElementsByClassName("marker-active");