diff --git a/package.json b/package.json index 6e122b40..1a22d49c 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "bundle:min": "rollup -c build/rollup.min.config.js", "lint": "eslint 'src/**/*.{js,vue}'", "lintfix": "eslint --fix 'src/**/*.{js,vue}'", + "prepare": "npm run build", "release:prepare": "shipjs prepare", "release:trigger": "shipjs trigger" }, diff --git a/src/GeocoderControl.js b/src/GeocoderControl.js index 978cb9ad..ca17df24 100644 --- a/src/GeocoderControl.js +++ b/src/GeocoderControl.js @@ -29,58 +29,10 @@ export default { type: String, required: true, }, - zoom: { - type: Number, - default: 16, - }, - flyTo: { - type: Boolean, - default: true, - }, - placeholder: { - type: String, - default: 'Search', - }, proximity: { type: Object, default: null, }, - trackProximity: { - type: Boolean, - default: false, - }, - bbox: { - type: Array, - default: null, - }, - types: { - type: String, - default: null, - }, - country: { - type: String, - default: null, - }, - minLength: { - type: Number, - default: 2, - }, - limit: { - type: Number, - default: 5, - }, - language: { - type: String, - default: null, - }, - filter: { - type: Function, - default: null, - }, - localGeocoder: { - type: Function, - default: null, - }, // Component options input: { type: String, @@ -119,7 +71,13 @@ export default { if (this.accessToken && !this.mapbox.accessToken) { this.mapbox.accessToken = this.accessToken; } - this.control = new MapboxGeocoder(this.$props); + + this.control = new MapboxGeocoder({ + ...this.$attrs, + proximity: this.proximity, + accessToken: this.accessToken, + }); + this.control.on('results', this.$_updateInput); this.$_deferredMount();