You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: