Skip to content

Attaching to an external DOM  #1

Closed
@system123

Description

@system123

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions