We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e0ba70 commit ee218c9Copy full SHA for ee218c9
src/GeocoderControl.js
@@ -16,6 +16,14 @@ export default {
16
inject: ['mapbox', 'map'],
17
18
props: {
19
+ position: {
20
+ type: String,
21
+ default: 'top-right',
22
+ },
23
+ container: {
24
25
+ default: null,
26
27
// Mapbox-geocoder options
28
accessToken: {
29
type: String,
@@ -123,7 +131,13 @@ export default {
123
131
124
132
methods: {
125
133
$_deferredMount() {
126
- this.map.addControl(this.control);
134
+ if (this.container !== null) {
135
+ document
136
+ .getElementById(this.container)
137
+ .appendChild(this.control.onAdd(this.map));
138
+ } else {
139
+ this.map.addControl(this.control, this.position);
140
+ }
127
141
if (this.input) {
128
142
this.control.setInput(this.input);
129
143
}
0 commit comments