soal / vue-mapbox

Vuejs 2 components for interacting with mapbox-gl-js
https://soal.github.io/vue-mapbox
MIT License
473 stars 147 forks source link

Is there a possibility to use this without a map? #243

Open Bowis opened 3 years ago

Bowis commented 3 years ago

MapBox has the example at: https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-geocoder-no-map/ where the input is used without a map, is this in any way possible with this plugin?

thopiddock commented 3 years ago

Yes. It's literally the example. Forgive me, but I'm not sure what you're trying to do that is any different to what you see in that link.

You just import the script using the CDN link as in the example, then bind a new geocoder instance to a div of your choice and handle the event for the result in whatever way you want.

Bowis commented 3 years ago

@thopiddock I meant with the use of the VueMapbox plugin, so that I can use the components from this plugins. I am able to read and understand hte given example, i merely was looking for another way to handle the event handlers in a more Vue manner.

thopiddock commented 3 years ago

Aha! That makes sense:

https://github.com/soal/vue-mapbox-geocoder

hamzaafzal9009 commented 2 years ago

@Bowis are you able to use geocoder without the map?

Bowis commented 2 years ago

@Bowis are you able to use geocoder without the map?

yes, I was