Skip to content

Attaching to an external DOM #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
system123 opened this issue Jul 1, 2018 · 2 comments
Closed

Attaching to an external DOM #1

system123 opened this issue Jul 1, 2018 · 2 comments

Comments

@system123
Copy link

How can I attach this to an external DOM element? My search bar is located outside of my map, and I would like the geocoder to do the same. So far I have tried the following:

Searchbar.vue

But I get the following error when calling the query() method:

[Vue warn]: Error in callback for watcher "defaultInput": "TypeError: this._loadingEl is undefined"

found in

---> at src/components/Searchbar.vue


at src/App.vue

vue.esm.js:591
TypeError: this._loadingEl is undefined
Stack trace:
_geocode@webpack-internal:///./node_modules/@mapbox/mapbox-gl-geocoder/lib/index.js:167:5
query@webpack-internal:///./node_modules/@mapbox/mapbox-gl-geocoder/lib/index.js:264:5
defaultInput@webpack-internal:///./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/Searchbar.vue:46:25
run@webpack-internal:///./node_modules/vue/dist/vue.esm.js:3232:11
flushSchedulerQueue@webpack-internal:///./node_modules/vue/dist/vue.esm.js:2980:5
nextTick/<@webpack-internal:///./node_modules/vue/dist/vue.esm.js:1836:9
flushCallbacks@webpack-internal:///./node_modules/vue/dist/vue.esm.js:1757:5

@system123
Copy link
Author

I implemented a stand-alone geocoder for this.

@petemolinero
Copy link

@system123 How did you end up doing this? I'd like to do a standalone geocoder as well, without the map.

dd pushed a commit to dd/vue-mapbox-geocoder that referenced this issue May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants