Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Rick-Blanksma opened this issue Dec 20, 2023 · 0 comments

Comments

@Rick-Blanksma
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant