Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import mapboxgl from 'mapbox-gl'
import 'mapbox-gl/dist/mapbox-gl.css';
// import turfLength from '@turf/length';
import MapboxGeocoder from '@mapbox/mapbox-gl-geocoder'
import '@mapbox/mapbox-gl-geocoder/dist/mapbox-gl-geocoder.css'
import mbxGeocoding from '@mapbox/mapbox-sdk/services/geocoding';
import { MAPBOX_ACCESS_TOKEN, IS_MOBILE } from './constants.js'
import './Map.css'
const geocodingClient = mbxGeocoding({ accessToken: MAPBOX_ACCESS_TOKEN });
class Map extends Component {
map;
popup;
searchBar;
hoverPopup;
selectedCycleway;
constructor(props) {
super(props);
this.onMapMoved = this.onMapMoved.bind(this);
}
showPopup(e) {