Skip to content

When using MapboxGeocoder component, how can I update the input value if I drag a default marker? #93

Answered by AlexLavoie42
Gonzalo-Bruna asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Gonzalo-Bruna
Comment options

@Gonzalo-Bruna
Comment options

Answer selected by Gonzalo-Bruna
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants