mapbox / mapbox-gl-geocoder

Geocoder control for mapbox-gl-js using Mapbox Geocoding API
https://mapbox.com/mapbox-gl-js/example/mapbox-gl-geocoder/
ISC License
364 stars 180 forks source link

Bug: function SetInput() when option showSuggestions is set to false, it still shows the suggestions #522

Open Rick-Blanksma opened 10 months ago

Rick-Blanksma commented 10 months ago

The code:

const geocoder = new MapboxGeocoder({ accessToken: mapboxgl.accessToken, mapboxgl: mapboxgl, });

if (locationFromUrl && idFromUrl) {
// Reverse geocode to get the place name reverseGeocode(locationFromUrl[0], locationFromUrl[1], placeIdFromUrl).then(placeName => { if (placeName) { geocoder.setInput(placeName, false); } }); }

The result: Screenshot 2023-12-20 at 13 40 09