vue3-google-map
Advanced tools
Comparing version 0.13.1 to 0.13.2
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.13.2](https://github.com/inocan-group/vue3-google-maps/compare/v0.13.1...v0.13.2) (2022-06-28) | ||
### Bug Fixes | ||
* attrs fallthrough in custom markers and info windows ([c2a821f](https://github.com/inocan-group/vue3-google-maps/commit/c2a821feb1a27254a167eea717ac9f64fdd343a1)) | ||
### [0.13.1](https://github.com/inocan-group/vue3-google-maps/compare/v0.13.0...v0.13.1) (2022-06-27) | ||
@@ -7,0 +14,0 @@ |
@@ -49,6 +49,6 @@ /* | ||
_sfc_main$2.render=_sfc_render$2;let infoWindowEvents="closeclick content_changed domready position_changed visible zindex_changed".split(" "); | ||
var _sfc_main$1=vue.defineComponent({props:{options:{type:Object,default:()=>({})}},emits:infoWindowEvents,setup(a,{slots:b,emit:c}){let d=vue.ref(),e=vue.ref(),g=vue.inject(mapSymbol,vue.ref()),f=vue.inject(apiSymbol,vue.ref()),k=vue.inject(markerSymbol,vue.ref()),l,h=vue.computed(()=>{var a;return null===(a=b.default)||void 0===a?void 0:a.call(b).some(a=>a.type!==vue.Comment)});vue.onMounted(()=>{vue.watch([g,()=>a.options],([,a],[b,q])=>{b=JSON.stringify(a)!==JSON.stringify(q)||g.value!==b;g.value&& | ||
f.value&&b&&(d.value?(d.value.setOptions({...a,content:h.value?e.value:a.content}),k.value||d.value.open({map:g.value})):(d.value=d.value=vue.markRaw(new f.value.InfoWindow({...a,content:h.value?e.value:a.content})),k.value?l=k.value.addListener("click",()=>{d.value&&d.value.open({map:g.value,anchor:k.value})}):d.value.open({map:g.value}),infoWindowEvents.forEach(a=>{var b;null===(b=d.value)||void 0===b?void 0:b.addListener(a,b=>c(a,b))})))},{immediate:!0})});vue.onBeforeUnmount(()=>{var a;l&&l.remove(); | ||
d.value&&(null===(a=f.value)||void 0===a?void 0:a.event.clearInstanceListeners(d.value),d.value.close())});return{infoWindow:d,infoWindowRef:e,hasSlotContent:h}}}),css_248z$1="\n.info-window-wrapper[data-v-5b373d6e] {\n display: none;\n}\n.mapdiv .info-window-wrapper[data-v-5b373d6e] {\n display: inline-block;\n}\n";styleInject(css_248z$1);let _withId$1=vue.withScopeId("data-v-5b373d6e");vue.pushScopeId("data-v-5b373d6e");let _hoisted_1$1={key:0,class:"info-window-wrapper"},_hoisted_2={ref:"infoWindowRef"}; | ||
vue.popScopeId();let _sfc_render$1=_withId$1((a,b,c,d,e,g)=>a.hasSlotContent?(vue.openBlock(),vue.createBlock("div",_hoisted_1$1,[vue.createVNode("div",_hoisted_2,[vue.renderSlot(a.$slots,"default",{},void 0,!0)],512)])):vue.createCommentVNode("v-if",!0));_sfc_main$1.render=_sfc_render$1;_sfc_main$1.__scopeId="data-v-5b373d6e";function sortKD(a,b,c,d,e,g){if(!(e-d<=c)){var f=d+e>>1;select(a,b,f,d,e,g%2);sortKD(a,b,c,d,f-1,g+1);sortKD(a,b,c,f+1,e,g+1)}} | ||
var _sfc_main$1=vue.defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})}},emits:infoWindowEvents,setup(a,{slots:b,emit:c}){let d=vue.ref(),e=vue.ref(),g=vue.inject(mapSymbol,vue.ref()),f=vue.inject(apiSymbol,vue.ref()),k=vue.inject(markerSymbol,vue.ref()),l,h=vue.computed(()=>{var a;return null===(a=b.default)||void 0===a?void 0:a.call(b).some(a=>a.type!==vue.Comment)});vue.onMounted(()=>{vue.watch([g,()=>a.options],([,a],[b,q])=>{b=JSON.stringify(a)!==JSON.stringify(q)|| | ||
g.value!==b;g.value&&f.value&&b&&(d.value?(d.value.setOptions({...a,content:h.value?e.value:a.content}),k.value||d.value.open({map:g.value})):(d.value=d.value=vue.markRaw(new f.value.InfoWindow({...a,content:h.value?e.value:a.content})),k.value?l=k.value.addListener("click",()=>{d.value&&d.value.open({map:g.value,anchor:k.value})}):d.value.open({map:g.value}),infoWindowEvents.forEach(a=>{var b;null===(b=d.value)||void 0===b?void 0:b.addListener(a,b=>c(a,b))})))},{immediate:!0})});vue.onBeforeUnmount(()=> | ||
{var a;l&&l.remove();d.value&&(null===(a=f.value)||void 0===a?void 0:a.event.clearInstanceListeners(d.value),d.value.close())});return{infoWindow:d,infoWindowRef:e,hasSlotContent:h}}}),css_248z$1="\n.info-window-wrapper[data-v-5b373d6e] {\n display: none;\n}\n.mapdiv .info-window-wrapper[data-v-5b373d6e] {\n display: inline-block;\n}\n";styleInject(css_248z$1);let _withId$1=vue.withScopeId("data-v-5b373d6e");vue.pushScopeId("data-v-5b373d6e");let _hoisted_1$1={key:0,class:"info-window-wrapper"}; | ||
vue.popScopeId();let _sfc_render$1=_withId$1((a,b,c,d,e,g)=>a.hasSlotContent?(vue.openBlock(),vue.createBlock("div",_hoisted_1$1,[vue.createVNode("div",vue.mergeProps({ref:"infoWindowRef"},a.$attrs),[vue.renderSlot(a.$slots,"default",{},void 0,!0)],16)])):vue.createCommentVNode("v-if",!0));_sfc_main$1.render=_sfc_render$1;_sfc_main$1.__scopeId="data-v-5b373d6e";function sortKD(a,b,c,d,e,g){if(!(e-d<=c)){var f=d+e>>1;select(a,b,f,d,e,g%2);sortKD(a,b,c,d,f-1,g+1);sortKD(a,b,c,f+1,e,g+1)}} | ||
function select(a,b,c,d,e,g){for(;e>d;){if(600<e-d){var f=e-d+1,k=c-d+1,l=Math.log(f),h=.5*Math.exp(2*l/3);l=.5*Math.sqrt(l*h*(f-h)/f)*(0>k-f/2?-1:1);select(a,b,c,Math.max(d,Math.floor(c-k*h/f+l)),Math.min(e,Math.floor(c+(f-k)*h/f+l)),g)}f=b[2*c+g];k=d;h=e;swapItem(a,b,d,c);for(b[2*e+g]>f&&swapItem(a,b,d,e);k<h;){swapItem(a,b,k,h);k++;for(h--;b[2*k+g]<f;)k++;for(;b[2*h+g]>f;)h--}b[2*d+g]===f?swapItem(a,b,d,h):(h++,swapItem(a,b,h,e));h<=c&&(d=h+1);c<=h&&(e=h-1)}} | ||
@@ -90,5 +90,5 @@ function swapItem(a,b,c,d){swap(a,c,d);swap(b,2*c,2*d);swap(b,2*c+1,2*d+1)}function swap(a,b,c){let d=a[b];a[b]=a[c];a[c]=d} | ||
var MarkerCluster=vue.defineComponent({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})}},emits:markerClusterEvents,setup(a,{emit:b,expose:c,slots:d}){let e=vue.ref(),g=vue.inject(mapSymbol,vue.ref()),f=vue.inject(apiSymbol,vue.ref());vue.provide(markerClusterSymbol,e);vue.watch(g,()=>{g.value&&(e.value=vue.markRaw(new MarkerClusterer({map:g.value,...a.options})),markerClusterEvents.forEach(a=>{var c;null===(c=e.value)||void 0===c?void 0:c.addListener(a,c=>b(a,c))}))},{immediate:!0}); | ||
vue.onBeforeUnmount(()=>{var a;e.value&&(null===(a=f.value)||void 0===a?void 0:a.event.clearInstanceListeners(e.value),e.value.clearMarkers(),e.value.setMap(null))});c({markerCluster:e});return()=>{var a;return null===(a=d.default)||void 0===a?void 0:a.call(d)}}}),_sfc_main=vue.defineComponent({props:{options:{type:Object,required:!0}},setup(a,{slots:b,emit:c}){let d=vue.ref(),e=vue.ref(),g=vue.computed(()=>{var a;return null===(a=b.default)||void 0===a?void 0:a.call(b).some(a=>a.type!==vue.Comment)}), | ||
f=vue.computed(()=>({...a.options,element:d.value}));vue.onMounted(()=>{e=useSetupMapComponent(customMarkerClassSymbol,[],f,c)});return{customMarkerRef:d,customMarker:e,hasSlotContent:g}}}),css_248z="\n.custom-marker-wrapper[data-v-b9d5ec8a] {\n display: none;\n}\n.mapdiv .custom-marker-wrapper[data-v-b9d5ec8a] {\n display: inline-block;\n}\n";styleInject(css_248z);let _withId=vue.withScopeId("data-v-b9d5ec8a");vue.pushScopeId("data-v-b9d5ec8a");let _hoisted_1={key:0,class:"custom-marker-wrapper"}; | ||
vue.popScopeId();let _sfc_render=_withId((a,b,c,d,e,g)=>a.hasSlotContent?(vue.openBlock(),vue.createBlock("div",_hoisted_1,[vue.createVNode("div",{ref:"customMarkerRef",style:{cursor:a.$attrs.onClick?"pointer":void 0}},[vue.renderSlot(a.$slots,"default",{},void 0,!0)],4)])):vue.createCommentVNode("v-if",!0));_sfc_main.render=_sfc_render;_sfc_main.__scopeId="data-v-b9d5ec8a";exports.Circle=Circle;exports.CustomControl=_sfc_main$2;exports.CustomMarker=_sfc_main;exports.GoogleMap=_sfc_main$3; | ||
exports.InfoWindow=_sfc_main$1;exports.Marker=Marker;exports.MarkerCluster=MarkerCluster;exports.Polygon=Polygon;exports.Polyline=Polyline;exports.Rectangle=Rectangle | ||
vue.onBeforeUnmount(()=>{var a;e.value&&(null===(a=f.value)||void 0===a?void 0:a.event.clearInstanceListeners(e.value),e.value.clearMarkers(),e.value.setMap(null))});c({markerCluster:e});return()=>{var a;return null===(a=d.default)||void 0===a?void 0:a.call(d)}}}),_sfc_main=vue.defineComponent({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(a,{slots:b,emit:c}){let d=vue.ref(),e=vue.ref(),g=vue.computed(()=>{var a;return null===(a=b.default)||void 0===a?void 0:a.call(b).some(a=>a.type!== | ||
vue.Comment)}),f=vue.computed(()=>({...a.options,element:d.value}));vue.onMounted(()=>{e=useSetupMapComponent(customMarkerClassSymbol,[],f,c)});return{customMarkerRef:d,customMarker:e,hasSlotContent:g}}}),css_248z="\n.custom-marker-wrapper[data-v-b9d5ec8a] {\n display: none;\n}\n.mapdiv .custom-marker-wrapper[data-v-b9d5ec8a] {\n display: inline-block;\n}\n";styleInject(css_248z);let _withId=vue.withScopeId("data-v-b9d5ec8a");vue.pushScopeId("data-v-b9d5ec8a");let _hoisted_1={key:0,class:"custom-marker-wrapper"}; | ||
vue.popScopeId();let _sfc_render=_withId((a,b,c,d,e,g)=>a.hasSlotContent?(vue.openBlock(),vue.createBlock("div",_hoisted_1,[vue.createVNode("div",vue.mergeProps({ref:"customMarkerRef",style:{cursor:a.$attrs.onClick?"pointer":void 0}},a.$attrs),[vue.renderSlot(a.$slots,"default",{},void 0,!0)],16)])):vue.createCommentVNode("v-if",!0));_sfc_main.render=_sfc_render;_sfc_main.__scopeId="data-v-b9d5ec8a";exports.Circle=Circle;exports.CustomControl=_sfc_main$2;exports.CustomMarker=_sfc_main; | ||
exports.GoogleMap=_sfc_main$3;exports.InfoWindow=_sfc_main$1;exports.Marker=Marker;exports.MarkerCluster=MarkerCluster;exports.Polygon=Polygon;exports.Polyline=Polyline;exports.Rectangle=Rectangle |
@@ -1,2 +0,2 @@ | ||
import{defineComponent,ref,provide,watch,onMounted,onBeforeUnmount,markRaw,toRef,pushScopeId,popScopeId,openBlock,createBlock,createVNode,renderSlot,withScopeId,inject,computed,Fragment,createCommentVNode,withDirectives,vShow,Comment}from'vue';/* | ||
import{defineComponent,ref,provide,watch,onMounted,onBeforeUnmount,markRaw,toRef,pushScopeId,popScopeId,openBlock,createBlock,createVNode,renderSlot,withScopeId,inject,computed,Fragment,createCommentVNode,withDirectives,vShow,Comment,mergeProps}from'vue';/* | ||
***************************************************************************** | ||
@@ -46,29 +46,29 @@ Copyright (c) Microsoft Corporation. | ||
L.render=function(a){return openBlock(),createBlock(Fragment,null,[createCommentVNode("\n v-show must be used instead of v-if otherwise there\n would be no rendered content pushed to the map controls\n "),withDirectives(createVNode("div",la,[renderSlot(a.$slots,"default")],512),[[vShow,a.showContent]])],2112)};let M="closeclick content_changed domready position_changed visible zindex_changed".split(" "); | ||
var N=defineComponent({props:{options:{type:Object,default:()=>({})}},emits:M,setup(a,{slots:b,emit:c}){let d=ref(),e=ref(),g=inject(t,ref()),f=inject(u,ref()),l=inject(w,ref()),k,h=computed(()=>{var a;return null===(a=b.default)||void 0===a?void 0:a.call(b).some(a=>a.type!==Comment)});onMounted(()=>{watch([g,()=>a.options],([,a],[b,q])=>{b=JSON.stringify(a)!==JSON.stringify(q)||g.value!==b;g.value&&f.value&&b&&(d.value?(d.value.setOptions({...a,content:h.value?e.value:a.content}),l.value||d.value.open({map:g.value})): | ||
(d.value=d.value=markRaw(new f.value.InfoWindow({...a,content:h.value?e.value:a.content})),l.value?k=l.value.addListener("click",()=>{d.value&&d.value.open({map:g.value,anchor:l.value})}):d.value.open({map:g.value}),M.forEach(a=>{var b;null===(b=d.value)||void 0===b?void 0:b.addListener(a,b=>c(a,b))})))},{immediate:!0})});onBeforeUnmount(()=>{var a;k&&k.remove();d.value&&(null===(a=f.value)||void 0===a?void 0:a.event.clearInstanceListeners(d.value),d.value.close())});return{infoWindow:d,infoWindowRef:e, | ||
hasSlotContent:h}}});G("\n.info-window-wrapper[data-v-5b373d6e] {\n display: none;\n}\n.mapdiv .info-window-wrapper[data-v-5b373d6e] {\n display: inline-block;\n}\n");let ma=withScopeId("data-v-5b373d6e");pushScopeId("data-v-5b373d6e");let na={key:0,class:"info-window-wrapper"},oa={ref:"infoWindowRef"};popScopeId();let pa=ma(a=>a.hasSlotContent?(openBlock(),createBlock("div",na,[createVNode("div",oa,[renderSlot(a.$slots,"default",{},void 0,!0)],512)])):createCommentVNode("v-if",!0));N.render=pa; | ||
N.__scopeId="data-v-5b373d6e";function O(a,b,c,d,e,g){if(!(e-d<=c)){var f=d+e>>1;P(a,b,f,d,e,g%2);O(a,b,c,d,f-1,g+1);O(a,b,c,f+1,e,g+1)}} | ||
var N=defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})}},emits:M,setup(a,{slots:b,emit:c}){let d=ref(),e=ref(),g=inject(t,ref()),f=inject(u,ref()),l=inject(w,ref()),k,h=computed(()=>{var a;return null===(a=b.default)||void 0===a?void 0:a.call(b).some(a=>a.type!==Comment)});onMounted(()=>{watch([g,()=>a.options],([,a],[b,q])=>{b=JSON.stringify(a)!==JSON.stringify(q)||g.value!==b;g.value&&f.value&&b&&(d.value?(d.value.setOptions({...a,content:h.value?e.value:a.content}), | ||
l.value||d.value.open({map:g.value})):(d.value=d.value=markRaw(new f.value.InfoWindow({...a,content:h.value?e.value:a.content})),l.value?k=l.value.addListener("click",()=>{d.value&&d.value.open({map:g.value,anchor:l.value})}):d.value.open({map:g.value}),M.forEach(a=>{var b;null===(b=d.value)||void 0===b?void 0:b.addListener(a,b=>c(a,b))})))},{immediate:!0})});onBeforeUnmount(()=>{var a;k&&k.remove();d.value&&(null===(a=f.value)||void 0===a?void 0:a.event.clearInstanceListeners(d.value),d.value.close())}); | ||
return{infoWindow:d,infoWindowRef:e,hasSlotContent:h}}});G("\n.info-window-wrapper[data-v-5b373d6e] {\n display: none;\n}\n.mapdiv .info-window-wrapper[data-v-5b373d6e] {\n display: inline-block;\n}\n");let ma=withScopeId("data-v-5b373d6e");pushScopeId("data-v-5b373d6e");let na={key:0,class:"info-window-wrapper"};popScopeId(); | ||
let oa=ma(a=>a.hasSlotContent?(openBlock(),createBlock("div",na,[createVNode("div",mergeProps({ref:"infoWindowRef"},a.$attrs),[renderSlot(a.$slots,"default",{},void 0,!0)],16)])):createCommentVNode("v-if",!0));N.render=oa;N.__scopeId="data-v-5b373d6e";function O(a,b,c,d,e,g){if(!(e-d<=c)){var f=d+e>>1;P(a,b,f,d,e,g%2);O(a,b,c,d,f-1,g+1);O(a,b,c,f+1,e,g+1)}} | ||
function P(a,b,c,d,e,g){for(;e>d;){if(600<e-d){var f=e-d+1,l=c-d+1,k=Math.log(f),h=.5*Math.exp(2*k/3);k=.5*Math.sqrt(k*h*(f-h)/f)*(0>l-f/2?-1:1);P(a,b,c,Math.max(d,Math.floor(c-l*h/f+k)),Math.min(e,Math.floor(c+(f-l)*h/f+k)),g)}f=b[2*c+g];l=d;h=e;Q(a,b,d,c);for(b[2*e+g]>f&&Q(a,b,d,e);l<h;){Q(a,b,l,h);l++;for(h--;b[2*l+g]<f;)l++;for(;b[2*h+g]>f;)h--}b[2*d+g]===f?Q(a,b,d,h):(h++,Q(a,b,h,e));h<=c&&(d=h+1);c<=h&&(e=h-1)}}function Q(a,b,c,d){R(a,c,d);R(b,2*c,2*d);R(b,2*c+1,2*d+1)} | ||
function R(a,b,c){let d=a[b];a[b]=a[c];a[c]=d}let qa=a=>a[0],ra=a=>a[1]; | ||
class S{constructor(a,b=qa,c=ra,d=64,e=Float64Array){this.nodeSize=d;this.points=a;let g=this.ids=new (65536>a.length?Uint16Array:Uint32Array)(a.length);e=this.coords=new e(2*a.length);for(let d=0;d<a.length;d++)g[d]=d,e[2*d]=b(a[d]),e[2*d+1]=c(a[d]);O(g,e,d,0,g.length-1,0)}range(a,b,c,d){{var e=this.ids,g=this.coords,f=this.nodeSize;let k=[0,e.length-1,0],h=[],m,n;for(;k.length;){var l=k.pop();let q=k.pop(),r=k.pop();if(q-r<=f){for(l=r;l<=q;l++)m=g[2*l],n=g[2*l+1],m>=a&&m<=c&&n>=b&&n<=d&&h.push(e[l]); | ||
function R(a,b,c){let d=a[b];a[b]=a[c];a[c]=d}let pa=a=>a[0],qa=a=>a[1]; | ||
class S{constructor(a,b=pa,c=qa,d=64,e=Float64Array){this.nodeSize=d;this.points=a;let g=this.ids=new (65536>a.length?Uint16Array:Uint32Array)(a.length);e=this.coords=new e(2*a.length);for(let d=0;d<a.length;d++)g[d]=d,e[2*d]=b(a[d]),e[2*d+1]=c(a[d]);O(g,e,d,0,g.length-1,0)}range(a,b,c,d){{var e=this.ids,g=this.coords,f=this.nodeSize;let k=[0,e.length-1,0],h=[],m,n;for(;k.length;){var l=k.pop();let q=k.pop(),r=k.pop();if(q-r<=f){for(l=r;l<=q;l++)m=g[2*l],n=g[2*l+1],m>=a&&m<=c&&n>=b&&n<=d&&h.push(e[l]); | ||
continue}let p=Math.floor((r+q)/2);m=g[2*p];n=g[2*p+1];m>=a&&m<=c&&n>=b&&n<=d&&h.push(e[p]);let v=(l+1)%2;if(0===l?a<=m:b<=n)k.push(r),k.push(p-1),k.push(v);if(0===l?c>=m:d>=n)k.push(p+1),k.push(q),k.push(v)}a=h}return a}within(a,b,c){{var d=this.ids,e=this.coords,g=this.nodeSize;let m=[0,d.length-1,0],n=[],q=c*c;for(;m.length;){var f=m.pop();let r=m.pop();var l=m.pop();if(r-l<=g){for(f=l;f<=r;f++){l=e[2*f]-a;var k=e[2*f+1]-b;l=l*l+k*k;l<=q&&n.push(d[f])}continue}k=Math.floor((l+r)/2);let p=e[2*k], | ||
v=e[2*k+1];{var h=p-a;let c=v-b;h=h*h+c*c}h<=q&&n.push(d[k]);h=(f+1)%2;if(0===f?a-c<=p:b-c<=v)m.push(l),m.push(k-1),m.push(h);if(0===f?a+c>=p:b+c>=v)m.push(k+1),m.push(r),m.push(h)}a=n}return a}}let sa={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:a=>a},T=Math.fround||(a=>b=>{a[0]=+b;return a[0]})(new Float32Array(1)); | ||
class ta{constructor(a){this.options=U(Object.create(sa),a);this.trees=Array(this.options.maxZoom+1)}load(a){let {log:b,minZoom:c,maxZoom:d,nodeSize:e}=this.options;b&&console.time("total time");var g=`prepare ${a.length} points`;b&&console.time(g);this.points=a;let f=[];for(let b=0;b<a.length;b++)a[b].geometry&&f.push(ua(a[b],b));this.trees[d+1]=new S(f,va,wa,e,Float32Array);b&&console.timeEnd(g);for(a=d;a>=c;a--)g=+Date.now(),f=this._cluster(f,a),this.trees[a]=new S(f,va,wa,e,Float32Array),b&&console.log("z%d: %d clusters in %dms", | ||
v=e[2*k+1];{var h=p-a;let c=v-b;h=h*h+c*c}h<=q&&n.push(d[k]);h=(f+1)%2;if(0===f?a-c<=p:b-c<=v)m.push(l),m.push(k-1),m.push(h);if(0===f?a+c>=p:b+c>=v)m.push(k+1),m.push(r),m.push(h)}a=n}return a}}let ra={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:a=>a},T=Math.fround||(a=>b=>{a[0]=+b;return a[0]})(new Float32Array(1)); | ||
class sa{constructor(a){this.options=U(Object.create(ra),a);this.trees=Array(this.options.maxZoom+1)}load(a){let {log:b,minZoom:c,maxZoom:d,nodeSize:e}=this.options;b&&console.time("total time");var g=`prepare ${a.length} points`;b&&console.time(g);this.points=a;let f=[];for(let b=0;b<a.length;b++)a[b].geometry&&f.push(ta(a[b],b));this.trees[d+1]=new S(f,ua,va,e,Float32Array);b&&console.timeEnd(g);for(a=d;a>=c;a--)g=+Date.now(),f=this._cluster(f,a),this.trees[a]=new S(f,ua,va,e,Float32Array),b&&console.log("z%d: %d clusters in %dms", | ||
a,f.length,+Date.now()-g);b&&console.timeEnd("total time");return this}getClusters(a,b){let c=((a[0]+180)%360+360)%360-180;var d=Math.max(-90,Math.min(90,a[1])),e=180===a[2]?180:((a[2]+180)%360+360)%360-180;let g=Math.max(-90,Math.min(90,a[3]));if(360<=a[2]-a[0])c=-180,e=180;else if(c>e){var f=this.getClusters([c,d,180,g],b);d=this.getClusters([-180,d,e,g],b);return f.concat(d)}b=this.trees[this._limitZoom(b)];e=b.range(c/360+.5,V(g),e/360+.5,V(d));d=[];for(f of e)e=b.points[f],d.push(e.numPoints? | ||
xa(e):this.points[e.index]);return d}getChildren(a){var b=this._getOriginId(a),c=this._getOriginZoom(a);let d=this.trees[c];if(!d)throw Error("No cluster with the specified id.");b=d.points[b];if(!b)throw Error("No cluster with the specified id.");b=d.within(b.x,b.y,this.options.radius/(this.options.extent*Math.pow(2,c-1)));c=[];for(let e of b)b=d.points[e],b.parentId===a&&c.push(b.numPoints?xa(b):this.points[b.index]);if(0===c.length)throw Error("No cluster with the specified id.");return c}getLeaves(a, | ||
wa(e):this.points[e.index]);return d}getChildren(a){var b=this._getOriginId(a),c=this._getOriginZoom(a);let d=this.trees[c];if(!d)throw Error("No cluster with the specified id.");b=d.points[b];if(!b)throw Error("No cluster with the specified id.");b=d.within(b.x,b.y,this.options.radius/(this.options.extent*Math.pow(2,c-1)));c=[];for(let e of b)b=d.points[e],b.parentId===a&&c.push(b.numPoints?wa(b):this.points[b.index]);if(0===c.length)throw Error("No cluster with the specified id.");return c}getLeaves(a, | ||
b,c){let d=[];this._appendLeaves(d,a,b||10,c||0,0);return d}getTile(a,b,c){let d=this.trees[this._limitZoom(a)];a=Math.pow(2,a);let {extent:e,radius:g}=this.options,f=g/e,l=(c-f)/a,k=(c+1+f)/a,h={features:[]};this._addTileFeatures(d.range((b-f)/a,l,(b+1+f)/a,k),d.points,b,c,a,h);0===b&&this._addTileFeatures(d.range(1-f/a,l,1,k),d.points,a,c,a,h);b===a-1&&this._addTileFeatures(d.range(0,l,f/a,k),d.points,-1,c,a,h);return h.features.length?h:null}getClusterExpansionZoom(a){let b=this._getOriginZoom(a)- | ||
1;for(;b<=this.options.maxZoom;){a=this.getChildren(a);b++;if(1!==a.length)break;a=a[0].properties.cluster_id}return b}_appendLeaves(a,b,c,d,e){b=this.getChildren(b);for(let g of b)if((b=g.properties)&&b.cluster?e=e+b.point_count<=d?e+b.point_count:this._appendLeaves(a,b.cluster_id,c,d,e):e<d?e++:a.push(g),a.length===c)break;return e}_addTileFeatures(a,b,c,d,e,g){for(let k of a){a=b[k];let h=a.numPoints;var f=void 0;let m;var l=void 0;h?(f=ya(a),m=a.x,l=a.y):(l=this.points[a.index],f=l.properties, | ||
1;for(;b<=this.options.maxZoom;){a=this.getChildren(a);b++;if(1!==a.length)break;a=a[0].properties.cluster_id}return b}_appendLeaves(a,b,c,d,e){b=this.getChildren(b);for(let g of b)if((b=g.properties)&&b.cluster?e=e+b.point_count<=d?e+b.point_count:this._appendLeaves(a,b.cluster_id,c,d,e):e<d?e++:a.push(g),a.length===c)break;return e}_addTileFeatures(a,b,c,d,e,g){for(let k of a){a=b[k];let h=a.numPoints;var f=void 0;let m;var l=void 0;h?(f=xa(a),m=a.x,l=a.y):(l=this.points[a.index],f=l.properties, | ||
m=l.geometry.coordinates[0]/360+.5,l=V(l.geometry.coordinates[1]));f={type:1,geometry:[[Math.round(this.options.extent*(m*e-c)),Math.round(this.options.extent*(l*e-d))]],tags:f};let n;h?n=a.id:this.options.generateId?n=a.index:this.points[a.index].id&&(n=this.points[a.index].id);void 0!==n&&(f.id=n);g.features.push(f)}}_limitZoom(a){return Math.max(this.options.minZoom,Math.min(Math.floor(+a),this.options.maxZoom+1))}_cluster(a,b){let c=[],{radius:d,extent:e,reduce:g,minPoints:f}=this.options,l=d/ | ||
(e*Math.pow(2,b));for(let d=0;d<a.length;d++){var k=a[d];if(k.zoom<=b)continue;k.zoom=b;let e=this.trees[b+1];var h=e.within(k.x,k.y,l),m=k.numPoints||1;let p=m;for(let a of h){var n=e.points[a];n.zoom>b&&(p+=n.numPoints||1)}if(p>m&&p>=f){n=k.x*m;let a=k.y*m;m=g&&1<m?this._map(k,!0):null;let f=(d<<5)+(b+1)+this.points.length;for(let c of h){h=e.points[c];if(h.zoom<=b)continue;h.zoom=b;let d=h.numPoints||1;n+=h.x*d;a+=h.y*d;h.parentId=f;g&&(m||(m=this._map(k,!0)),g(m,this._map(h)))}k.parentId=f;c.push(za(n/ | ||
p,a/p,f,p,m))}else if(c.push(k),1<p)for(let a of h)k=e.points[a],k.zoom<=b||(k.zoom=b,c.push(k))}return c}_getOriginId(a){return a-this.points.length>>5}_getOriginZoom(a){return(a-this.points.length)%32}_map(a,b){if(a.numPoints)return b?U({},a.properties):a.properties;a=this.points[a.index].properties;let c=this.options.map(a);return b&&c===a?U({},c):c}}function za(a,b,c,d,e){return{x:T(a),y:T(b),zoom:Infinity,id:c,parentId:-1,numPoints:d,properties:e}} | ||
function ua(a,b){let [c,d]=a.geometry.coordinates;return{x:T(c/360+.5),y:T(V(d)),zoom:Infinity,index:b,parentId:-1}}function xa(a){var b=a.id,c=ya(a);return{type:"Feature",id:b,properties:c,geometry:{type:"Point",coordinates:[360*(a.x-.5),360*Math.atan(Math.exp((180-360*a.y)*Math.PI/180))/Math.PI-90]}}} | ||
function ya(a){let b=a.numPoints,c=1E4<=b?`${Math.round(b/1E3)}k`:1E3<=b?`${Math.round(b/100)/10}k`:b;return U(U({},a.properties),{cluster:!0,cluster_id:a.id,point_count:b,point_count_abbreviated:c})}function V(a){a=Math.sin(a*Math.PI/180);a=.5-.25*Math.log((1+a)/(1-a))/Math.PI;return 0>a?0:1<a?1:a}function U(a,b){for(let c in b)a[c]=b[c];return a}function va(a){return a.x}function wa(a){return a.y} | ||
var Ba=function Aa(a,b){if(a===b)return!0;if(a&&b&&"object"==typeof a&&"object"==typeof b){if(a.constructor!==b.constructor)return!1;var d;if(Array.isArray(a)){var e=a.length;if(e!=b.length)return!1;for(d=e;0!==d--;)if(!Aa(a[d],b[d]))return!1;return!0}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();var g=Object.keys(a);e=g.length; | ||
if(e!==Object.keys(b).length)return!1;for(d=e;0!==d--;)if(!Object.prototype.hasOwnProperty.call(b,g[d]))return!1;for(d=e;0!==d--;)if(e=g[d],!Aa(a[e],b[e]))return!1;return!0}return a!==a&&b!==b}; | ||
(e*Math.pow(2,b));for(let d=0;d<a.length;d++){var k=a[d];if(k.zoom<=b)continue;k.zoom=b;let e=this.trees[b+1];var h=e.within(k.x,k.y,l),m=k.numPoints||1;let p=m;for(let a of h){var n=e.points[a];n.zoom>b&&(p+=n.numPoints||1)}if(p>m&&p>=f){n=k.x*m;let a=k.y*m;m=g&&1<m?this._map(k,!0):null;let f=(d<<5)+(b+1)+this.points.length;for(let c of h){h=e.points[c];if(h.zoom<=b)continue;h.zoom=b;let d=h.numPoints||1;n+=h.x*d;a+=h.y*d;h.parentId=f;g&&(m||(m=this._map(k,!0)),g(m,this._map(h)))}k.parentId=f;c.push(ya(n/ | ||
p,a/p,f,p,m))}else if(c.push(k),1<p)for(let a of h)k=e.points[a],k.zoom<=b||(k.zoom=b,c.push(k))}return c}_getOriginId(a){return a-this.points.length>>5}_getOriginZoom(a){return(a-this.points.length)%32}_map(a,b){if(a.numPoints)return b?U({},a.properties):a.properties;a=this.points[a.index].properties;let c=this.options.map(a);return b&&c===a?U({},c):c}}function ya(a,b,c,d,e){return{x:T(a),y:T(b),zoom:Infinity,id:c,parentId:-1,numPoints:d,properties:e}} | ||
function ta(a,b){let [c,d]=a.geometry.coordinates;return{x:T(c/360+.5),y:T(V(d)),zoom:Infinity,index:b,parentId:-1}}function wa(a){var b=a.id,c=xa(a);return{type:"Feature",id:b,properties:c,geometry:{type:"Point",coordinates:[360*(a.x-.5),360*Math.atan(Math.exp((180-360*a.y)*Math.PI/180))/Math.PI-90]}}} | ||
function xa(a){let b=a.numPoints,c=1E4<=b?`${Math.round(b/1E3)}k`:1E3<=b?`${Math.round(b/100)/10}k`:b;return U(U({},a.properties),{cluster:!0,cluster_id:a.id,point_count:b,point_count_abbreviated:c})}function V(a){a=Math.sin(a*Math.PI/180);a=.5-.25*Math.log((1+a)/(1-a))/Math.PI;return 0>a?0:1<a?1:a}function U(a,b){for(let c in b)a[c]=b[c];return a}function ua(a){return a.x}function va(a){return a.y} | ||
var Aa=function za(a,b){if(a===b)return!0;if(a&&b&&"object"==typeof a&&"object"==typeof b){if(a.constructor!==b.constructor)return!1;var d;if(Array.isArray(a)){var e=a.length;if(e!=b.length)return!1;for(d=e;0!==d--;)if(!za(a[d],b[d]))return!1;return!0}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();var g=Object.keys(a);e=g.length; | ||
if(e!==Object.keys(b).length)return!1;for(d=e;0!==d--;)if(!Object.prototype.hasOwnProperty.call(b,g[d]))return!1;for(d=e;0!==d--;)if(e=g[d],!za(a[e],b[e]))return!1;return!0}return a!==a&&b!==b}; | ||
class W{constructor({markers:a,position:b}){this.markers=a;b&&(this._position=b instanceof google.maps.LatLng?b:new google.maps.LatLng(b))}get bounds(){if(0!==this.markers.length||this._position)return this.markers.reduce((a,b)=>a.extend(b.getPosition()),new google.maps.LatLngBounds(this._position,this._position))}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(a=>a.getVisible()).length}push(a){this.markers.push(a)}delete(){this.marker&&(this.marker.setMap(null), | ||
delete this.marker);this.markers.length=0}}class Ca{constructor({maxZoom:a=16}){this.maxZoom=a}noop({markers:a}){return Da(a)}}let Da=a=>a.map(a=>new W({position:a.getPosition(),markers:[a]})); | ||
class Ea extends Ca{constructor(a){var {maxZoom:b,radius:c=60}=a,d=["maxZoom","radius"],e={},g;for(g in a)Object.prototype.hasOwnProperty.call(a,g)&&0>d.indexOf(g)&&(e[g]=a[g]);if(null!=a&&"function"===typeof Object.getOwnPropertySymbols){var f=0;for(g=Object.getOwnPropertySymbols(a);f<g.length;f++)0>d.indexOf(g[f])&&Object.prototype.propertyIsEnumerable.call(a,g[f])&&(e[g[f]]=a[g[f]])}super({maxZoom:b});this.superCluster=new ta(Object.assign({maxZoom:this.maxZoom,radius:c},e));this.state={zoom:null}}calculate(a){let b= | ||
!1;if(!Ba(a.markers,this.markers)){b=!0;this.markers=[...a.markers];var c=this.markers.map(a=>({type:"Feature",geometry:{type:"Point",coordinates:[a.getPosition().lng(),a.getPosition().lat()]},properties:{marker:a}}));this.superCluster.load(c)}c={zoom:a.map.getZoom()};b||this.state.zoom>this.maxZoom&&c.zoom>this.maxZoom||(b=b||!Ba(this.state,c));this.state=c;b&&(this.clusters=this.cluster(a));return{clusters:this.clusters,changed:b}}cluster({map:a}){return this.superCluster.getClusters([-180,-90, | ||
delete this.marker);this.markers.length=0}}class Ba{constructor({maxZoom:a=16}){this.maxZoom=a}noop({markers:a}){return Ca(a)}}let Ca=a=>a.map(a=>new W({position:a.getPosition(),markers:[a]})); | ||
class Da extends Ba{constructor(a){var {maxZoom:b,radius:c=60}=a,d=["maxZoom","radius"],e={},g;for(g in a)Object.prototype.hasOwnProperty.call(a,g)&&0>d.indexOf(g)&&(e[g]=a[g]);if(null!=a&&"function"===typeof Object.getOwnPropertySymbols){var f=0;for(g=Object.getOwnPropertySymbols(a);f<g.length;f++)0>d.indexOf(g[f])&&Object.prototype.propertyIsEnumerable.call(a,g[f])&&(e[g[f]]=a[g[f]])}super({maxZoom:b});this.superCluster=new sa(Object.assign({maxZoom:this.maxZoom,radius:c},e));this.state={zoom:null}}calculate(a){let b= | ||
!1;if(!Aa(a.markers,this.markers)){b=!0;this.markers=[...a.markers];var c=this.markers.map(a=>({type:"Feature",geometry:{type:"Point",coordinates:[a.getPosition().lng(),a.getPosition().lat()]},properties:{marker:a}}));this.superCluster.load(c)}c={zoom:a.map.getZoom()};b||this.state.zoom>this.maxZoom&&c.zoom>this.maxZoom||(b=b||!Aa(this.state,c));this.state=c;b&&(this.clusters=this.cluster(a));return{clusters:this.clusters,changed:b}}cluster({map:a}){return this.superCluster.getClusters([-180,-90, | ||
180,90],Math.round(a.getZoom())).map(this.transformCluster.bind(this))}transformCluster({geometry:{coordinates:[a,b]},properties:c}){if(c.cluster)return new W({markers:this.superCluster.getLeaves(c.cluster_id,Infinity).map(a=>a.properties.marker),position:new google.maps.LatLng({lat:b,lng:a})});a=c.marker;return new W({markers:[a],position:a.getPosition()})}} | ||
class Fa{constructor(a,b){this.markers={sum:a.length};a=b.map(a=>a.count);let c=a.reduce((a,b)=>a+b,0);this.clusters={count:b.length,markers:{mean:c/b.length,sum:c,min:Math.min(...a),max:Math.max(...a)}}}}class Ga{render({count:a,position:b},c){c=window.btoa(` | ||
class Ea{constructor(a,b){this.markers={sum:a.length};a=b.map(a=>a.count);let c=a.reduce((a,b)=>a+b,0);this.clusters={count:b.length,markers:{mean:c/b.length,sum:c,min:Math.min(...a),max:Math.max(...a)}}}}class Fa{render({count:a,position:b},c){c=window.btoa(` | ||
<svg fill="${a>Math.max(10,c.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240"> | ||
@@ -78,11 +78,11 @@ <circle cx="120" cy="120" opacity=".6" r="70" /> | ||
<circle cx="120" cy="120" opacity=".2" r="110" /> | ||
</svg>`);return new google.maps.Marker({position:b,icon:{url:`data:image/svg+xml;base64,${c}`,scaledSize:new google.maps.Size(45,45)},label:{text:String(a),color:"rgba(255,255,255,0.9)",fontSize:"12px"},title:`Cluster of ${a} markers`,zIndex:Number(google.maps.Marker.MAX_ZINDEX)+a})}}class Ha{constructor(){var a=Ha,b=google.maps.OverlayView;for(let c in b.prototype)a.prototype[c]=b.prototype[c]}}var X,Y=X||(X={});Y.CLUSTERING_BEGIN="clusteringbegin";Y.CLUSTERING_END="clusteringend"; | ||
Y.CLUSTER_CLICK="click";let Ia=(a,b,c)=>{c.fitBounds(b.bounds)}; | ||
class Ja extends Ha{constructor({map:a,markers:b=[],algorithm:c=new Ea({}),renderer:d=new Ga,onClusterClick:e=Ia}){super();this.markers=[...b];this.clusters=[];this.algorithm=c;this.renderer=d;this.onClusterClick=e;a&&this.setMap(a)}addMarker(a,b){this.markers.includes(a)||(this.markers.push(a),b||this.render())}addMarkers(a,b){a.forEach(a=>{this.addMarker(a,!0)});b||this.render()}removeMarker(a,b){let c=this.markers.indexOf(a);if(-1===c)return!1;a.setMap(null);this.markers.splice(c,1);b||this.render(); | ||
</svg>`);return new google.maps.Marker({position:b,icon:{url:`data:image/svg+xml;base64,${c}`,scaledSize:new google.maps.Size(45,45)},label:{text:String(a),color:"rgba(255,255,255,0.9)",fontSize:"12px"},title:`Cluster of ${a} markers`,zIndex:Number(google.maps.Marker.MAX_ZINDEX)+a})}}class Ga{constructor(){var a=Ga,b=google.maps.OverlayView;for(let c in b.prototype)a.prototype[c]=b.prototype[c]}}var X,Y=X||(X={});Y.CLUSTERING_BEGIN="clusteringbegin";Y.CLUSTERING_END="clusteringend"; | ||
Y.CLUSTER_CLICK="click";let Ha=(a,b,c)=>{c.fitBounds(b.bounds)}; | ||
class Ia extends Ga{constructor({map:a,markers:b=[],algorithm:c=new Da({}),renderer:d=new Fa,onClusterClick:e=Ha}){super();this.markers=[...b];this.clusters=[];this.algorithm=c;this.renderer=d;this.onClusterClick=e;a&&this.setMap(a)}addMarker(a,b){this.markers.includes(a)||(this.markers.push(a),b||this.render())}addMarkers(a,b){a.forEach(a=>{this.addMarker(a,!0)});b||this.render()}removeMarker(a,b){let c=this.markers.indexOf(a);if(-1===c)return!1;a.setMap(null);this.markers.splice(c,1);b||this.render(); | ||
return!0}removeMarkers(a,b){let c=!1;a.forEach(a=>{c=this.removeMarker(a,!0)||c});c&&!b&&this.render();return c}clearMarkers(a){this.markers.length=0;a||this.render()}render(){let a=this.getMap();if(a instanceof google.maps.Map&&this.getProjection()){google.maps.event.trigger(this,X.CLUSTERING_BEGIN,this);let {clusters:b,changed:c}=this.algorithm.calculate({markers:this.markers,map:a,mapCanvasProjection:this.getProjection()});if(c||void 0==c)this.reset(),this.clusters=b,this.renderClusters();google.maps.event.trigger(this, | ||
X.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this));this.render()}onRemove(){google.maps.event.removeListener(this.idleListener);this.reset()}reset(){this.markers.forEach(a=>a.setMap(null));this.clusters.forEach(a=>a.delete());this.clusters=[]}renderClusters(){let a=new Fa(this.markers,this.clusters),b=this.getMap();this.clusters.forEach(c=>{1===c.markers.length?c.marker=c.markers[0]:(c.marker=this.renderer.render(c,a),this.onClusterClick&&c.marker.addListener("click", | ||
a=>{google.maps.event.trigger(this,X.CLUSTER_CLICK,c);this.onClusterClick(a,c,b)}));c.marker.setMap(b)})}}let Ka=Object.values(X); | ||
var La=defineComponent({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})}},emits:Ka,setup(a,{emit:b,expose:c,slots:d}){let e=ref(),g=inject(t,ref()),f=inject(u,ref());provide(x,e);watch(g,()=>{g.value&&(e.value=markRaw(new Ja({map:g.value,...a.options})),Ka.forEach(a=>{var c;null===(c=e.value)||void 0===c?void 0:c.addListener(a,c=>b(a,c))}))},{immediate:!0});onBeforeUnmount(()=>{var a;e.value&&(null===(a=f.value)||void 0===a?void 0:a.event.clearInstanceListeners(e.value),e.value.clearMarkers(), | ||
e.value.setMap(null))});c({markerCluster:e});return()=>{var a;return null===(a=d.default)||void 0===a?void 0:a.call(d)}}}),Z=defineComponent({props:{options:{type:Object,required:!0}},setup(a,{slots:b,emit:c}){let d=ref(),e=ref(),g=computed(()=>{var a;return null===(a=b.default)||void 0===a?void 0:a.call(b).some(a=>a.type!==Comment)}),f=computed(()=>({...a.options,element:d.value}));onMounted(()=>{e=H(y,[],f,c)});return{customMarkerRef:d,customMarker:e,hasSlotContent:g}}});G("\n.custom-marker-wrapper[data-v-b9d5ec8a] {\n display: none;\n}\n.mapdiv .custom-marker-wrapper[data-v-b9d5ec8a] {\n display: inline-block;\n}\n"); | ||
let Ma=withScopeId("data-v-b9d5ec8a");pushScopeId("data-v-b9d5ec8a");let Na={key:0,class:"custom-marker-wrapper"};popScopeId();let Oa=Ma(a=>a.hasSlotContent?(openBlock(),createBlock("div",Na,[createVNode("div",{ref:"customMarkerRef",style:{cursor:a.$attrs.onClick?"pointer":void 0}},[renderSlot(a.$slots,"default",{},void 0,!0)],4)])):createCommentVNode("v-if",!0));Z.render=Oa;Z.__scopeId="data-v-b9d5ec8a"; | ||
export{ka as Circle,L as CustomControl,Z as CustomMarker,F as GoogleMap,N as InfoWindow,fa as Marker,La as MarkerCluster,ia as Polygon,ha as Polyline,ja as Rectangle} | ||
X.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this));this.render()}onRemove(){google.maps.event.removeListener(this.idleListener);this.reset()}reset(){this.markers.forEach(a=>a.setMap(null));this.clusters.forEach(a=>a.delete());this.clusters=[]}renderClusters(){let a=new Ea(this.markers,this.clusters),b=this.getMap();this.clusters.forEach(c=>{1===c.markers.length?c.marker=c.markers[0]:(c.marker=this.renderer.render(c,a),this.onClusterClick&&c.marker.addListener("click", | ||
a=>{google.maps.event.trigger(this,X.CLUSTER_CLICK,c);this.onClusterClick(a,c,b)}));c.marker.setMap(b)})}}let Ja=Object.values(X); | ||
var Ka=defineComponent({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})}},emits:Ja,setup(a,{emit:b,expose:c,slots:d}){let e=ref(),g=inject(t,ref()),f=inject(u,ref());provide(x,e);watch(g,()=>{g.value&&(e.value=markRaw(new Ia({map:g.value,...a.options})),Ja.forEach(a=>{var c;null===(c=e.value)||void 0===c?void 0:c.addListener(a,c=>b(a,c))}))},{immediate:!0});onBeforeUnmount(()=>{var a;e.value&&(null===(a=f.value)||void 0===a?void 0:a.event.clearInstanceListeners(e.value),e.value.clearMarkers(), | ||
e.value.setMap(null))});c({markerCluster:e});return()=>{var a;return null===(a=d.default)||void 0===a?void 0:a.call(d)}}}),Z=defineComponent({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(a,{slots:b,emit:c}){let d=ref(),e=ref(),g=computed(()=>{var a;return null===(a=b.default)||void 0===a?void 0:a.call(b).some(a=>a.type!==Comment)}),f=computed(()=>({...a.options,element:d.value}));onMounted(()=>{e=H(y,[],f,c)});return{customMarkerRef:d,customMarker:e,hasSlotContent:g}}});G("\n.custom-marker-wrapper[data-v-b9d5ec8a] {\n display: none;\n}\n.mapdiv .custom-marker-wrapper[data-v-b9d5ec8a] {\n display: inline-block;\n}\n"); | ||
let La=withScopeId("data-v-b9d5ec8a");pushScopeId("data-v-b9d5ec8a");let Ma={key:0,class:"custom-marker-wrapper"};popScopeId();let Na=La(a=>a.hasSlotContent?(openBlock(),createBlock("div",Ma,[createVNode("div",mergeProps({ref:"customMarkerRef",style:{cursor:a.$attrs.onClick?"pointer":void 0}},a.$attrs),[renderSlot(a.$slots,"default",{},void 0,!0)],16)])):createCommentVNode("v-if",!0));Z.render=Na;Z.__scopeId="data-v-b9d5ec8a"; | ||
export{ka as Circle,L as CustomControl,Z as CustomMarker,F as GoogleMap,N as InfoWindow,fa as Marker,Ka as MarkerCluster,ia as Polygon,ha as Polyline,ja as Rectangle} |
{ | ||
"name": "vue3-google-map", | ||
"version": "0.13.1", | ||
"version": "0.13.2", | ||
"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
128872
881