(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pvm_MglGeolocateControl"],{"2d05":function(t,e,o){"use strict";o.r(e);var n=o("aa65"),i=o("9f0b"),r=o("81e1");const s={trackuserlocationstart:"trackuserlocationstart",trackuserlocationend:"trackuserlocationend",geolocate:"geolocate",error:"error"};e["default"]={name:"GeolocateControl",mixins:[i["a"],r["a"],n["a"]],props:{positionOptions:{type:Object,default(){return{enableHighAccuracy:!1,timeout:6e3}}},fitBoundsOptions:{type:Object,default:()=>({maxZoom:15})},showAccuracyCircle:{type:Boolean,default:!1},trackUserLocation:{type:Boolean,default:!1},showUserLocation:{type:Boolean,default:!0}},created(){const t=this.mapbox.GeolocateControl;this.control=new t(this.$props),this.$_addControl(),this.$_bindSelfEvents(Object.keys(s),this.control)},methods:{trigger(){if(this.control)return this.control.trigger()}}}},"81e1":function(t,e,o){"use strict";e["a"]={methods:{$_emitSelfEvent(t,e={}){this.$_emitMapEvent(t,{control:this.control,...e})},$_bindSelfEvents(t,e){Object.keys(this.$listeners).forEach(o=>{t.includes(o)&&e.on(o,this.$_emitSelfEvent)})},$_unbindSelfEvents(t,e){0!==t.length&&e&&t.forEach(t=>{e.off(t,this.$_emitSelfEvent)})}}}},"9f0b":function(t,e,o){"use strict";e["a"]={methods:{$_emitEvent(t,e={}){this.$emit(t,{map:this.map,component:this,...e})},$_emitMapEvent(t,e={}){this.$_emitEvent(t.type,{mapboxEvent:t,...e})}}}},aa65:function(t,e,o){"use strict";var n=o("9f0b"),i=o("81e1");e["a"]={mixins:[n["a"],i["a"]],inject:["mapbox","map","actions"],props:{position:{type:String,default:"top-right"}},beforeDestroy(){this.map&&this.control&&this.map.removeControl(this.control)},methods:{$_addControl(){try{this.map.addControl(this.control,this.position)}catch(t){return void this.$_emitEvent("error",{error:t})}this.$_emitEvent("added",{control:this.control})}},render(){}}}}]);
//# sourceMappingURL=pvm_MglGeolocateControl.1bfd115c.js.map