Closed nikitauskas closed 3 years ago
improved search results
Thanks @nikitauskas ! This one is included in v3.3.0
Thanks for this! Just what I needed.
Btw I used a different URL as v5 is the latest version. No other code changes were needed though:
const host = "https://api.mapbox.com";
this.searchUrl = options.searchUrl || `${host}/geocoding/v5/mapbox.places/`;
@smeijer You don't seem to have updated the dist/ folder with the 3.3.0 release. I can't see the MapBoxProvider in dist but can see it in src.
@dtropp, that was weird. Published a fix under 3.3.1
. The provider is now included:
https://unpkg.com/browse/leaflet-geosearch@3.3.1/lib/providers/
Added new MapBox provider for GeoSearch.
example of usage:
const provider = new MapBoxProvider({ params: { access_token: "ACCESS_TOKEN", }, });
An access token can be obtained here: https://docs.mapbox.com/accounts/overview/tokens/