When using MapboxGeocoder component, how can I update the input value if I drag a default marker? #93
-
Currently I have a map, where I can do searches using
then on the script I have this:
and finally, when the dragend event in the marker is fired, this is called:
However, the input in the MapboxGeocoder never updates. Is there a way to handle this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This should be possible but you will have to access the geocoder's input element. Unfortunately it doesn't seem this is documented anywhere by mapbox and it is not defined in typescript so I have not officially supported this. However, I have found you can access the element through the To do this you will need to access the geocoder through the components ref: https://alexlavoie42.github.io/Nuxt-Mapbox/usage/controls#geocoder |
Beta Was this translation helpful? Give feedback.
This should be possible but you will have to access the geocoder's input element. Unfortunately it doesn't seem this is documented anywhere by mapbox and it is not defined in typescript so I have not officially supported this. However, I have found you can access the element through the
_inputEl
property on the geocoder.To do this you will need to access the geocoder through the components ref: https://alexlavoie42.github.io/Nuxt-Mapbox/usage/controls#geocoder