Skip to content

Commit 90acf9b

Browse files
Merge pull request soal#1 from vinayakkulkarni/position_mapboxgl_object_fix
Position mapboxgl object fix
2 parents bbea34b + e5b28e5 commit 90acf9b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/GeocoderControl.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ export default {
2121
type: String,
2222
required: true
2323
},
24+
position: {
25+
type: String,
26+
default: "top-right"
27+
},
2428
zoom: {
2529
type: Number,
2630
default: 16
@@ -73,6 +77,10 @@ export default {
7377
type: Function,
7478
default: null
7579
},
80+
mapboxgl: {
81+
type: Object,
82+
default: null,
83+
},
7684
// Component options
7785
input: {
7886
type: String,
@@ -119,7 +127,7 @@ export default {
119127

120128
methods: {
121129
$_deferredMount() {
122-
this.map.addControl(this.control);
130+
this.map.addControl(this.control, this.position);
123131
if (this.input) {
124132
this.control.setInput(this.input);
125133
}

0 commit comments

Comments
 (0)