Closed JeremieBergeron closed 1 year ago
hey @JeremieBergeron
To control what exactly to show in input field after selection you can use getItemValue function. It accepts the whole geojson object and you can choose what properties to use
const geocoder = new MapboxGeocoder({
accessToken: mapboxgl.accessToken,
mapboxgl: mapboxgl,
getItemValue: (item) => item.place_name
});
Thanks !
Is it possible to have custom html for the input field?
Warning: I am not talking about the dropdown!
I would like to only display the place.