MapBox Provider
note: MapBox services require an API key. Obtain here. For more options and configurations, see the MapBox developer docs on the Search API.
import { MapBoxProvider } from 'leaflet-geosearch';const provider = new MapBoxProvider({params: {access_token: '__YOUR_MAPBOX_KEY__',},});// add to leafletimport { GeoSearchControl } from 'leaflet-geosearch';map.addControl(new GeoSearchControl({provider,style: 'bar',}),);