vue3-google-map
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -27,11 +27,12 @@ /* | ||
mapTypeControl:{type:Boolean,default:void 0},mapTypeControlOptions:Object,mapTypeId:{type:[Number,String]},maxZoom:Number,minZoom:Number,noClear:{type:Boolean,default:void 0},panControl:{type:Boolean,default:void 0},panControlPosition:String,restriction:Object,rotateControl:{type:Boolean,default:void 0},rotateControlPosition:String,scaleControl:{type:Boolean,default:void 0},scaleControlStyle:Number,scrollwheel:{type:Boolean,default:void 0},streetView:Object,streetViewControl:{type:Boolean,default:void 0}, | ||
streetViewControlPosition:String,styles:Array,tilt:Number,zoom:Number,zoomControl:{type:Boolean,default:void 0},zoomControlPosition:String},setup(a,{emit:b}){let e=vue.ref(null),c=vue.ref(!1),{map:d,api:f}=useMap(),h=()=>{var b,c,d,e,h;const k={backgroundColor:a.backgroundColor,center:a.center,clickableIcons:a.clickableIcons,controlSize:a.controlSize,disableDefaultUI:a.disableDefaultUi,disableDoubleClickZoom:a.disableDoubleClickZoom,draggable:a.draggable,draggableCursor:a.draggableCursor,draggingCursor:a.draggingCursor, | ||
fullscreenControl:a.fullscreenControl,fullscreenControlOptions:a.fullscreenControlPosition?{position:null===(b=f.value)||void 0===b?void 0:b.ControlPosition[a.fullscreenControlPosition]}:{},gestureHandling:a.gestureHandling,heading:a.heading,keyboardShortcuts:a.keyboardShortcuts,mapTypeControl:a.mapTypeControl,mapTypeControlOptions:a.mapTypeControlOptions,mapTypeId:a.mapTypeId,maxZoom:a.maxZoom,minZoom:a.minZoom,noClear:a.noClear,panControl:a.panControl,panControlOptions:a.panControlPosition?{position:null=== | ||
(c=f.value)||void 0===c?void 0:c.ControlPosition[a.panControlPosition]}:{},restriction:a.restriction,rotateControl:a.rotateControl,rotateControlOptions:a.rotateControlPosition?{position:null===(d=f.value)||void 0===d?void 0:d.ControlPosition[a.rotateControlPosition]}:{},scaleControl:a.scaleControl,scaleControlOptions:a.scaleControlStyle?{style:a.scaleControlStyle}:{},scrollwheel:a.scrollwheel,streetView:a.streetView,streetViewControl:a.streetViewControl,streetViewControlOptions:a.streetViewControlPosition? | ||
streetViewControlPosition:String,styles:Array,tilt:Number,zoom:Number,zoomControl:{type:Boolean,default:void 0},zoomControlPosition:String},emits:mapEvents,setup(a,{emit:b}){let e=vue.ref(null),c=vue.ref(!1),{map:d,api:f}=useMap(),h=()=>{var b,c,d,e,h;const k={backgroundColor:a.backgroundColor,center:a.center,clickableIcons:a.clickableIcons,controlSize:a.controlSize,disableDefaultUI:a.disableDefaultUi,disableDoubleClickZoom:a.disableDoubleClickZoom,draggable:a.draggable,draggableCursor:a.draggableCursor, | ||
draggingCursor:a.draggingCursor,fullscreenControl:a.fullscreenControl,fullscreenControlOptions:a.fullscreenControlPosition?{position:null===(b=f.value)||void 0===b?void 0:b.ControlPosition[a.fullscreenControlPosition]}:{},gestureHandling:a.gestureHandling,heading:a.heading,keyboardShortcuts:a.keyboardShortcuts,mapTypeControl:a.mapTypeControl,mapTypeControlOptions:a.mapTypeControlOptions,mapTypeId:a.mapTypeId,maxZoom:a.maxZoom,minZoom:a.minZoom,noClear:a.noClear,panControl:a.panControl,panControlOptions:a.panControlPosition? | ||
{position:null===(c=f.value)||void 0===c?void 0:c.ControlPosition[a.panControlPosition]}:{},restriction:a.restriction,rotateControl:a.rotateControl,rotateControlOptions:a.rotateControlPosition?{position:null===(d=f.value)||void 0===d?void 0:d.ControlPosition[a.rotateControlPosition]}:{},scaleControl:a.scaleControl,scaleControlOptions:a.scaleControlStyle?{style:a.scaleControlStyle}:{},scrollwheel:a.scrollwheel,streetView:a.streetView,streetViewControl:a.streetViewControl,streetViewControlOptions:a.streetViewControlPosition? | ||
{position:null===(e=f.value)||void 0===e?void 0:e.ControlPosition[a.streetViewControlPosition]}:{},styles:a.styles,tilt:a.tilt,zoom:a.zoom,zoomControl:a.zoomControl,zoomControlOptions:a.zoomControlPosition?{position:null===(h=f.value)||void 0===h?void 0:h.ControlPosition[a.zoomControlPosition]}:{}};Object.keys(k).forEach(a=>void 0===k[a]&&delete k[a]);return k};vue.onBeforeUnmount(()=>{var a;d.value&&(null===(a=f.value)||void 0===a?void 0:a.event.clearInstanceListeners(d.value))});"undefined"!==typeof window&& | ||
loadNow("places",a.apiKey).then(({maps:g})=>{({Map:g}=f.value=g);d.value=new g(e.value,h());mapEvents.forEach(a=>{var c;null===(c=d.value)||void 0===c?void 0:c.addListener(a,()=>b(a))});c.value=!0;g=Object.keys(a).filter(a=>!["center","zoom"].includes(a)).map(b=>vue.toRef(a,b));vue.watch([()=>a.center,()=>a.zoom,...g],([a,b],[c,e])=>{var f,g,l,m=h();m=__rest(m,["center","zoom"]);null===(f=d.value)||void 0===f?void 0:f.setOptions(m);void 0!==b&&b!==e&&(null===(g=d.value)||void 0===g?void 0:g.setZoom(b)); | ||
!a||c&&a.lng===c.lng&&a.lat===c.lat||(null===(l=d.value)||void 0===l?void 0:l.panTo(a))})});return{mapRef:e,ready:c,map:d,api:f}}});let _hoisted_1={ref:"mapRef"};function render(a,b,e,c,d,f){return vue.openBlock(),vue.createBlock("div",_hoisted_1,[vue.renderSlot(a.$slots,"default")],512)}script.render=render;script.__file="src/components/GoogleMap.vue"; | ||
var Marker=vue.defineComponent({props:{options:{type:Object,required:!0}},setup(a,{emit:b}){a=vue.toRef(a,"options");return{marker:useSetupMapComponent("Marker",markerEvents,a,b)}},render:()=>null}),Polyline=vue.defineComponent({props:{options:{type:Object,required:!0}},setup(a,{emit:b}){a=vue.toRef(a,"options");return{polyline:useSetupMapComponent("Polyline",polylineEvents,a,b)}},render:()=>null}),Polygon=vue.defineComponent({props:{options:{type:Object,required:!0}},setup(a,{emit:b}){a=vue.toRef(a, | ||
"options");return{polygon:useSetupMapComponent("Polygon",polygonEvents,a,b)}},render:()=>null}),Rectangle=vue.defineComponent({props:{options:{type:Object,required:!0}},setup(a,{emit:b}){a=vue.toRef(a,"options");return{rectangle:useSetupMapComponent("Rectangle",rectangleEvents,a,b)}},render:()=>null}),Circle=vue.defineComponent({props:{options:{type:Object,required:!0}},setup(a,{emit:b}){a=vue.toRef(a,"options");return{circle:useSetupMapComponent("Circle",circleEvents,a,b)}},render:()=>null}),script$1= | ||
vue.defineComponent({props:{position:{type:String,required:!0},index:Number},setup(a){let b=vue.ref(null),{map:e,api:c}=useMap();vue.watch([e,()=>a.position,()=>a.index],(d,f,h)=>{e.value&&c.value&&(a.index&&(b.value.index=a.index),b.value&&e.value.controls[c.value.ControlPosition[a.position]].push(b.value));h(()=>{if(e.value&&c.value&&b.value){let a=void 0;e.value.controls[c.value.ControlPosition[f[1]]].forEach((c,d)=>{c===b.value&&(a=d)});a&&e.value.controls[c.value.ControlPosition[f[1]]].removeAt(a)}})}); | ||
return{controlRef:b}}});let _hoisted_1$1={ref:"controlRef"};function render$1(a,b,e,c,d,f){return vue.openBlock(),vue.createBlock("div",_hoisted_1$1,[vue.renderSlot(a.$slots,"default")],512)}script$1.render=render$1;script$1.__file="src/components/CustomControl.vue";exports.Circle=Circle;exports.CustomControl=script$1;exports.GoogleMap=script;exports.Marker=Marker;exports.Polygon=Polygon;exports.Polyline=Polyline;exports.Rectangle=Rectangle | ||
var Marker=vue.defineComponent({props:{options:{type:Object,required:!0}},emits:markerEvents,setup(a,{emit:b}){a=vue.toRef(a,"options");return{marker:useSetupMapComponent("Marker",markerEvents,a,b)}},render:()=>null}),Polyline=vue.defineComponent({props:{options:{type:Object,required:!0}},emits:polylineEvents,setup(a,{emit:b}){a=vue.toRef(a,"options");return{polyline:useSetupMapComponent("Polyline",polylineEvents,a,b)}},render:()=>null}),Polygon=vue.defineComponent({props:{options:{type:Object,required:!0}}, | ||
emits:polygonEvents,setup(a,{emit:b}){a=vue.toRef(a,"options");return{polygon:useSetupMapComponent("Polygon",polygonEvents,a,b)}},render:()=>null}),Rectangle=vue.defineComponent({props:{options:{type:Object,required:!0}},emits:rectangleEvents,setup(a,{emit:b}){a=vue.toRef(a,"options");return{rectangle:useSetupMapComponent("Rectangle",rectangleEvents,a,b)}},render:()=>null}),Circle=vue.defineComponent({props:{options:{type:Object,required:!0}},emits:circleEvents,setup(a,{emit:b}){a=vue.toRef(a,"options"); | ||
return{circle:useSetupMapComponent("Circle",circleEvents,a,b)}},render:()=>null}),script$1=vue.defineComponent({props:{position:{type:String,required:!0},index:Number},setup(a){let b=vue.ref(null),{map:e,api:c}=useMap();vue.watch([e,()=>a.position,()=>a.index],(d,f,h)=>{e.value&&c.value&&(a.index&&(b.value.index=a.index),b.value&&e.value.controls[c.value.ControlPosition[a.position]].push(b.value));h(()=>{if(e.value&&c.value&&b.value){let a=void 0;e.value.controls[c.value.ControlPosition[f[1]]].forEach((c, | ||
d)=>{c===b.value&&(a=d)});a&&e.value.controls[c.value.ControlPosition[f[1]]].removeAt(a)}})});return{controlRef:b}}});let _hoisted_1$1={ref:"controlRef"};function render$1(a,b,e,c,d,f){return vue.openBlock(),vue.createBlock("div",_hoisted_1$1,[vue.renderSlot(a.$slots,"default")],512)}script$1.render=render$1;script$1.__file="src/components/CustomControl.vue";exports.Circle=Circle;exports.CustomControl=script$1;exports.GoogleMap=script;exports.Marker=Marker;exports.Polygon=Polygon; | ||
exports.Polyline=Polyline;exports.Rectangle=Rectangle |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,o,t=require("vue");(o=e||(e={}))[o.Continue=100]="Continue",o[o.Success=200]="Success",o[o.Created=201]="Created",o[o.Accepted=202]="Accepted",o[o.NoContent=204]="NoContent",o[o.MovedPermenantly=301]="MovedPermenantly",o[o.TemporaryRedirect=307]="TemporaryRedirect",o[o.NotModified=304]="NotModified",o[o.BadRequest=400]="BadRequest",o[o.Unauthorized=401]="Unauthorized",o[o.PaymentRequired=402]="PaymentRequired",o[o.Forbidden=403]="Forbidden",o[o.NotFound=404]="NotFound",o[o.MethodNotAllowed=405]="MethodNotAllowed",o[o.RequestTimeout=408]="RequestTimeout",o[o.Conflict=409]="Conflict",o[o.Gone=410]="Gone",o[o.IAmATeapot=418]="IAmATeapot",o[o.UnprocessableEntity=422]="UnprocessableEntity",o[o.TooManyRequests=429]="TooManyRequests",o[o.InternalServerError=500]="InternalServerError",o[o.NotImplemented=501]="NotImplemented",o[o.BadGateway=502]="BadGateway",o[o.ServiceUnavailable=503]="ServiceUnavailable",o[o.GatewayTimeout=504]="GatewayTimeout",o[o.AuthenticationRequired=511]="AuthenticationRequired",Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});let n="https://maps.googleapis.com/maps/api/js";async function r(e,o){return l(e)||await async function(e,o,t={}){if(!l(e)){var r=async(o=2e3)=>{throw await async function(e){return new Promise((o=>setTimeout(o,e)))}(o),Error(`Timed out waiting for Google API to load [ ${e} / ${o} ]`)},i=()=>{var t=document.createElement("script");return t.id=`google-maps-${e}-js`,t.src=function(e,o,t=!0){let r=`${n}?libraries=${e}&sensors=false`;return o&&(r=`${r}&key=${o}`),t&&(r=`${r}&callback=${e}LoaderCallback`),r}(e,o),document.querySelector("head").appendChild(t),new Promise((o=>{window[e+"LoaderCallback"]=()=>{o()}}))};return Promise.race(t.timeout?[r(t.timeout),i()]:[i()])}console.info(`Attempt to add script tag for the "${e}" library in Google Maps ignored as this tag already exists in the DOM${o?" [ "+o+"]":""}`)}(e,o),window.google}function l(e,o){return!!document.querySelector(`#google-maps-${e}-js`)}let i=t.ref(null),a=t.ref(null),s=()=>({map:i,api:a}),d=(e,o,n,r)=>{let l=null;const i=t.ref(null),{map:a,api:d}=s();return t.watch([a,n],((t,s,u)=>{a.value&&d.value&&(i.value=l=new d.value[e](Object.assign(Object.assign({},n.value),{map:a.value})),o.forEach((e=>{null==l||l.addListener(e,(()=>r(e)))}))),u((()=>{var e;l&&(null===(e=d.value)||void 0===e||e.event.clearInstanceListeners(l),l.setMap(null))}))})),{component:i}},u="bounds_changed center_changed click dblclick drag dragend dragstart heading_changed idle maptypeid_changed mousemove mouseout mouseover projection_changed resize rightclick tilesloaded tilt_changed zoom_changed".split(" "),c="animation_changed click dblclick rightclick dragstart dragend drag mouseover mousedown mouseup draggable_changed clickable_changed cursor_changed flat_changed rightclick zindex_changed icon_changed position_changed shape_changed title_changed visible_changed".split(" "),p="click dblclick drag dragend dragstart mousedown mousemove mouseout mouseover mouseup rightclick".split(" "),m=p,g=p.concat(["bounds_changed"]),v=p.concat(["center_changed","radius_changed"]);var C=t.defineComponent({props:{apiKey:String,backgroundColor:String,center:Object,clickableIcons:{type:Boolean,default:void 0},controlSize:Number,disableDefaultUi:{type:Boolean,default:void 0},disableDoubleClickZoom:{type:Boolean,default:void 0},draggable:{type:Boolean,default:void 0},draggableCursor:String,draggingCursor:String,fullscreenControl:{type:Boolean,default:void 0},fullscreenControlPosition:String,gestureHandling:String,heading:Number,keyboardShortcuts:{type:Boolean,default:void 0},mapTypeControl:{type:Boolean,default:void 0},mapTypeControlOptions:Object,mapTypeId:{type:[Number,String]},maxZoom:Number,minZoom:Number,noClear:{type:Boolean,default:void 0},panControl:{type:Boolean,default:void 0},panControlPosition:String,restriction:Object,rotateControl:{type:Boolean,default:void 0},rotateControlPosition:String,scaleControl:{type:Boolean,default:void 0},scaleControlStyle:Number,scrollwheel:{type:Boolean,default:void 0},streetView:Object,streetViewControl:{type:Boolean,default:void 0},streetViewControlPosition:String,styles:Array,tilt:Number,zoom:Number,zoomControl:{type:Boolean,default:void 0},zoomControlPosition:String},setup(e,{emit:o}){let n=t.ref(null),l=t.ref(!1),{map:i,api:a}=s(),d=()=>{var o,t,n,r,l;const i={backgroundColor:e.backgroundColor,center:e.center,clickableIcons:e.clickableIcons,controlSize:e.controlSize,disableDefaultUI:e.disableDefaultUi,disableDoubleClickZoom:e.disableDoubleClickZoom,draggable:e.draggable,draggableCursor:e.draggableCursor,draggingCursor:e.draggingCursor,fullscreenControl:e.fullscreenControl,fullscreenControlOptions:e.fullscreenControlPosition?{position:null===(o=a.value)||void 0===o?void 0:o.ControlPosition[e.fullscreenControlPosition]}:{},gestureHandling:e.gestureHandling,heading:e.heading,keyboardShortcuts:e.keyboardShortcuts,mapTypeControl:e.mapTypeControl,mapTypeControlOptions:e.mapTypeControlOptions,mapTypeId:e.mapTypeId,maxZoom:e.maxZoom,minZoom:e.minZoom,noClear:e.noClear,panControl:e.panControl,panControlOptions:e.panControlPosition?{position:null===(t=a.value)||void 0===t?void 0:t.ControlPosition[e.panControlPosition]}:{},restriction:e.restriction,rotateControl:e.rotateControl,rotateControlOptions:e.rotateControlPosition?{position:null===(n=a.value)||void 0===n?void 0:n.ControlPosition[e.rotateControlPosition]}:{},scaleControl:e.scaleControl,scaleControlOptions:e.scaleControlStyle?{style:e.scaleControlStyle}:{},scrollwheel:e.scrollwheel,streetView:e.streetView,streetViewControl:e.streetViewControl,streetViewControlOptions:e.streetViewControlPosition?{position:null===(r=a.value)||void 0===r?void 0:r.ControlPosition[e.streetViewControlPosition]}:{},styles:e.styles,tilt:e.tilt,zoom:e.zoom,zoomControl:e.zoomControl,zoomControlOptions:e.zoomControlPosition?{position:null===(l=a.value)||void 0===l?void 0:l.ControlPosition[e.zoomControlPosition]}:{}};return Object.keys(i).forEach((e=>void 0===i[e]&&delete i[e])),i};return t.onBeforeUnmount((()=>{var e;i.value&&(null===(e=a.value)||void 0===e||e.event.clearInstanceListeners(i.value))})),"undefined"!=typeof window&&r("places",e.apiKey).then((({maps:r})=>{({Map:r}=a.value=r),i.value=new r(n.value,d()),u.forEach((e=>{var t;null===(t=i.value)||void 0===t||t.addListener(e,(()=>o(e)))})),l.value=!0,r=Object.keys(e).filter((e=>!["center","zoom"].includes(e))).map((o=>t.toRef(e,o))),t.watch([()=>e.center,()=>e.zoom,...r],(([e,o],[t,n])=>{var r,l,a,s=d();s=function(e,o){var t,n={};for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&0>o.indexOf(t)&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)0>o.indexOf(t[r])&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(n[t[r]]=e[t[r]])}return n}(s,["center","zoom"]),null===(r=i.value)||void 0===r||r.setOptions(s),void 0!==o&&o!==n&&(null===(l=i.value)||void 0===l||l.setZoom(o)),!e||t&&e.lng===t.lng&&e.lat===t.lat||null===(a=i.value)||void 0===a||a.panTo(e)}))})),{mapRef:n,ready:l,map:i,api:a}}});let y={ref:"mapRef"};C.render=function(e,o,n,r,l,i){return t.openBlock(),t.createBlock("div",y,[t.renderSlot(e.$slots,"default")],512)},C.__file="src/components/GoogleMap.vue";var f=t.defineComponent({props:{options:{type:Object,required:!0}},setup:(e,{emit:o})=>(e=t.toRef(e,"options"),{marker:d("Marker",c,e,o)}),render:()=>null}),b=t.defineComponent({props:{options:{type:Object,required:!0}},setup:(e,{emit:o})=>(e=t.toRef(e,"options"),{polyline:d("Polyline",p,e,o)}),render:()=>null}),h=t.defineComponent({props:{options:{type:Object,required:!0}},setup:(e,{emit:o})=>(e=t.toRef(e,"options"),{polygon:d("Polygon",m,e,o)}),render:()=>null}),w=t.defineComponent({props:{options:{type:Object,required:!0}},setup:(e,{emit:o})=>(e=t.toRef(e,"options"),{rectangle:d("Rectangle",g,e,o)}),render:()=>null}),P=t.defineComponent({props:{options:{type:Object,required:!0}},setup:(e,{emit:o})=>(e=t.toRef(e,"options"),{circle:d("Circle",v,e,o)}),render:()=>null}),k=t.defineComponent({props:{position:{type:String,required:!0},index:Number},setup(e){let o=t.ref(null),{map:n,api:r}=s();return t.watch([n,()=>e.position,()=>e.index],((t,l,i)=>{n.value&&r.value&&(e.index&&(o.value.index=e.index),o.value&&n.value.controls[r.value.ControlPosition[e.position]].push(o.value)),i((()=>{if(n.value&&r.value&&o.value){let e=void 0;n.value.controls[r.value.ControlPosition[l[1]]].forEach(((t,n)=>{t===o.value&&(e=n)})),e&&n.value.controls[r.value.ControlPosition[l[1]]].removeAt(e)}}))})),{controlRef:o}}});let O={ref:"controlRef"};k.render=function(e,o,n,r,l,i){return t.openBlock(),t.createBlock("div",O,[t.renderSlot(e.$slots,"default")],512)},k.__file="src/components/CustomControl.vue",exports.Circle=P,exports.CustomControl=k,exports.GoogleMap=C,exports.Marker=f,exports.Polygon=h,exports.Polyline=b,exports.Rectangle=w; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,o,t=require("vue");(o=e||(e={}))[o.Continue=100]="Continue",o[o.Success=200]="Success",o[o.Created=201]="Created",o[o.Accepted=202]="Accepted",o[o.NoContent=204]="NoContent",o[o.MovedPermenantly=301]="MovedPermenantly",o[o.TemporaryRedirect=307]="TemporaryRedirect",o[o.NotModified=304]="NotModified",o[o.BadRequest=400]="BadRequest",o[o.Unauthorized=401]="Unauthorized",o[o.PaymentRequired=402]="PaymentRequired",o[o.Forbidden=403]="Forbidden",o[o.NotFound=404]="NotFound",o[o.MethodNotAllowed=405]="MethodNotAllowed",o[o.RequestTimeout=408]="RequestTimeout",o[o.Conflict=409]="Conflict",o[o.Gone=410]="Gone",o[o.IAmATeapot=418]="IAmATeapot",o[o.UnprocessableEntity=422]="UnprocessableEntity",o[o.TooManyRequests=429]="TooManyRequests",o[o.InternalServerError=500]="InternalServerError",o[o.NotImplemented=501]="NotImplemented",o[o.BadGateway=502]="BadGateway",o[o.ServiceUnavailable=503]="ServiceUnavailable",o[o.GatewayTimeout=504]="GatewayTimeout",o[o.AuthenticationRequired=511]="AuthenticationRequired",Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});let n="https://maps.googleapis.com/maps/api/js";async function r(e,o){return l(e)||await async function(e,o,t={}){if(!l(e)){var r=async(o=2e3)=>{throw await async function(e){return new Promise((o=>setTimeout(o,e)))}(o),Error(`Timed out waiting for Google API to load [ ${e} / ${o} ]`)},i=()=>{var t=document.createElement("script");return t.id=`google-maps-${e}-js`,t.src=function(e,o,t=!0){let r=`${n}?libraries=${e}&sensors=false`;return o&&(r=`${r}&key=${o}`),t&&(r=`${r}&callback=${e}LoaderCallback`),r}(e,o),document.querySelector("head").appendChild(t),new Promise((o=>{window[e+"LoaderCallback"]=()=>{o()}}))};return Promise.race(t.timeout?[r(t.timeout),i()]:[i()])}console.info(`Attempt to add script tag for the "${e}" library in Google Maps ignored as this tag already exists in the DOM${o?" [ "+o+"]":""}`)}(e,o),window.google}function l(e,o){return!!document.querySelector(`#google-maps-${e}-js`)}let i=t.ref(null),a=t.ref(null),s=()=>({map:i,api:a}),d=(e,o,n,r)=>{let l=null;const i=t.ref(null),{map:a,api:d}=s();return t.watch([a,n],((t,s,u)=>{a.value&&d.value&&(i.value=l=new d.value[e](Object.assign(Object.assign({},n.value),{map:a.value})),o.forEach((e=>{null==l||l.addListener(e,(()=>r(e)))}))),u((()=>{var e;l&&(null===(e=d.value)||void 0===e||e.event.clearInstanceListeners(l),l.setMap(null))}))})),{component:i}},u="bounds_changed center_changed click dblclick drag dragend dragstart heading_changed idle maptypeid_changed mousemove mouseout mouseover projection_changed resize rightclick tilesloaded tilt_changed zoom_changed".split(" "),c="animation_changed click dblclick rightclick dragstart dragend drag mouseover mousedown mouseup draggable_changed clickable_changed cursor_changed flat_changed rightclick zindex_changed icon_changed position_changed shape_changed title_changed visible_changed".split(" "),p="click dblclick drag dragend dragstart mousedown mousemove mouseout mouseover mouseup rightclick".split(" "),m=p,g=p.concat(["bounds_changed"]),v=p.concat(["center_changed","radius_changed"]);var C=t.defineComponent({props:{apiKey:String,backgroundColor:String,center:Object,clickableIcons:{type:Boolean,default:void 0},controlSize:Number,disableDefaultUi:{type:Boolean,default:void 0},disableDoubleClickZoom:{type:Boolean,default:void 0},draggable:{type:Boolean,default:void 0},draggableCursor:String,draggingCursor:String,fullscreenControl:{type:Boolean,default:void 0},fullscreenControlPosition:String,gestureHandling:String,heading:Number,keyboardShortcuts:{type:Boolean,default:void 0},mapTypeControl:{type:Boolean,default:void 0},mapTypeControlOptions:Object,mapTypeId:{type:[Number,String]},maxZoom:Number,minZoom:Number,noClear:{type:Boolean,default:void 0},panControl:{type:Boolean,default:void 0},panControlPosition:String,restriction:Object,rotateControl:{type:Boolean,default:void 0},rotateControlPosition:String,scaleControl:{type:Boolean,default:void 0},scaleControlStyle:Number,scrollwheel:{type:Boolean,default:void 0},streetView:Object,streetViewControl:{type:Boolean,default:void 0},streetViewControlPosition:String,styles:Array,tilt:Number,zoom:Number,zoomControl:{type:Boolean,default:void 0},zoomControlPosition:String},emits:u,setup(e,{emit:o}){let n=t.ref(null),l=t.ref(!1),{map:i,api:a}=s(),d=()=>{var o,t,n,r,l;const i={backgroundColor:e.backgroundColor,center:e.center,clickableIcons:e.clickableIcons,controlSize:e.controlSize,disableDefaultUI:e.disableDefaultUi,disableDoubleClickZoom:e.disableDoubleClickZoom,draggable:e.draggable,draggableCursor:e.draggableCursor,draggingCursor:e.draggingCursor,fullscreenControl:e.fullscreenControl,fullscreenControlOptions:e.fullscreenControlPosition?{position:null===(o=a.value)||void 0===o?void 0:o.ControlPosition[e.fullscreenControlPosition]}:{},gestureHandling:e.gestureHandling,heading:e.heading,keyboardShortcuts:e.keyboardShortcuts,mapTypeControl:e.mapTypeControl,mapTypeControlOptions:e.mapTypeControlOptions,mapTypeId:e.mapTypeId,maxZoom:e.maxZoom,minZoom:e.minZoom,noClear:e.noClear,panControl:e.panControl,panControlOptions:e.panControlPosition?{position:null===(t=a.value)||void 0===t?void 0:t.ControlPosition[e.panControlPosition]}:{},restriction:e.restriction,rotateControl:e.rotateControl,rotateControlOptions:e.rotateControlPosition?{position:null===(n=a.value)||void 0===n?void 0:n.ControlPosition[e.rotateControlPosition]}:{},scaleControl:e.scaleControl,scaleControlOptions:e.scaleControlStyle?{style:e.scaleControlStyle}:{},scrollwheel:e.scrollwheel,streetView:e.streetView,streetViewControl:e.streetViewControl,streetViewControlOptions:e.streetViewControlPosition?{position:null===(r=a.value)||void 0===r?void 0:r.ControlPosition[e.streetViewControlPosition]}:{},styles:e.styles,tilt:e.tilt,zoom:e.zoom,zoomControl:e.zoomControl,zoomControlOptions:e.zoomControlPosition?{position:null===(l=a.value)||void 0===l?void 0:l.ControlPosition[e.zoomControlPosition]}:{}};return Object.keys(i).forEach((e=>void 0===i[e]&&delete i[e])),i};return t.onBeforeUnmount((()=>{var e;i.value&&(null===(e=a.value)||void 0===e||e.event.clearInstanceListeners(i.value))})),"undefined"!=typeof window&&r("places",e.apiKey).then((({maps:r})=>{({Map:r}=a.value=r),i.value=new r(n.value,d()),u.forEach((e=>{var t;null===(t=i.value)||void 0===t||t.addListener(e,(()=>o(e)))})),l.value=!0,r=Object.keys(e).filter((e=>!["center","zoom"].includes(e))).map((o=>t.toRef(e,o))),t.watch([()=>e.center,()=>e.zoom,...r],(([e,o],[t,n])=>{var r,l,a,s=d();s=function(e,o){var t,n={};for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&0>o.indexOf(t)&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)0>o.indexOf(t[r])&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(n[t[r]]=e[t[r]])}return n}(s,["center","zoom"]),null===(r=i.value)||void 0===r||r.setOptions(s),void 0!==o&&o!==n&&(null===(l=i.value)||void 0===l||l.setZoom(o)),!e||t&&e.lng===t.lng&&e.lat===t.lat||null===(a=i.value)||void 0===a||a.panTo(e)}))})),{mapRef:n,ready:l,map:i,api:a}}});let y={ref:"mapRef"};C.render=function(e,o,n,r,l,i){return t.openBlock(),t.createBlock("div",y,[t.renderSlot(e.$slots,"default")],512)},C.__file="src/components/GoogleMap.vue";var f=t.defineComponent({props:{options:{type:Object,required:!0}},emits:c,setup:(e,{emit:o})=>(e=t.toRef(e,"options"),{marker:d("Marker",c,e,o)}),render:()=>null}),b=t.defineComponent({props:{options:{type:Object,required:!0}},emits:p,setup:(e,{emit:o})=>(e=t.toRef(e,"options"),{polyline:d("Polyline",p,e,o)}),render:()=>null}),h=t.defineComponent({props:{options:{type:Object,required:!0}},emits:m,setup:(e,{emit:o})=>(e=t.toRef(e,"options"),{polygon:d("Polygon",m,e,o)}),render:()=>null}),w=t.defineComponent({props:{options:{type:Object,required:!0}},emits:g,setup:(e,{emit:o})=>(e=t.toRef(e,"options"),{rectangle:d("Rectangle",g,e,o)}),render:()=>null}),P=t.defineComponent({props:{options:{type:Object,required:!0}},emits:v,setup:(e,{emit:o})=>(e=t.toRef(e,"options"),{circle:d("Circle",v,e,o)}),render:()=>null}),k=t.defineComponent({props:{position:{type:String,required:!0},index:Number},setup(e){let o=t.ref(null),{map:n,api:r}=s();return t.watch([n,()=>e.position,()=>e.index],((t,l,i)=>{n.value&&r.value&&(e.index&&(o.value.index=e.index),o.value&&n.value.controls[r.value.ControlPosition[e.position]].push(o.value)),i((()=>{if(n.value&&r.value&&o.value){let e=void 0;n.value.controls[r.value.ControlPosition[l[1]]].forEach(((t,n)=>{t===o.value&&(e=n)})),e&&n.value.controls[r.value.ControlPosition[l[1]]].removeAt(e)}}))})),{controlRef:o}}});let O={ref:"controlRef"};k.render=function(e,o,n,r,l,i){return t.openBlock(),t.createBlock("div",O,[t.renderSlot(e.$slots,"default")],512)},k.__file="src/components/CustomControl.vue",exports.Circle=P,exports.CustomControl=k,exports.GoogleMap=C,exports.Marker=f,exports.Polygon=h,exports.Polyline=b,exports.Rectangle=w; |
@@ -16,3 +16,3 @@ import{ref,watch,defineComponent,onBeforeUnmount,toRef,openBlock,createBlock,renderSlot}from'vue';/* | ||
*****************************************************************************/ | ||
async function b(a){return new Promise(c=>setTimeout(c,a))}var p,q=p||(p={});q[q.Continue=100]="Continue";q[q.Success=200]="Success";q[q.Created=201]="Created";q[q.Accepted=202]="Accepted";q[q.NoContent=204]="NoContent";q[q.MovedPermenantly=301]="MovedPermenantly";q[q.TemporaryRedirect=307]="TemporaryRedirect";q[q.NotModified=304]="NotModified";q[q.BadRequest=400]="BadRequest";q[q.Unauthorized=401]="Unauthorized";q[q.PaymentRequired=402]="PaymentRequired";q[q.Forbidden=403]="Forbidden"; | ||
async function b(a){return new Promise(c=>setTimeout(c,a))}var n,q=n||(n={});q[q.Continue=100]="Continue";q[q.Success=200]="Success";q[q.Created=201]="Created";q[q.Accepted=202]="Accepted";q[q.NoContent=204]="NoContent";q[q.MovedPermenantly=301]="MovedPermenantly";q[q.TemporaryRedirect=307]="TemporaryRedirect";q[q.NotModified=304]="NotModified";q[q.BadRequest=400]="BadRequest";q[q.Unauthorized=401]="Unauthorized";q[q.PaymentRequired=402]="PaymentRequired";q[q.Forbidden=403]="Forbidden"; | ||
q[q.NotFound=404]="NotFound";q[q.MethodNotAllowed=405]="MethodNotAllowed";q[q.RequestTimeout=408]="RequestTimeout";q[q.Conflict=409]="Conflict";q[q.Gone=410]="Gone";q[q.IAmATeapot=418]="IAmATeapot";q[q.UnprocessableEntity=422]="UnprocessableEntity";q[q.TooManyRequests=429]="TooManyRequests";q[q.InternalServerError=500]="InternalServerError";q[q.NotImplemented=501]="NotImplemented";q[q.BadGateway=502]="BadGateway";q[q.ServiceUnavailable=503]="ServiceUnavailable";q[q.GatewayTimeout=504]="GatewayTimeout"; | ||
@@ -22,15 +22,15 @@ q[q.AuthenticationRequired=511]="AuthenticationRequired";Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});async function t(a,c){if(document.querySelector(`#google-maps-${a}-js`))return window.google;await u(a,c);return window.google} | ||
()=>{c()}})};return Promise.race(f.timeout?[d(f.timeout),e()]:[e()])}}function y(a,c,f=!0){let d=`${"https://maps.googleapis.com/maps/api/js"}?libraries=${a}&sensors=false`;c&&(d=`${d}&key=${c}`);f&&(d=`${d}&callback=${a}LoaderCallback`);return d} | ||
let z=ref(null),A=ref(null),B=(a,c,f,d)=>{let e=null;const g=ref(null),{map:k,api:h}={map:z,api:A};watch([k,f],(v,R,F)=>{k.value&&h.value&&(g.value=e=new h.value[a](Object.assign(Object.assign({},f.value),{map:k.value})),c.forEach(a=>{null===e||void 0===e?void 0:e.addListener(a,()=>d(a))}));F(()=>{var a;e&&(null===(a=h.value)||void 0===a?void 0:a.event.clearInstanceListeners(e),e.setMap(null))})});return{component:g}},C="bounds_changed center_changed click dblclick drag dragend dragstart heading_changed idle maptypeid_changed mousemove mouseout mouseover projection_changed resize rightclick tilesloaded tilt_changed zoom_changed".split(" "), | ||
D="animation_changed click dblclick rightclick dragstart dragend drag mouseover mousedown mouseup draggable_changed clickable_changed cursor_changed flat_changed rightclick zindex_changed icon_changed position_changed shape_changed title_changed visible_changed".split(" "),E="click dblclick drag dragend dragstart mousedown mousemove mouseout mouseover mouseup rightclick".split(" "),G=E.concat(["bounds_changed"]),H=E.concat(["center_changed","radius_changed"]); | ||
var I=defineComponent({props:{apiKey:String,backgroundColor:String,center:Object,clickableIcons:{type:Boolean,default:void 0},controlSize:Number,disableDefaultUi:{type:Boolean,default:void 0},disableDoubleClickZoom:{type:Boolean,default:void 0},draggable:{type:Boolean,default:void 0},draggableCursor:String,draggingCursor:String,fullscreenControl:{type:Boolean,default:void 0},fullscreenControlPosition:String,gestureHandling:String,heading:Number,keyboardShortcuts:{type:Boolean,default:void 0},mapTypeControl:{type:Boolean, | ||
let z=ref(null),A=ref(null),B=(a,c,f,d)=>{let e=null;const g=ref(null),{map:k,api:h}={map:z,api:A};watch([k,f],(v,R,J)=>{k.value&&h.value&&(g.value=e=new h.value[a](Object.assign(Object.assign({},f.value),{map:k.value})),c.forEach(a=>{null===e||void 0===e?void 0:e.addListener(a,()=>d(a))}));J(()=>{var a;e&&(null===(a=h.value)||void 0===a?void 0:a.event.clearInstanceListeners(e),e.setMap(null))})});return{component:g}},C="bounds_changed center_changed click dblclick drag dragend dragstart heading_changed idle maptypeid_changed mousemove mouseout mouseover projection_changed resize rightclick tilesloaded tilt_changed zoom_changed".split(" "), | ||
D="animation_changed click dblclick rightclick dragstart dragend drag mouseover mousedown mouseup draggable_changed clickable_changed cursor_changed flat_changed rightclick zindex_changed icon_changed position_changed shape_changed title_changed visible_changed".split(" "),E="click dblclick drag dragend dragstart mousedown mousemove mouseout mouseover mouseup rightclick".split(" "),F=E.concat(["bounds_changed"]),G=E.concat(["center_changed","radius_changed"]); | ||
var H=defineComponent({props:{apiKey:String,backgroundColor:String,center:Object,clickableIcons:{type:Boolean,default:void 0},controlSize:Number,disableDefaultUi:{type:Boolean,default:void 0},disableDoubleClickZoom:{type:Boolean,default:void 0},draggable:{type:Boolean,default:void 0},draggableCursor:String,draggingCursor:String,fullscreenControl:{type:Boolean,default:void 0},fullscreenControlPosition:String,gestureHandling:String,heading:Number,keyboardShortcuts:{type:Boolean,default:void 0},mapTypeControl:{type:Boolean, | ||
default:void 0},mapTypeControlOptions:Object,mapTypeId:{type:[Number,String]},maxZoom:Number,minZoom:Number,noClear:{type:Boolean,default:void 0},panControl:{type:Boolean,default:void 0},panControlPosition:String,restriction:Object,rotateControl:{type:Boolean,default:void 0},rotateControlPosition:String,scaleControl:{type:Boolean,default:void 0},scaleControlStyle:Number,scrollwheel:{type:Boolean,default:void 0},streetView:Object,streetViewControl:{type:Boolean,default:void 0},streetViewControlPosition:String, | ||
styles:Array,tilt:Number,zoom:Number,zoomControl:{type:Boolean,default:void 0},zoomControlPosition:String},setup(a,{emit:c}){let f=ref(null),d=ref(!1),{map:e,api:g}={map:z,api:A},k=()=>{var c,e,d,f,k;const r={backgroundColor:a.backgroundColor,center:a.center,clickableIcons:a.clickableIcons,controlSize:a.controlSize,disableDefaultUI:a.disableDefaultUi,disableDoubleClickZoom:a.disableDoubleClickZoom,draggable:a.draggable,draggableCursor:a.draggableCursor,draggingCursor:a.draggingCursor,fullscreenControl:a.fullscreenControl, | ||
styles:Array,tilt:Number,zoom:Number,zoomControl:{type:Boolean,default:void 0},zoomControlPosition:String},emits:C,setup(a,{emit:c}){let f=ref(null),d=ref(!1),{map:e,api:g}={map:z,api:A},k=()=>{var c,e,d,f,k;const r={backgroundColor:a.backgroundColor,center:a.center,clickableIcons:a.clickableIcons,controlSize:a.controlSize,disableDefaultUI:a.disableDefaultUi,disableDoubleClickZoom:a.disableDoubleClickZoom,draggable:a.draggable,draggableCursor:a.draggableCursor,draggingCursor:a.draggingCursor,fullscreenControl:a.fullscreenControl, | ||
fullscreenControlOptions:a.fullscreenControlPosition?{position:null===(c=g.value)||void 0===c?void 0:c.ControlPosition[a.fullscreenControlPosition]}:{},gestureHandling:a.gestureHandling,heading:a.heading,keyboardShortcuts:a.keyboardShortcuts,mapTypeControl:a.mapTypeControl,mapTypeControlOptions:a.mapTypeControlOptions,mapTypeId:a.mapTypeId,maxZoom:a.maxZoom,minZoom:a.minZoom,noClear:a.noClear,panControl:a.panControl,panControlOptions:a.panControlPosition?{position:null===(e=g.value)||void 0===e?void 0: | ||
e.ControlPosition[a.panControlPosition]}:{},restriction:a.restriction,rotateControl:a.rotateControl,rotateControlOptions:a.rotateControlPosition?{position:null===(d=g.value)||void 0===d?void 0:d.ControlPosition[a.rotateControlPosition]}:{},scaleControl:a.scaleControl,scaleControlOptions:a.scaleControlStyle?{style:a.scaleControlStyle}:{},scrollwheel:a.scrollwheel,streetView:a.streetView,streetViewControl:a.streetViewControl,streetViewControlOptions:a.streetViewControlPosition?{position:null===(f=g.value)|| | ||
void 0===f?void 0:f.ControlPosition[a.streetViewControlPosition]}:{},styles:a.styles,tilt:a.tilt,zoom:a.zoom,zoomControl:a.zoomControl,zoomControlOptions:a.zoomControlPosition?{position:null===(k=g.value)||void 0===k?void 0:k.ControlPosition[a.zoomControlPosition]}:{}};Object.keys(r).forEach(a=>void 0===r[a]&&delete r[a]);return r};onBeforeUnmount(()=>{var a;e.value&&(null===(a=g.value)||void 0===a?void 0:a.event.clearInstanceListeners(e.value))});"undefined"!==typeof window&&t("places",a.apiKey).then(({maps:h})=> | ||
{({Map:h}=g.value=h);e.value=new h(f.value,k());C.forEach(a=>{var d;null===(d=e.value)||void 0===d?void 0:d.addListener(a,()=>c(a))});d.value=!0;h=Object.keys(a).filter(a=>!["center","zoom"].includes(a)).map(c=>toRef(a,c));watch([()=>a.center,()=>a.zoom,...h],([a,c],[d,f])=>{var g,h,w,m=k(),v=["center","zoom"],x={},l;for(l in m)Object.prototype.hasOwnProperty.call(m,l)&&0>v.indexOf(l)&&(x[l]=m[l]);if(null!=m&&"function"===typeof Object.getOwnPropertySymbols){var n=0;for(l=Object.getOwnPropertySymbols(m);n< | ||
l.length;n++)0>v.indexOf(l[n])&&Object.prototype.propertyIsEnumerable.call(m,l[n])&&(x[l[n]]=m[l[n]])}null===(g=e.value)||void 0===g?void 0:g.setOptions(x);void 0!==c&&c!==f&&(null===(h=e.value)||void 0===h?void 0:h.setZoom(c));!a||d&&a.lng===d.lng&&a.lat===d.lat||(null===(w=e.value)||void 0===w?void 0:w.panTo(a))})});return{mapRef:f,ready:d,map:e,api:g}}});let J={ref:"mapRef"};I.render=function(a){return openBlock(),createBlock("div",J,[renderSlot(a.$slots,"default")],512)};I.__file="src/components/GoogleMap.vue"; | ||
var K=defineComponent({props:{options:{type:Object,required:!0}},setup(a,{emit:c}){a=toRef(a,"options");return{marker:B("Marker",D,a,c)}},render:()=>null}),L=defineComponent({props:{options:{type:Object,required:!0}},setup(a,{emit:c}){a=toRef(a,"options");return{polyline:B("Polyline",E,a,c)}},render:()=>null}),M=defineComponent({props:{options:{type:Object,required:!0}},setup(a,{emit:c}){a=toRef(a,"options");return{polygon:B("Polygon",E,a,c)}},render:()=>null}),N=defineComponent({props:{options:{type:Object, | ||
required:!0}},setup(a,{emit:c}){a=toRef(a,"options");return{rectangle:B("Rectangle",G,a,c)}},render:()=>null}),O=defineComponent({props:{options:{type:Object,required:!0}},setup(a,{emit:c}){a=toRef(a,"options");return{circle:B("Circle",H,a,c)}},render:()=>null}),P=defineComponent({props:{position:{type:String,required:!0},index:Number},setup(a){let c=ref(null),{map:f,api:d}={map:z,api:A};watch([f,()=>a.position,()=>a.index],(e,g,k)=>{f.value&&d.value&&(a.index&&(c.value.index=a.index),c.value&&f.value.controls[d.value.ControlPosition[a.position]].push(c.value)); | ||
k(()=>{if(f.value&&d.value&&c.value){let a=void 0;f.value.controls[d.value.ControlPosition[g[1]]].forEach((d,e)=>{d===c.value&&(a=e)});a&&f.value.controls[d.value.ControlPosition[g[1]]].removeAt(a)}})});return{controlRef:c}}});let Q={ref:"controlRef"};P.render=function(a){return openBlock(),createBlock("div",Q,[renderSlot(a.$slots,"default")],512)};P.__file="src/components/CustomControl.vue"; | ||
export{O as Circle,P as CustomControl,I as GoogleMap,K as Marker,M as Polygon,L as Polyline,N as Rectangle} | ||
{({Map:h}=g.value=h);e.value=new h(f.value,k());C.forEach(a=>{var d;null===(d=e.value)||void 0===d?void 0:d.addListener(a,()=>c(a))});d.value=!0;h=Object.keys(a).filter(a=>!["center","zoom"].includes(a)).map(c=>toRef(a,c));watch([()=>a.center,()=>a.zoom,...h],([a,c],[d,f])=>{var g,h,w,m=k(),v=["center","zoom"],x={},l;for(l in m)Object.prototype.hasOwnProperty.call(m,l)&&0>v.indexOf(l)&&(x[l]=m[l]);if(null!=m&&"function"===typeof Object.getOwnPropertySymbols){var p=0;for(l=Object.getOwnPropertySymbols(m);p< | ||
l.length;p++)0>v.indexOf(l[p])&&Object.prototype.propertyIsEnumerable.call(m,l[p])&&(x[l[p]]=m[l[p]])}null===(g=e.value)||void 0===g?void 0:g.setOptions(x);void 0!==c&&c!==f&&(null===(h=e.value)||void 0===h?void 0:h.setZoom(c));!a||d&&a.lng===d.lng&&a.lat===d.lat||(null===(w=e.value)||void 0===w?void 0:w.panTo(a))})});return{mapRef:f,ready:d,map:e,api:g}}});let I={ref:"mapRef"};H.render=function(a){return openBlock(),createBlock("div",I,[renderSlot(a.$slots,"default")],512)};H.__file="src/components/GoogleMap.vue"; | ||
var K=defineComponent({props:{options:{type:Object,required:!0}},emits:D,setup(a,{emit:c}){a=toRef(a,"options");return{marker:B("Marker",D,a,c)}},render:()=>null}),L=defineComponent({props:{options:{type:Object,required:!0}},emits:E,setup(a,{emit:c}){a=toRef(a,"options");return{polyline:B("Polyline",E,a,c)}},render:()=>null}),M=defineComponent({props:{options:{type:Object,required:!0}},emits:E,setup(a,{emit:c}){a=toRef(a,"options");return{polygon:B("Polygon",E,a,c)}},render:()=>null}),N=defineComponent({props:{options:{type:Object, | ||
required:!0}},emits:F,setup(a,{emit:c}){a=toRef(a,"options");return{rectangle:B("Rectangle",F,a,c)}},render:()=>null}),O=defineComponent({props:{options:{type:Object,required:!0}},emits:G,setup(a,{emit:c}){a=toRef(a,"options");return{circle:B("Circle",G,a,c)}},render:()=>null}),P=defineComponent({props:{position:{type:String,required:!0},index:Number},setup(a){let c=ref(null),{map:f,api:d}={map:z,api:A};watch([f,()=>a.position,()=>a.index],(e,g,k)=>{f.value&&d.value&&(a.index&&(c.value.index=a.index), | ||
c.value&&f.value.controls[d.value.ControlPosition[a.position]].push(c.value));k(()=>{if(f.value&&d.value&&c.value){let a=void 0;f.value.controls[d.value.ControlPosition[g[1]]].forEach((d,e)=>{d===c.value&&(a=e)});a&&f.value.controls[d.value.ControlPosition[g[1]]].removeAt(a)}})});return{controlRef:c}}});let Q={ref:"controlRef"};P.render=function(a){return openBlock(),createBlock("div",Q,[renderSlot(a.$slots,"default")],512)};P.__file="src/components/CustomControl.vue"; | ||
export{O as Circle,P as CustomControl,H as GoogleMap,K as Marker,M as Polygon,L as Polyline,N as Rectangle} |
@@ -12,5 +12,5 @@ /// <reference types="googlemaps" /> | ||
}; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
options: google.maps.CircleOptions; | ||
} & {}>, {}>; | ||
export default _default; |
@@ -11,2 +11,3 @@ import { defineComponent, toRef } from 'vue'; | ||
}, | ||
emits: circleEvents, | ||
setup(props, { emit }) { | ||
@@ -13,0 +14,0 @@ const options = toRef(props, 'options'); |
@@ -12,5 +12,5 @@ /// <reference types="googlemaps" /> | ||
}; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
options: google.maps.MarkerOptions; | ||
} & {}>, {}>; | ||
export default _default; |
@@ -11,2 +11,3 @@ import { defineComponent, toRef } from 'vue'; | ||
}, | ||
emits: markerEvents, | ||
setup(props, { emit }) { | ||
@@ -13,0 +14,0 @@ const options = toRef(props, 'options'); |
@@ -12,5 +12,5 @@ /// <reference types="googlemaps" /> | ||
}; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
options: google.maps.PolygonOptions; | ||
} & {}>, {}>; | ||
export default _default; |
@@ -11,2 +11,3 @@ import { defineComponent, toRef } from 'vue'; | ||
}, | ||
emits: polygonEvents, | ||
setup(props, { emit }) { | ||
@@ -13,0 +14,0 @@ const options = toRef(props, 'options'); |
@@ -12,5 +12,5 @@ /// <reference types="googlemaps" /> | ||
}; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
options: google.maps.PolylineOptions; | ||
} & {}>, {}>; | ||
export default _default; |
@@ -11,2 +11,3 @@ import { defineComponent, toRef } from 'vue'; | ||
}, | ||
emits: polylineEvents, | ||
setup(props, { emit }) { | ||
@@ -13,0 +14,0 @@ const options = toRef(props, 'options'); |
@@ -12,5 +12,5 @@ /// <reference types="googlemaps" /> | ||
}; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
options: google.maps.RectangleOptions; | ||
} & {}>, {}>; | ||
export default _default; |
@@ -11,2 +11,3 @@ import { defineComponent, toRef } from 'vue'; | ||
}, | ||
emits: rectangleEvents, | ||
setup(props, { emit }) { | ||
@@ -13,0 +14,0 @@ const options = toRef(props, 'options'); |
{ | ||
"name": "vue3-google-map", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
104104
2333