Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-google-maps/marker-clusterer

Package Overview
Dependencies
Maintainers
2
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-google-maps/marker-clusterer - npm Package Compare versions

Comparing version 2.0.0-alpha to 2.0.0

2

dist/Clusterer.d.ts

@@ -82,3 +82,3 @@ /// <reference types="googlemaps" />

createClusters(iFirst: number): void;
extend(obj1: unknown, obj2: unknown): unknown;
extend(obj1: any, obj2: any): any;
}
'use strict';
var ClusterIcon =
/*#__PURE__*/
function () {
var ClusterIcon = /*#__PURE__*/function () {
function ClusterIcon(cluster, styles) {

@@ -27,3 +25,3 @@ cluster.getClusterer().extend(ClusterIcon, google.maps.OverlayView);

this.fontFamily = 'Arial,sans-serif';
this.backgroundPosition = '0 0'; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.backgroundPosition = '0 0'; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -46,3 +44,3 @@

this.show();
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -53,3 +51,3 @@

this.boundsChangedListener = google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.boundsChangedListener = google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -62,4 +60,6 @@ this.getMap(), 'boundschanged', function boundsChanged() {

cDraggingMapByCluster = false;
});
google.maps.event.addDomListener(this.div, 'click', function (event) {
}); // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
google.maps.event.addDomListener(this.div, 'click', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function (event) {
cMouseDownInCluster = false;

@@ -86,3 +86,3 @@

var bounds = _this.cluster.getBounds(); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
var bounds = _this.cluster.getBounds(); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -94,10 +94,10 @@

setTimeout(function timeout() {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
markerClusterer.getMap().fitBounds(bounds); // Don't zoom beyond the max zoom level
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
if (maxZoom !== null && // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
markerClusterer.getMap().getZoom() > maxZoom) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
if (maxZoom !== null && markerClusterer.getMap().getZoom() > maxZoom) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -117,3 +117,4 @@ markerClusterer.getMap().setZoom(maxZoom + 1);

});
google.maps.event.addDomListener(this.div, 'mouseover', function () {
google.maps.event.addDomListener(this.div, 'mouseover', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
/**

@@ -126,4 +127,6 @@ * This event is fired when the mouse moves over a cluster marker.

google.maps.event.trigger(_this.cluster.getClusterer(), 'mouseover', _this.cluster);
});
google.maps.event.addDomListener(this.div, 'mouseout', function () {
}); // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
google.maps.event.addDomListener(this.div, 'mouseout', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
/**

@@ -174,4 +177,4 @@ * This event is fired when the mouse moves out of a cluster marker.

if (this.div && this.center) {
var img = '';
var divTitle = ''; // NOTE: values must be specified in px units
var img = '',
divTitle = ''; // NOTE: values must be specified in px units

@@ -190,4 +193,4 @@ var bp = this.backgroundPosition.split(' ');

this.div.style.cssText = this.createCss(pos);
img = "<img alt='" + divTitle + "' src='" + this.url + "' style='position: absolute; top: " + spriteV + 'px; left: ' + spriteH + 'px; '; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
img = "<img alt='" + divTitle + "' src='" + this.url + "' style='position: absolute; top: " + spriteV + 'px; left: ' + spriteH + 'px; '; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
//@ts-ignore

@@ -199,3 +202,3 @@ if (!this.cluster.getClusterer().enableRetinaIcons) {

img += "'>";
this.div.innerHTML = img + "<div style='" + 'position: absolute;' + 'top: ' + this.anchorText[0] + 'px;' + 'left: ' + this.anchorText[1] + 'px;' + 'color: ' + this.textColor + ';' + 'font-size: ' + this.textSize + 'px;' + 'font-family: ' + this.fontFamily + ';' + 'font-weight: ' + this.fontWeight + ';' + 'font-style: ' + this.fontStyle + ';' + 'text-decoration: ' + this.textDecoration + ';' + 'text-align: center;' + 'width: ' + this.width + 'px;' + 'line-height:' + this.height + 'px;' + "'>" + // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.div.innerHTML = img + "<div style='" + 'position: absolute;' + 'top: ' + this.anchorText[0] + 'px;' + 'left: ' + this.anchorText[1] + 'px;' + 'color: ' + this.textColor + ';' + 'font-size: ' + this.textSize + 'px;' + 'font-family: ' + this.fontFamily + ';' + 'font-weight: ' + this.fontWeight + ';' + 'font-style: ' + this.fontStyle + ';' + 'text-decoration: ' + this.textDecoration + ';' + 'text-align: center;' + 'width: ' + this.width + 'px;' + 'line-height:' + this.height + 'px;' + "'>" + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -240,3 +243,3 @@ this.sums.text + '</div>';

_proto.getPosFromLatLng = function getPosFromLatLng(latlng) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -254,7 +257,5 @@ var pos = this.getProjection().fromLatLngToDivPixel(latlng);

var Cluster =
/*#__PURE__*/
function () {
var Cluster = /*#__PURE__*/function () {
function Cluster(markerClusterer) {
this.markerClusterer = markerClusterer; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.markerClusterer = markerClusterer; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -310,6 +311,7 @@

_proto.remove = function remove() {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.clusterIcon.setMap(null);
this.markers = [];
this.markers = []; // @ts-ignore
delete this.markers;

@@ -434,3 +436,3 @@ };

while (dv !== 0) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -455,5 +457,3 @@ dv = parseInt(dv, 10) / 10;

var CLUSTERER_CLASS = 'cluster';
var Clusterer =
/*#__PURE__*/
function () {
var Clusterer = /*#__PURE__*/function () {
function Clusterer(map, optMarkers, optOptions) {

@@ -518,3 +518,3 @@ if (optMarkers === void 0) {

this.setupStyles();
this.addMarkers(optMarkers, true); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.addMarkers(optMarkers, true); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -530,3 +530,3 @@

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -537,5 +537,6 @@ this.activeMap = this.getMap();

this.listeners = [google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.listeners = [google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.getMap(), 'zoom_changed', function () {
this.getMap(), 'zoom_changed', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
_this.resetViewport(false); // Workaround for this Google bug: when map is at level 0 and "-" of

@@ -548,5 +549,5 @@ // zoom slider is clicked, a "zoom_changed" event is fired even though

if ( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
if ( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
_this.getMap().getZoom() === (_this.get('minZoom') || 0) || // eslint-disable-next-line @typescript-eslint/ban-ts-comment
_this.getMap().getZoom() === (_this.get('minZoom') || 0) || // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -556,8 +557,10 @@ _this.getMap().getZoom() === _this.get('maxZoom')) {

}
}), google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
}), google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.getMap(), 'idle', function () {
this.getMap(), 'idle', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
_this.redraw();
})];
};
} // eslint-disable-next-line @getify/proper-arrows/this
;

@@ -586,7 +589,6 @@ _proto.onRemove = function onRemove() {

this.ready = false;
};
} // eslint-disable-next-line @typescript-eslint/no-empty-function
;
_proto.draw = function draw() {
return;
};
_proto.draw = function draw() {};

@@ -617,3 +619,3 @@ _proto.setupStyles = function setupStyles() {

}
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -771,3 +773,2 @@

for (var key in markers) {
// eslint-disable-next-line no-prototype-builtins
if (markers.hasOwnProperty(key)) {

@@ -788,2 +789,3 @@ this.pushMarkerTo(markers[key]);

if (marker.getDraggable()) {
// eslint-disable-next-line @getify/proper-arrows/name, @getify/proper-arrows/this
google.maps.event.addListener(marker, 'dragend', function () {

@@ -871,3 +873,3 @@ if (_this2.ready) {

_proto.getExtendedBounds = function getExtendedBounds(bounds) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -983,3 +985,4 @@ var projection = this.getProjection(); // Convert the points to pixels and the extend out by the grid size.

if (this.timerRefStatic !== null) {
window.clearTimeout(this.timerRefStatic);
window.clearTimeout(this.timerRefStatic); // @ts-ignore
delete this.timerRefStatic;

@@ -993,7 +996,7 @@ }

var mapBounds = // eslint-disable-next-line @typescript-eslint/ban-ts-comment
var mapBounds = // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.getMap().getZoom() > 3 ? new google.maps.LatLngBounds( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.getMap().getZoom() > 3 ? new google.maps.LatLngBounds( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.getMap().getBounds().getSouthWest(), // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.getMap().getBounds().getSouthWest(), // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -1015,3 +1018,4 @@ this.getMap().getBounds().getNorthEast()) : new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));

if (iLast < this.markers.length) {
this.timerRefStatic = window.setTimeout(function () {
this.timerRefStatic = window.setTimeout( // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
_this3.createClusters(iLast);

@@ -1040,9 +1044,7 @@ }, 0);

// eslint-disable-next-line guard-for-in
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
for (var property in object.prototype) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.prototype[property] = object.prototype[property];
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -1049,0 +1051,0 @@

@@ -1,2 +0,2 @@

"use strict";var t=function(){function t(e,i){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.className=this.cluster.getClusterer().getClusterClass(),this.styles=i,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.setMap(e.getMap())}var e=t.prototype;return e.onAdd=function(){var t,e,i=this;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div),this.boundsChangedListener=google.maps.event.addListener(this.getMap(),"boundschanged",(function(){e=t})),google.maps.event.addDomListener(this.div,"mousedown",(function(){t=!0,e=!1})),google.maps.event.addDomListener(this.div,"click",(function(s){if(t=!1,!e){var r=i.cluster.getClusterer();if(google.maps.event.trigger(r,"click",i.cluster),google.maps.event.trigger(r,"clusterclick",i.cluster),r.getZoomOnClick()){var n=r.getMaxZoom(),o=i.cluster.getBounds();r.getMap().fitBounds(o),setTimeout((function(){r.getMap().fitBounds(o),null!==n&&r.getMap().getZoom()>n&&r.getMap().setZoom(n+1)}),100)}s.cancelBubble=!0,s.stopPropagation&&s.stopPropagation()}})),google.maps.event.addDomListener(this.div,"mouseover",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseover",i.cluster)})),google.maps.event.addDomListener(this.div,"mouseout",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseout",i.cluster)}))},e.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),google.maps.event.clearInstanceListeners(this.div),this.div.parentNode.removeChild(this.div),this.div=null)},e.draw=function(){if(this.visible&&null!==this.div&&this.center){var t=this.getPosFromLatLng(this.center),e=t.x;this.div.style.top=t.y+"px",this.div.style.left=e+"px"}},e.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},e.show=function(){if(this.div&&this.center){var t,e="",i=this.backgroundPosition.split(" "),s=parseInt(i[0].replace(/^\s+|\s+$/g,""),10),r=parseInt(i[1].replace(/^\s+|\s+$/g,""),10),n=this.getPosFromLatLng(this.center);t=null===this.sums||void 0===this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,this.div.style.cssText=this.createCss(n),e="<img alt='"+t+"' src='"+this.url+"' style='position: absolute; top: "+r+"px; left: "+s+"px; ",this.cluster.getClusterer().enableRetinaIcons||(e+="clip: rect("+-1*r+"px, "+(-1*s+this.width)+"px, "+(-1*r+this.height)+"px, "+-1*s+"px);"),this.div.innerHTML=(e+="'>")+"<div style='position: absolute;top: "+this.anchorText[0]+"px;left: "+this.anchorText[1]+"px;color: "+this.textColor+";font-size: "+this.textSize+"px;font-family: "+this.fontFamily+";font-weight: "+this.fontWeight+";font-style: "+this.fontStyle+";text-decoration: "+this.textDecoration+";text-align: center;width: "+this.width+"px;line-height:"+this.height+"px;'>"+this.sums.text+"</div>",this.div.title=t,this.div.style.display=""}this.visible=!0},e.useStyle=function(t){this.sums=t;var e=this.styles[Math.min(this.styles.length-1,Math.max(0,t.index-1))];this.url=e.url,this.height=e.height,this.width=e.width,this.anchorText=e.anchorText||[0,0],this.anchorIcon=e.anchorIcon||[this.height/2,this.width/2],this.textColor=e.textColor||"black",this.textSize=e.textSize||11,this.textDecoration=e.textDecoration||"none",this.fontWeight=e.fontWeight||"bold",this.fontStyle=e.fontStyle||"normal",this.fontFamily=e.fontFamily||"Arial,sans-serif",this.backgroundPosition=e.backgroundPosition||"0 0"},e.setCenter=function(t){this.center=t},e.createCss=function(t){var e=[];return e.push("cursor: pointer;"),e.push("position: absolute; top: "+t.y+"px; left: "+t.x+"px;"),e.push("width: "+this.width+"px; height: "+this.height+"px;"),e.join("")},e.getPosFromLatLng=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=this.anchorIcon[1],e.y-=this.anchorIcon[0],e},t}(),e=function(){function e(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new t(this,this.markerClusterer.getStyles())}var i=e.prototype;return i.getSize=function(){return this.markers.length},i.getMarkers=function(){return this.markers},i.getCenter=function(){return this.center},i.getMap=function(){return this.map},i.getClusterer=function(){return this.markerClusterer},i.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center,this.center),e=this.getMarkers(),i=0;i<e.length;i++){var s=e[i].getPosition();s&&t.extend(s)}return t},i.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},i.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;if(this.center){if(this.averageCenter){var e=t.getPosition();if(e){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+e.lat())/i,(this.center.lng()*(i-1)+e.lng())/i),this.calculateBounds()}}}else{var s=t.getPosition();s&&(this.center=s,this.calculateBounds())}t.isAdded=!0,this.markers.push(t);var r=this.markers.length,n=this.markerClusterer.getMaxZoom();if(null!==n&&this.map.getZoom()>n)t.getMap()!==this.map&&t.setMap(this.map);else if(r<this.minClusterSize)t.getMap()!==this.map&&t.setMap(this.map);else if(r===this.minClusterSize)for(var o=0;o<r;o++)this.markers[o].setMap(null);else t.setMap(null);return!0},i.isMarkerInClusterBounds=function(t){if(null!==this.bounds){var e=t.getPosition();if(e)return this.bounds.contains(e)}return!1},i.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},i.updateIcon=function(){var t=this.markers.length,e=this.markerClusterer.getMaxZoom();null!==e&&this.map.getZoom()>e?this.clusterIcon.hide():t<this.minClusterSize?this.clusterIcon.hide():(this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show())},i.isMarkerAlreadyAdded=function(t){if(this.markers.includes)return this.markers.includes(t);for(var e=0;e<this.markers.length;e++)if(t===this.markers[e])return!0;return!1},e}(),i=function(t,e){for(var i=0,s=t.length.toString(),r=s;0!==r;)r=parseInt(r,10)/10,i++;return{text:s,index:i=Math.min(i,e),title:""}},s=[53,56,66,78,90],r=function(){function t(e,r,n){void 0===r&&(r=[]),void 0===n&&(n={}),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=n.gridSize||60,this.minClusterSize=n.minimumClusterSize||2,this.maxZoom=n.maxZoom||null,this.styles=n.styles||[],this.title=n.title||"",this.zoomOnClick=!0,void 0!==n.zoomOnClick&&(this.zoomOnClick=n.zoomOnClick),this.averageCenter=!1,void 0!==n.averageCenter&&(this.averageCenter=n.averageCenter),this.ignoreHidden=!1,void 0!==n.ignoreHidden&&(this.ignoreHidden=n.ignoreHidden),this.enableRetinaIcons=!1,void 0!==n.enableRetinaIcons&&(this.enableRetinaIcons=n.enableRetinaIcons),this.imagePath=n.imagePath||"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",this.imageExtension=n.imageExtension||"png",this.imageSizes=n.imageSizes||s,this.calculator=n.calculator||i,this.batchSize=n.batchSize||2e3,this.batchSizeIE=n.batchSizeIE||500,this.clusterClass=n.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(r,!0),this.setMap(e)}var r=t.prototype;return r.onAdd=function(){var t=this;this.activeMap=this.getMap(),this.ready=!0,this.repaint(),this.listeners=[google.maps.event.addListener(this.getMap(),"zoom_changed",(function(){t.resetViewport(!1),t.getMap().getZoom()!==(t.get("minZoom")||0)&&t.getMap().getZoom()!==t.get("maxZoom")||google.maps.event.trigger(t,"idle")})),google.maps.event.addListener(this.getMap(),"idle",(function(){t.redraw()}))]},r.onRemove=function(){for(var t=0;t<this.markers.length;t++)this.markers[t].getMap()!==this.activeMap&&this.markers[t].setMap(this.activeMap);for(var e=0;e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(var i=0;i<this.listeners.length;i++)google.maps.event.removeListener(this.listeners[i]);this.listeners=[],this.activeMap=null,this.ready=!1},r.draw=function(){},r.setupStyles=function(){if(!(this.styles.length>0))for(var t=0;t<this.imageSizes.length;t++)this.styles.push({url:this.imagePath+(t+1)+"."+this.imageExtension,height:this.imageSizes[t],width:this.imageSizes[t]})},r.fitMapToMarkers=function(){for(var t=this.getMarkers(),e=new google.maps.LatLngBounds,i=0;i<t.length;i++){var s=t[i].getPosition();s&&e.extend(s)}this.getMap().fitBounds(e)},r.getGridSize=function(){return this.gridSize},r.setGridSize=function(t){this.gridSize=t},r.getMinimumClusterSize=function(){return this.minClusterSize},r.setMinimumClusterSize=function(t){this.minClusterSize=t},r.getMaxZoom=function(){return this.maxZoom},r.setMaxZoom=function(t){this.maxZoom=t},r.getStyles=function(){return this.styles},r.setStyles=function(t){this.styles=t},r.getTitle=function(){return this.title},r.setTitle=function(t){this.title=t},r.getZoomOnClick=function(){return this.zoomOnClick},r.setZoomOnClick=function(t){this.zoomOnClick=t},r.getAverageCenter=function(){return this.averageCenter},r.setAverageCenter=function(t){this.averageCenter=t},r.getIgnoreHidden=function(){return this.ignoreHidden},r.setIgnoreHidden=function(t){this.ignoreHidden=t},r.getEnableRetinaIcons=function(){return this.enableRetinaIcons},r.setEnableRetinaIcons=function(t){this.enableRetinaIcons=t},r.getImageExtension=function(){return this.imageExtension},r.setImageExtension=function(t){this.imageExtension=t},r.getImagePath=function(){return this.imagePath},r.setImagePath=function(t){this.imagePath=t},r.getImageSizes=function(){return this.imageSizes},r.setImageSizes=function(t){this.imageSizes=t},r.getCalculator=function(){return this.calculator},r.setCalculator=function(t){this.calculator=t},r.getBatchSizeIE=function(){return this.batchSizeIE},r.setBatchSizeIE=function(t){this.batchSizeIE=t},r.getClusterClass=function(){return this.clusterClass},r.setClusterClass=function(t){this.clusterClass=t},r.getMarkers=function(){return this.markers},r.getTotalMarkers=function(){return this.markers.length},r.getClusters=function(){return this.clusters},r.getTotalClusters=function(){return this.clusters.length},r.addMarker=function(t,e){this.pushMarkerTo(t),e||this.redraw()},r.addMarkers=function(t,e){for(var i in t)t.hasOwnProperty(i)&&this.pushMarkerTo(t[i]);e||this.redraw()},r.pushMarkerTo=function(t){var e=this;t.getDraggable()&&google.maps.event.addListener(t,"dragend",(function(){e.ready&&(t.isAdded=!1,e.repaint())})),t.isAdded=!1,this.markers.push(t)},r.removeMarker_=function(t){var e=-1;if(this.markers.indexOf)e=this.markers.indexOf(t);else for(var i=0;i<this.markers.length;i++)if(t===this.markers[i]){e=i;break}return-1!==e&&(t.setMap(null),this.markers.splice(e,1),!0)},r.removeMarker=function(t,e){var i=this.removeMarker_(t);return!e&&i&&this.repaint(),i},r.removeMarkers=function(t,e){for(var i=!1,s=0;s<t.length;s++)i=i||this.removeMarker_(t[s]);return!e&&i&&this.repaint(),i},r.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},r.repaint=function(){var t=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout((function(){for(var e=0;e<t.length;e++)t[e].remove()}),0)},r.getExtendedBounds=function(t){var e=this.getProjection(),i=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()));i.x+=this.gridSize,i.y-=this.gridSize;var s=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()));return s.x-=this.gridSize,s.y+=this.gridSize,t.extend(e.fromDivPixelToLatLng(i)),t.extend(e.fromDivPixelToLatLng(s)),t},r.redraw=function(){this.createClusters(0)},r.resetViewport=function(t){for(var e=0;e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(var i=0;i<this.markers.length;i++){var s=this.markers[i];s.isAdded=!1,t&&s.setMap(null)}},r.distanceBetweenPoints=function(t,e){var i=(e.lat()-t.lat())*Math.PI/180,s=(e.lng()-t.lng())*Math.PI/180,r=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2);return 2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r))*6371},r.isMarkerInBounds=function(t,e){var i=t.getPosition();return!!i&&e.contains(i)},r.addToClosestCluster=function(t){for(var i,s=4e4,r=null,n=0;n<this.clusters.length;n++){var o=(i=this.clusters[n]).getCenter(),a=t.getPosition();if(o&&a){var h=this.distanceBetweenPoints(o,a);h<s&&(s=h,r=i)}}r&&r.isMarkerInClusterBounds(t)?r.addMarker(t):((i=new e(this)).addMarker(t),this.clusters.push(i))},r.createClusters=function(t){var e=this;if(this.ready){0===t&&(google.maps.event.trigger(this,"clusteringbegin",this),null!==this.timerRefStatic&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var i=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),s=this.getExtendedBounds(i),r=Math.min(t+this.batchSize,this.markers.length),n=t;n<r;n++){var o=this.markers[n];!o.isAdded&&this.isMarkerInBounds(o,s)&&(!this.ignoreHidden||this.ignoreHidden&&o.getVisible())&&this.addToClosestCluster(o)}if(r<this.markers.length)this.timerRefStatic=window.setTimeout((function(){e.createClusters(r)}),0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var a=0;a<this.clusters.length;a++)this.clusters[a].updateIcon()}}},r.extend=function(t,e){return function(t){for(var e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},t}();exports.Cluster=e,exports.ClusterIcon=t,exports.Clusterer=r;
"use strict";var t=function(){function t(e,i){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.className=this.cluster.getClusterer().getClusterClass(),this.styles=i,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.setMap(e.getMap())}var e=t.prototype;return e.onAdd=function(){var t,e,i=this;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div),this.boundsChangedListener=google.maps.event.addListener(this.getMap(),"boundschanged",(function(){e=t})),google.maps.event.addDomListener(this.div,"mousedown",(function(){t=!0,e=!1})),google.maps.event.addDomListener(this.div,"click",(function(s){if(t=!1,!e){var r=i.cluster.getClusterer();if(google.maps.event.trigger(r,"click",i.cluster),google.maps.event.trigger(r,"clusterclick",i.cluster),r.getZoomOnClick()){var n=r.getMaxZoom(),o=i.cluster.getBounds();r.getMap().fitBounds(o),setTimeout((function(){r.getMap().fitBounds(o),null!==n&&r.getMap().getZoom()>n&&r.getMap().setZoom(n+1)}),100)}s.cancelBubble=!0,s.stopPropagation&&s.stopPropagation()}})),google.maps.event.addDomListener(this.div,"mouseover",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseover",i.cluster)})),google.maps.event.addDomListener(this.div,"mouseout",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseout",i.cluster)}))},e.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),google.maps.event.clearInstanceListeners(this.div),this.div.parentNode.removeChild(this.div),this.div=null)},e.draw=function(){if(this.visible&&null!==this.div&&this.center){var t=this.getPosFromLatLng(this.center),e=t.x;this.div.style.top=t.y+"px",this.div.style.left=e+"px"}},e.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},e.show=function(){if(this.div&&this.center){var t,e="",i=this.backgroundPosition.split(" "),s=parseInt(i[0].replace(/^\s+|\s+$/g,""),10),r=parseInt(i[1].replace(/^\s+|\s+$/g,""),10),n=this.getPosFromLatLng(this.center);t=null===this.sums||void 0===this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,this.div.style.cssText=this.createCss(n),e="<img alt='"+t+"' src='"+this.url+"' style='position: absolute; top: "+r+"px; left: "+s+"px; ",this.cluster.getClusterer().enableRetinaIcons||(e+="clip: rect("+-1*r+"px, "+(-1*s+this.width)+"px, "+(-1*r+this.height)+"px, "+-1*s+"px);"),this.div.innerHTML=(e+="'>")+"<div style='position: absolute;top: "+this.anchorText[0]+"px;left: "+this.anchorText[1]+"px;color: "+this.textColor+";font-size: "+this.textSize+"px;font-family: "+this.fontFamily+";font-weight: "+this.fontWeight+";font-style: "+this.fontStyle+";text-decoration: "+this.textDecoration+";text-align: center;width: "+this.width+"px;line-height:"+this.height+"px;'>"+this.sums.text+"</div>",this.div.title=t,this.div.style.display=""}this.visible=!0},e.useStyle=function(t){this.sums=t;var e=this.styles[Math.min(this.styles.length-1,Math.max(0,t.index-1))];this.url=e.url,this.height=e.height,this.width=e.width,this.anchorText=e.anchorText||[0,0],this.anchorIcon=e.anchorIcon||[this.height/2,this.width/2],this.textColor=e.textColor||"black",this.textSize=e.textSize||11,this.textDecoration=e.textDecoration||"none",this.fontWeight=e.fontWeight||"bold",this.fontStyle=e.fontStyle||"normal",this.fontFamily=e.fontFamily||"Arial,sans-serif",this.backgroundPosition=e.backgroundPosition||"0 0"},e.setCenter=function(t){this.center=t},e.createCss=function(t){var e=[];return e.push("cursor: pointer;"),e.push("position: absolute; top: "+t.y+"px; left: "+t.x+"px;"),e.push("width: "+this.width+"px; height: "+this.height+"px;"),e.join("")},e.getPosFromLatLng=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=this.anchorIcon[1],e.y-=this.anchorIcon[0],e},t}(),e=function(){function e(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new t(this,this.markerClusterer.getStyles())}var i=e.prototype;return i.getSize=function(){return this.markers.length},i.getMarkers=function(){return this.markers},i.getCenter=function(){return this.center},i.getMap=function(){return this.map},i.getClusterer=function(){return this.markerClusterer},i.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center,this.center),e=this.getMarkers(),i=0;i<e.length;i++){var s=e[i].getPosition();s&&t.extend(s)}return t},i.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},i.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;if(this.center){if(this.averageCenter){var e=t.getPosition();if(e){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+e.lat())/i,(this.center.lng()*(i-1)+e.lng())/i),this.calculateBounds()}}}else{var s=t.getPosition();s&&(this.center=s,this.calculateBounds())}t.isAdded=!0,this.markers.push(t);var r=this.markers.length,n=this.markerClusterer.getMaxZoom();if(null!==n&&this.map.getZoom()>n)t.getMap()!==this.map&&t.setMap(this.map);else if(r<this.minClusterSize)t.getMap()!==this.map&&t.setMap(this.map);else if(r===this.minClusterSize)for(var o=0;o<r;o++)this.markers[o].setMap(null);else t.setMap(null);return!0},i.isMarkerInClusterBounds=function(t){if(null!==this.bounds){var e=t.getPosition();if(e)return this.bounds.contains(e)}return!1},i.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},i.updateIcon=function(){var t=this.markers.length,e=this.markerClusterer.getMaxZoom();null!==e&&this.map.getZoom()>e||t<this.minClusterSize?this.clusterIcon.hide():(this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show())},i.isMarkerAlreadyAdded=function(t){if(this.markers.includes)return this.markers.includes(t);for(var e=0;e<this.markers.length;e++)if(t===this.markers[e])return!0;return!1},e}(),i=function(t,e){for(var i=0,s=t.length.toString(),r=s;0!==r;)r=parseInt(r,10)/10,i++;return{text:s,index:i=Math.min(i,e),title:""}},s=[53,56,66,78,90],r=function(){function t(e,r,n){void 0===r&&(r=[]),void 0===n&&(n={}),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=n.gridSize||60,this.minClusterSize=n.minimumClusterSize||2,this.maxZoom=n.maxZoom||null,this.styles=n.styles||[],this.title=n.title||"",this.zoomOnClick=!0,void 0!==n.zoomOnClick&&(this.zoomOnClick=n.zoomOnClick),this.averageCenter=!1,void 0!==n.averageCenter&&(this.averageCenter=n.averageCenter),this.ignoreHidden=!1,void 0!==n.ignoreHidden&&(this.ignoreHidden=n.ignoreHidden),this.enableRetinaIcons=!1,void 0!==n.enableRetinaIcons&&(this.enableRetinaIcons=n.enableRetinaIcons),this.imagePath=n.imagePath||"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",this.imageExtension=n.imageExtension||"png",this.imageSizes=n.imageSizes||s,this.calculator=n.calculator||i,this.batchSize=n.batchSize||2e3,this.batchSizeIE=n.batchSizeIE||500,this.clusterClass=n.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(r,!0),this.setMap(e)}var r=t.prototype;return r.onAdd=function(){var t=this;this.activeMap=this.getMap(),this.ready=!0,this.repaint(),this.listeners=[google.maps.event.addListener(this.getMap(),"zoom_changed",(function(){t.resetViewport(!1),t.getMap().getZoom()!==(t.get("minZoom")||0)&&t.getMap().getZoom()!==t.get("maxZoom")||google.maps.event.trigger(t,"idle")})),google.maps.event.addListener(this.getMap(),"idle",(function(){t.redraw()}))]},r.onRemove=function(){for(var t=0;t<this.markers.length;t++)this.markers[t].getMap()!==this.activeMap&&this.markers[t].setMap(this.activeMap);for(var e=0;e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(var i=0;i<this.listeners.length;i++)google.maps.event.removeListener(this.listeners[i]);this.listeners=[],this.activeMap=null,this.ready=!1},r.draw=function(){},r.setupStyles=function(){if(!(this.styles.length>0))for(var t=0;t<this.imageSizes.length;t++)this.styles.push({url:this.imagePath+(t+1)+"."+this.imageExtension,height:this.imageSizes[t],width:this.imageSizes[t]})},r.fitMapToMarkers=function(){for(var t=this.getMarkers(),e=new google.maps.LatLngBounds,i=0;i<t.length;i++){var s=t[i].getPosition();s&&e.extend(s)}this.getMap().fitBounds(e)},r.getGridSize=function(){return this.gridSize},r.setGridSize=function(t){this.gridSize=t},r.getMinimumClusterSize=function(){return this.minClusterSize},r.setMinimumClusterSize=function(t){this.minClusterSize=t},r.getMaxZoom=function(){return this.maxZoom},r.setMaxZoom=function(t){this.maxZoom=t},r.getStyles=function(){return this.styles},r.setStyles=function(t){this.styles=t},r.getTitle=function(){return this.title},r.setTitle=function(t){this.title=t},r.getZoomOnClick=function(){return this.zoomOnClick},r.setZoomOnClick=function(t){this.zoomOnClick=t},r.getAverageCenter=function(){return this.averageCenter},r.setAverageCenter=function(t){this.averageCenter=t},r.getIgnoreHidden=function(){return this.ignoreHidden},r.setIgnoreHidden=function(t){this.ignoreHidden=t},r.getEnableRetinaIcons=function(){return this.enableRetinaIcons},r.setEnableRetinaIcons=function(t){this.enableRetinaIcons=t},r.getImageExtension=function(){return this.imageExtension},r.setImageExtension=function(t){this.imageExtension=t},r.getImagePath=function(){return this.imagePath},r.setImagePath=function(t){this.imagePath=t},r.getImageSizes=function(){return this.imageSizes},r.setImageSizes=function(t){this.imageSizes=t},r.getCalculator=function(){return this.calculator},r.setCalculator=function(t){this.calculator=t},r.getBatchSizeIE=function(){return this.batchSizeIE},r.setBatchSizeIE=function(t){this.batchSizeIE=t},r.getClusterClass=function(){return this.clusterClass},r.setClusterClass=function(t){this.clusterClass=t},r.getMarkers=function(){return this.markers},r.getTotalMarkers=function(){return this.markers.length},r.getClusters=function(){return this.clusters},r.getTotalClusters=function(){return this.clusters.length},r.addMarker=function(t,e){this.pushMarkerTo(t),e||this.redraw()},r.addMarkers=function(t,e){for(var i in t)t.hasOwnProperty(i)&&this.pushMarkerTo(t[i]);e||this.redraw()},r.pushMarkerTo=function(t){var e=this;t.getDraggable()&&google.maps.event.addListener(t,"dragend",(function(){e.ready&&(t.isAdded=!1,e.repaint())})),t.isAdded=!1,this.markers.push(t)},r.removeMarker_=function(t){var e=-1;if(this.markers.indexOf)e=this.markers.indexOf(t);else for(var i=0;i<this.markers.length;i++)if(t===this.markers[i]){e=i;break}return-1!==e&&(t.setMap(null),this.markers.splice(e,1),!0)},r.removeMarker=function(t,e){var i=this.removeMarker_(t);return!e&&i&&this.repaint(),i},r.removeMarkers=function(t,e){for(var i=!1,s=0;s<t.length;s++)i=i||this.removeMarker_(t[s]);return!e&&i&&this.repaint(),i},r.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},r.repaint=function(){var t=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout((function(){for(var e=0;e<t.length;e++)t[e].remove()}),0)},r.getExtendedBounds=function(t){var e=this.getProjection(),i=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()));i.x+=this.gridSize,i.y-=this.gridSize;var s=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()));return s.x-=this.gridSize,s.y+=this.gridSize,t.extend(e.fromDivPixelToLatLng(i)),t.extend(e.fromDivPixelToLatLng(s)),t},r.redraw=function(){this.createClusters(0)},r.resetViewport=function(t){for(var e=0;e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(var i=0;i<this.markers.length;i++){var s=this.markers[i];s.isAdded=!1,t&&s.setMap(null)}},r.distanceBetweenPoints=function(t,e){var i=(e.lat()-t.lat())*Math.PI/180,s=(e.lng()-t.lng())*Math.PI/180,r=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2);return 2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r))*6371},r.isMarkerInBounds=function(t,e){var i=t.getPosition();return!!i&&e.contains(i)},r.addToClosestCluster=function(t){for(var i,s=4e4,r=null,n=0;n<this.clusters.length;n++){var o=(i=this.clusters[n]).getCenter(),a=t.getPosition();if(o&&a){var h=this.distanceBetweenPoints(o,a);h<s&&(s=h,r=i)}}r&&r.isMarkerInClusterBounds(t)?r.addMarker(t):((i=new e(this)).addMarker(t),this.clusters.push(i))},r.createClusters=function(t){var e=this;if(this.ready){0===t&&(google.maps.event.trigger(this,"clusteringbegin",this),null!==this.timerRefStatic&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var i=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),s=this.getExtendedBounds(i),r=Math.min(t+this.batchSize,this.markers.length),n=t;n<r;n++){var o=this.markers[n];!o.isAdded&&this.isMarkerInBounds(o,s)&&(!this.ignoreHidden||this.ignoreHidden&&o.getVisible())&&this.addToClosestCluster(o)}if(r<this.markers.length)this.timerRefStatic=window.setTimeout((function(){e.createClusters(r)}),0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var a=0;a<this.clusters.length;a++)this.clusters[a].updateIcon()}}},r.extend=function(t,e){return function(t){for(var e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},t}();exports.Cluster=e,exports.ClusterIcon=t,exports.Clusterer=r;
//# sourceMappingURL=markerclusterer.cjs.production.min.js.map

@@ -1,4 +0,2 @@

var ClusterIcon =
/*#__PURE__*/
function () {
var ClusterIcon = /*#__PURE__*/function () {
function ClusterIcon(cluster, styles) {

@@ -25,3 +23,3 @@ cluster.getClusterer().extend(ClusterIcon, google.maps.OverlayView);

this.fontFamily = 'Arial,sans-serif';
this.backgroundPosition = '0 0'; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.backgroundPosition = '0 0'; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -44,3 +42,3 @@

this.show();
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -51,3 +49,3 @@

this.boundsChangedListener = google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.boundsChangedListener = google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -60,4 +58,6 @@ this.getMap(), 'boundschanged', function boundsChanged() {

cDraggingMapByCluster = false;
});
google.maps.event.addDomListener(this.div, 'click', function (event) {
}); // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
google.maps.event.addDomListener(this.div, 'click', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function (event) {
cMouseDownInCluster = false;

@@ -84,3 +84,3 @@

var bounds = _this.cluster.getBounds(); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
var bounds = _this.cluster.getBounds(); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -92,10 +92,10 @@

setTimeout(function timeout() {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
markerClusterer.getMap().fitBounds(bounds); // Don't zoom beyond the max zoom level
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
if (maxZoom !== null && // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
markerClusterer.getMap().getZoom() > maxZoom) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
if (maxZoom !== null && markerClusterer.getMap().getZoom() > maxZoom) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -115,3 +115,4 @@ markerClusterer.getMap().setZoom(maxZoom + 1);

});
google.maps.event.addDomListener(this.div, 'mouseover', function () {
google.maps.event.addDomListener(this.div, 'mouseover', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
/**

@@ -124,4 +125,6 @@ * This event is fired when the mouse moves over a cluster marker.

google.maps.event.trigger(_this.cluster.getClusterer(), 'mouseover', _this.cluster);
});
google.maps.event.addDomListener(this.div, 'mouseout', function () {
}); // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
google.maps.event.addDomListener(this.div, 'mouseout', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
/**

@@ -172,4 +175,4 @@ * This event is fired when the mouse moves out of a cluster marker.

if (this.div && this.center) {
var img = '';
var divTitle = ''; // NOTE: values must be specified in px units
var img = '',
divTitle = ''; // NOTE: values must be specified in px units

@@ -188,4 +191,4 @@ var bp = this.backgroundPosition.split(' ');

this.div.style.cssText = this.createCss(pos);
img = "<img alt='" + divTitle + "' src='" + this.url + "' style='position: absolute; top: " + spriteV + 'px; left: ' + spriteH + 'px; '; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
img = "<img alt='" + divTitle + "' src='" + this.url + "' style='position: absolute; top: " + spriteV + 'px; left: ' + spriteH + 'px; '; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
//@ts-ignore

@@ -197,3 +200,3 @@ if (!this.cluster.getClusterer().enableRetinaIcons) {

img += "'>";
this.div.innerHTML = img + "<div style='" + 'position: absolute;' + 'top: ' + this.anchorText[0] + 'px;' + 'left: ' + this.anchorText[1] + 'px;' + 'color: ' + this.textColor + ';' + 'font-size: ' + this.textSize + 'px;' + 'font-family: ' + this.fontFamily + ';' + 'font-weight: ' + this.fontWeight + ';' + 'font-style: ' + this.fontStyle + ';' + 'text-decoration: ' + this.textDecoration + ';' + 'text-align: center;' + 'width: ' + this.width + 'px;' + 'line-height:' + this.height + 'px;' + "'>" + // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.div.innerHTML = img + "<div style='" + 'position: absolute;' + 'top: ' + this.anchorText[0] + 'px;' + 'left: ' + this.anchorText[1] + 'px;' + 'color: ' + this.textColor + ';' + 'font-size: ' + this.textSize + 'px;' + 'font-family: ' + this.fontFamily + ';' + 'font-weight: ' + this.fontWeight + ';' + 'font-style: ' + this.fontStyle + ';' + 'text-decoration: ' + this.textDecoration + ';' + 'text-align: center;' + 'width: ' + this.width + 'px;' + 'line-height:' + this.height + 'px;' + "'>" + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -238,3 +241,3 @@ this.sums.text + '</div>';

_proto.getPosFromLatLng = function getPosFromLatLng(latlng) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -252,7 +255,5 @@ var pos = this.getProjection().fromLatLngToDivPixel(latlng);

var Cluster =
/*#__PURE__*/
function () {
var Cluster = /*#__PURE__*/function () {
function Cluster(markerClusterer) {
this.markerClusterer = markerClusterer; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.markerClusterer = markerClusterer; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -308,6 +309,7 @@

_proto.remove = function remove() {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.clusterIcon.setMap(null);
this.markers = [];
this.markers = []; // @ts-ignore
delete this.markers;

@@ -432,3 +434,3 @@ };

while (dv !== 0) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -453,5 +455,3 @@ dv = parseInt(dv, 10) / 10;

var CLUSTERER_CLASS = 'cluster';
var Clusterer =
/*#__PURE__*/
function () {
var Clusterer = /*#__PURE__*/function () {
function Clusterer(map, optMarkers, optOptions) {

@@ -516,3 +516,3 @@ if (optMarkers === void 0) {

this.setupStyles();
this.addMarkers(optMarkers, true); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.addMarkers(optMarkers, true); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -528,3 +528,3 @@

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -535,5 +535,6 @@ this.activeMap = this.getMap();

this.listeners = [google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.listeners = [google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.getMap(), 'zoom_changed', function () {
this.getMap(), 'zoom_changed', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
_this.resetViewport(false); // Workaround for this Google bug: when map is at level 0 and "-" of

@@ -546,5 +547,5 @@ // zoom slider is clicked, a "zoom_changed" event is fired even though

if ( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
if ( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
_this.getMap().getZoom() === (_this.get('minZoom') || 0) || // eslint-disable-next-line @typescript-eslint/ban-ts-comment
_this.getMap().getZoom() === (_this.get('minZoom') || 0) || // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -554,8 +555,10 @@ _this.getMap().getZoom() === _this.get('maxZoom')) {

}
}), google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
}), google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.getMap(), 'idle', function () {
this.getMap(), 'idle', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
_this.redraw();
})];
};
} // eslint-disable-next-line @getify/proper-arrows/this
;

@@ -584,7 +587,6 @@ _proto.onRemove = function onRemove() {

this.ready = false;
};
} // eslint-disable-next-line @typescript-eslint/no-empty-function
;
_proto.draw = function draw() {
return;
};
_proto.draw = function draw() {};

@@ -615,3 +617,3 @@ _proto.setupStyles = function setupStyles() {

}
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -769,3 +771,2 @@

for (var key in markers) {
// eslint-disable-next-line no-prototype-builtins
if (markers.hasOwnProperty(key)) {

@@ -786,2 +787,3 @@ this.pushMarkerTo(markers[key]);

if (marker.getDraggable()) {
// eslint-disable-next-line @getify/proper-arrows/name, @getify/proper-arrows/this
google.maps.event.addListener(marker, 'dragend', function () {

@@ -869,3 +871,3 @@ if (_this2.ready) {

_proto.getExtendedBounds = function getExtendedBounds(bounds) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -981,3 +983,4 @@ var projection = this.getProjection(); // Convert the points to pixels and the extend out by the grid size.

if (this.timerRefStatic !== null) {
window.clearTimeout(this.timerRefStatic);
window.clearTimeout(this.timerRefStatic); // @ts-ignore
delete this.timerRefStatic;

@@ -991,7 +994,7 @@ }

var mapBounds = // eslint-disable-next-line @typescript-eslint/ban-ts-comment
var mapBounds = // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.getMap().getZoom() > 3 ? new google.maps.LatLngBounds( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.getMap().getZoom() > 3 ? new google.maps.LatLngBounds( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.getMap().getBounds().getSouthWest(), // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.getMap().getBounds().getSouthWest(), // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -1013,3 +1016,4 @@ this.getMap().getBounds().getNorthEast()) : new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));

if (iLast < this.markers.length) {
this.timerRefStatic = window.setTimeout(function () {
this.timerRefStatic = window.setTimeout( // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
_this3.createClusters(iLast);

@@ -1038,9 +1042,7 @@ }, 0);

// eslint-disable-next-line guard-for-in
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
for (var property in object.prototype) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.prototype[property] = object.prototype[property];
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -1047,0 +1049,0 @@

@@ -7,5 +7,3 @@ (function (global, factory) {

var ClusterIcon =
/*#__PURE__*/
function () {
var ClusterIcon = /*#__PURE__*/function () {
function ClusterIcon(cluster, styles) {

@@ -32,3 +30,3 @@ cluster.getClusterer().extend(ClusterIcon, google.maps.OverlayView);

this.fontFamily = 'Arial,sans-serif';
this.backgroundPosition = '0 0'; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.backgroundPosition = '0 0'; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -51,3 +49,3 @@

this.show();
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -58,3 +56,3 @@

this.boundsChangedListener = google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.boundsChangedListener = google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -67,4 +65,6 @@ this.getMap(), 'boundschanged', function boundsChanged() {

cDraggingMapByCluster = false;
});
google.maps.event.addDomListener(this.div, 'click', function (event) {
}); // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
google.maps.event.addDomListener(this.div, 'click', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function (event) {
cMouseDownInCluster = false;

@@ -91,3 +91,3 @@

var bounds = _this.cluster.getBounds(); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
var bounds = _this.cluster.getBounds(); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -99,10 +99,10 @@

setTimeout(function timeout() {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
markerClusterer.getMap().fitBounds(bounds); // Don't zoom beyond the max zoom level
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
if (maxZoom !== null && // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
markerClusterer.getMap().getZoom() > maxZoom) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
if (maxZoom !== null && markerClusterer.getMap().getZoom() > maxZoom) {
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -122,3 +122,4 @@ markerClusterer.getMap().setZoom(maxZoom + 1);

});
google.maps.event.addDomListener(this.div, 'mouseover', function () {
google.maps.event.addDomListener(this.div, 'mouseover', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
/**

@@ -131,4 +132,6 @@ * This event is fired when the mouse moves over a cluster marker.

google.maps.event.trigger(_this.cluster.getClusterer(), 'mouseover', _this.cluster);
});
google.maps.event.addDomListener(this.div, 'mouseout', function () {
}); // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
google.maps.event.addDomListener(this.div, 'mouseout', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
/**

@@ -179,4 +182,4 @@ * This event is fired when the mouse moves out of a cluster marker.

if (this.div && this.center) {
var img = '';
var divTitle = ''; // NOTE: values must be specified in px units
var img = '',
divTitle = ''; // NOTE: values must be specified in px units

@@ -195,4 +198,4 @@ var bp = this.backgroundPosition.split(' ');

this.div.style.cssText = this.createCss(pos);
img = "<img alt='" + divTitle + "' src='" + this.url + "' style='position: absolute; top: " + spriteV + 'px; left: ' + spriteH + 'px; '; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
img = "<img alt='" + divTitle + "' src='" + this.url + "' style='position: absolute; top: " + spriteV + 'px; left: ' + spriteH + 'px; '; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
//@ts-ignore

@@ -204,3 +207,3 @@ if (!this.cluster.getClusterer().enableRetinaIcons) {

img += "'>";
this.div.innerHTML = img + "<div style='" + 'position: absolute;' + 'top: ' + this.anchorText[0] + 'px;' + 'left: ' + this.anchorText[1] + 'px;' + 'color: ' + this.textColor + ';' + 'font-size: ' + this.textSize + 'px;' + 'font-family: ' + this.fontFamily + ';' + 'font-weight: ' + this.fontWeight + ';' + 'font-style: ' + this.fontStyle + ';' + 'text-decoration: ' + this.textDecoration + ';' + 'text-align: center;' + 'width: ' + this.width + 'px;' + 'line-height:' + this.height + 'px;' + "'>" + // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.div.innerHTML = img + "<div style='" + 'position: absolute;' + 'top: ' + this.anchorText[0] + 'px;' + 'left: ' + this.anchorText[1] + 'px;' + 'color: ' + this.textColor + ';' + 'font-size: ' + this.textSize + 'px;' + 'font-family: ' + this.fontFamily + ';' + 'font-weight: ' + this.fontWeight + ';' + 'font-style: ' + this.fontStyle + ';' + 'text-decoration: ' + this.textDecoration + ';' + 'text-align: center;' + 'width: ' + this.width + 'px;' + 'line-height:' + this.height + 'px;' + "'>" + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -245,3 +248,3 @@ this.sums.text + '</div>';

_proto.getPosFromLatLng = function getPosFromLatLng(latlng) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -259,7 +262,5 @@ var pos = this.getProjection().fromLatLngToDivPixel(latlng);

var Cluster =
/*#__PURE__*/
function () {
var Cluster = /*#__PURE__*/function () {
function Cluster(markerClusterer) {
this.markerClusterer = markerClusterer; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.markerClusterer = markerClusterer; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -315,6 +316,7 @@

_proto.remove = function remove() {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.clusterIcon.setMap(null);
this.markers = [];
this.markers = []; // @ts-ignore
delete this.markers;

@@ -439,3 +441,3 @@ };

while (dv !== 0) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -460,5 +462,3 @@ dv = parseInt(dv, 10) / 10;

var CLUSTERER_CLASS = 'cluster';
var Clusterer =
/*#__PURE__*/
function () {
var Clusterer = /*#__PURE__*/function () {
function Clusterer(map, optMarkers, optOptions) {

@@ -523,3 +523,3 @@ if (optMarkers === void 0) {

this.setupStyles();
this.addMarkers(optMarkers, true); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.addMarkers(optMarkers, true); // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -535,3 +535,3 @@

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -542,5 +542,6 @@ this.activeMap = this.getMap();

this.listeners = [google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.listeners = [google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.getMap(), 'zoom_changed', function () {
this.getMap(), 'zoom_changed', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
_this.resetViewport(false); // Workaround for this Google bug: when map is at level 0 and "-" of

@@ -553,5 +554,5 @@ // zoom slider is clicked, a "zoom_changed" event is fired even though

if ( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
if ( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
_this.getMap().getZoom() === (_this.get('minZoom') || 0) || // eslint-disable-next-line @typescript-eslint/ban-ts-comment
_this.getMap().getZoom() === (_this.get('minZoom') || 0) || // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -561,8 +562,10 @@ _this.getMap().getZoom() === _this.get('maxZoom')) {

}
}), google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
}), google.maps.event.addListener( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.getMap(), 'idle', function () {
this.getMap(), 'idle', // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
_this.redraw();
})];
};
} // eslint-disable-next-line @getify/proper-arrows/this
;

@@ -591,7 +594,6 @@ _proto.onRemove = function onRemove() {

this.ready = false;
};
} // eslint-disable-next-line @typescript-eslint/no-empty-function
;
_proto.draw = function draw() {
return;
};
_proto.draw = function draw() {};

@@ -622,3 +624,3 @@ _proto.setupStyles = function setupStyles() {

}
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -776,3 +778,2 @@

for (var key in markers) {
// eslint-disable-next-line no-prototype-builtins
if (markers.hasOwnProperty(key)) {

@@ -793,2 +794,3 @@ this.pushMarkerTo(markers[key]);

if (marker.getDraggable()) {
// eslint-disable-next-line @getify/proper-arrows/name, @getify/proper-arrows/this
google.maps.event.addListener(marker, 'dragend', function () {

@@ -876,3 +878,3 @@ if (_this2.ready) {

_proto.getExtendedBounds = function getExtendedBounds(bounds) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -988,3 +990,4 @@ var projection = this.getProjection(); // Convert the points to pixels and the extend out by the grid size.

if (this.timerRefStatic !== null) {
window.clearTimeout(this.timerRefStatic);
window.clearTimeout(this.timerRefStatic); // @ts-ignore
delete this.timerRefStatic;

@@ -998,7 +1001,7 @@ }

var mapBounds = // eslint-disable-next-line @typescript-eslint/ban-ts-comment
var mapBounds = // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.getMap().getZoom() > 3 ? new google.maps.LatLngBounds( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.getMap().getZoom() > 3 ? new google.maps.LatLngBounds( // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.getMap().getBounds().getSouthWest(), // eslint-disable-next-line @typescript-eslint/ban-ts-comment
this.getMap().getBounds().getSouthWest(), // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -1020,3 +1023,4 @@ this.getMap().getBounds().getNorthEast()) : new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));

if (iLast < this.markers.length) {
this.timerRefStatic = window.setTimeout(function () {
this.timerRefStatic = window.setTimeout( // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name
function () {
_this3.createClusters(iLast);

@@ -1045,9 +1049,7 @@ }, 0);

// eslint-disable-next-line guard-for-in
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
for (var property in object.prototype) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
this.prototype[property] = object.prototype[property];
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
} // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore

@@ -1054,0 +1056,0 @@

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).markerClusterer={})}(this,(function(t){"use strict";var e=function(){function t(e,i){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.className=this.cluster.getClusterer().getClusterClass(),this.styles=i,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.setMap(e.getMap())}var e=t.prototype;return e.onAdd=function(){var t,e,i=this;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div),this.boundsChangedListener=google.maps.event.addListener(this.getMap(),"boundschanged",(function(){e=t})),google.maps.event.addDomListener(this.div,"mousedown",(function(){t=!0,e=!1})),google.maps.event.addDomListener(this.div,"click",(function(s){if(t=!1,!e){var n=i.cluster.getClusterer();if(google.maps.event.trigger(n,"click",i.cluster),google.maps.event.trigger(n,"clusterclick",i.cluster),n.getZoomOnClick()){var r=n.getMaxZoom(),o=i.cluster.getBounds();n.getMap().fitBounds(o),setTimeout((function(){n.getMap().fitBounds(o),null!==r&&n.getMap().getZoom()>r&&n.getMap().setZoom(r+1)}),100)}s.cancelBubble=!0,s.stopPropagation&&s.stopPropagation()}})),google.maps.event.addDomListener(this.div,"mouseover",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseover",i.cluster)})),google.maps.event.addDomListener(this.div,"mouseout",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseout",i.cluster)}))},e.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),google.maps.event.clearInstanceListeners(this.div),this.div.parentNode.removeChild(this.div),this.div=null)},e.draw=function(){if(this.visible&&null!==this.div&&this.center){var t=this.getPosFromLatLng(this.center),e=t.x;this.div.style.top=t.y+"px",this.div.style.left=e+"px"}},e.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},e.show=function(){if(this.div&&this.center){var t,e="",i=this.backgroundPosition.split(" "),s=parseInt(i[0].replace(/^\s+|\s+$/g,""),10),n=parseInt(i[1].replace(/^\s+|\s+$/g,""),10),r=this.getPosFromLatLng(this.center);t=null===this.sums||void 0===this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,this.div.style.cssText=this.createCss(r),e="<img alt='"+t+"' src='"+this.url+"' style='position: absolute; top: "+n+"px; left: "+s+"px; ",this.cluster.getClusterer().enableRetinaIcons||(e+="clip: rect("+-1*n+"px, "+(-1*s+this.width)+"px, "+(-1*n+this.height)+"px, "+-1*s+"px);"),this.div.innerHTML=(e+="'>")+"<div style='position: absolute;top: "+this.anchorText[0]+"px;left: "+this.anchorText[1]+"px;color: "+this.textColor+";font-size: "+this.textSize+"px;font-family: "+this.fontFamily+";font-weight: "+this.fontWeight+";font-style: "+this.fontStyle+";text-decoration: "+this.textDecoration+";text-align: center;width: "+this.width+"px;line-height:"+this.height+"px;'>"+this.sums.text+"</div>",this.div.title=t,this.div.style.display=""}this.visible=!0},e.useStyle=function(t){this.sums=t;var e=this.styles[Math.min(this.styles.length-1,Math.max(0,t.index-1))];this.url=e.url,this.height=e.height,this.width=e.width,this.anchorText=e.anchorText||[0,0],this.anchorIcon=e.anchorIcon||[this.height/2,this.width/2],this.textColor=e.textColor||"black",this.textSize=e.textSize||11,this.textDecoration=e.textDecoration||"none",this.fontWeight=e.fontWeight||"bold",this.fontStyle=e.fontStyle||"normal",this.fontFamily=e.fontFamily||"Arial,sans-serif",this.backgroundPosition=e.backgroundPosition||"0 0"},e.setCenter=function(t){this.center=t},e.createCss=function(t){var e=[];return e.push("cursor: pointer;"),e.push("position: absolute; top: "+t.y+"px; left: "+t.x+"px;"),e.push("width: "+this.width+"px; height: "+this.height+"px;"),e.join("")},e.getPosFromLatLng=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=this.anchorIcon[1],e.y-=this.anchorIcon[0],e},t}(),i=function(){function t(t){this.markerClusterer=t,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new e(this,this.markerClusterer.getStyles())}var i=t.prototype;return i.getSize=function(){return this.markers.length},i.getMarkers=function(){return this.markers},i.getCenter=function(){return this.center},i.getMap=function(){return this.map},i.getClusterer=function(){return this.markerClusterer},i.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center,this.center),e=this.getMarkers(),i=0;i<e.length;i++){var s=e[i].getPosition();s&&t.extend(s)}return t},i.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},i.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;if(this.center){if(this.averageCenter){var e=t.getPosition();if(e){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+e.lat())/i,(this.center.lng()*(i-1)+e.lng())/i),this.calculateBounds()}}}else{var s=t.getPosition();s&&(this.center=s,this.calculateBounds())}t.isAdded=!0,this.markers.push(t);var n=this.markers.length,r=this.markerClusterer.getMaxZoom();if(null!==r&&this.map.getZoom()>r)t.getMap()!==this.map&&t.setMap(this.map);else if(n<this.minClusterSize)t.getMap()!==this.map&&t.setMap(this.map);else if(n===this.minClusterSize)for(var o=0;o<n;o++)this.markers[o].setMap(null);else t.setMap(null);return!0},i.isMarkerInClusterBounds=function(t){if(null!==this.bounds){var e=t.getPosition();if(e)return this.bounds.contains(e)}return!1},i.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},i.updateIcon=function(){var t=this.markers.length,e=this.markerClusterer.getMaxZoom();null!==e&&this.map.getZoom()>e?this.clusterIcon.hide():t<this.minClusterSize?this.clusterIcon.hide():(this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show())},i.isMarkerAlreadyAdded=function(t){if(this.markers.includes)return this.markers.includes(t);for(var e=0;e<this.markers.length;e++)if(t===this.markers[e])return!0;return!1},t}(),s=function(t,e){for(var i=0,s=t.length.toString(),n=s;0!==n;)n=parseInt(n,10)/10,i++;return{text:s,index:i=Math.min(i,e),title:""}},n=[53,56,66,78,90],r=function(){function t(e,i,r){void 0===i&&(i=[]),void 0===r&&(r={}),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,void 0!==r.zoomOnClick&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,void 0!==r.averageCenter&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,void 0!==r.ignoreHidden&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,void 0!==r.enableRetinaIcons&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",this.imageExtension=r.imageExtension||"png",this.imageSizes=r.imageSizes||n,this.calculator=r.calculator||s,this.batchSize=r.batchSize||2e3,this.batchSizeIE=r.batchSizeIE||500,this.clusterClass=r.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(i,!0),this.setMap(e)}var e=t.prototype;return e.onAdd=function(){var t=this;this.activeMap=this.getMap(),this.ready=!0,this.repaint(),this.listeners=[google.maps.event.addListener(this.getMap(),"zoom_changed",(function(){t.resetViewport(!1),t.getMap().getZoom()!==(t.get("minZoom")||0)&&t.getMap().getZoom()!==t.get("maxZoom")||google.maps.event.trigger(t,"idle")})),google.maps.event.addListener(this.getMap(),"idle",(function(){t.redraw()}))]},e.onRemove=function(){for(var t=0;t<this.markers.length;t++)this.markers[t].getMap()!==this.activeMap&&this.markers[t].setMap(this.activeMap);for(var e=0;e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(var i=0;i<this.listeners.length;i++)google.maps.event.removeListener(this.listeners[i]);this.listeners=[],this.activeMap=null,this.ready=!1},e.draw=function(){},e.setupStyles=function(){if(!(this.styles.length>0))for(var t=0;t<this.imageSizes.length;t++)this.styles.push({url:this.imagePath+(t+1)+"."+this.imageExtension,height:this.imageSizes[t],width:this.imageSizes[t]})},e.fitMapToMarkers=function(){for(var t=this.getMarkers(),e=new google.maps.LatLngBounds,i=0;i<t.length;i++){var s=t[i].getPosition();s&&e.extend(s)}this.getMap().fitBounds(e)},e.getGridSize=function(){return this.gridSize},e.setGridSize=function(t){this.gridSize=t},e.getMinimumClusterSize=function(){return this.minClusterSize},e.setMinimumClusterSize=function(t){this.minClusterSize=t},e.getMaxZoom=function(){return this.maxZoom},e.setMaxZoom=function(t){this.maxZoom=t},e.getStyles=function(){return this.styles},e.setStyles=function(t){this.styles=t},e.getTitle=function(){return this.title},e.setTitle=function(t){this.title=t},e.getZoomOnClick=function(){return this.zoomOnClick},e.setZoomOnClick=function(t){this.zoomOnClick=t},e.getAverageCenter=function(){return this.averageCenter},e.setAverageCenter=function(t){this.averageCenter=t},e.getIgnoreHidden=function(){return this.ignoreHidden},e.setIgnoreHidden=function(t){this.ignoreHidden=t},e.getEnableRetinaIcons=function(){return this.enableRetinaIcons},e.setEnableRetinaIcons=function(t){this.enableRetinaIcons=t},e.getImageExtension=function(){return this.imageExtension},e.setImageExtension=function(t){this.imageExtension=t},e.getImagePath=function(){return this.imagePath},e.setImagePath=function(t){this.imagePath=t},e.getImageSizes=function(){return this.imageSizes},e.setImageSizes=function(t){this.imageSizes=t},e.getCalculator=function(){return this.calculator},e.setCalculator=function(t){this.calculator=t},e.getBatchSizeIE=function(){return this.batchSizeIE},e.setBatchSizeIE=function(t){this.batchSizeIE=t},e.getClusterClass=function(){return this.clusterClass},e.setClusterClass=function(t){this.clusterClass=t},e.getMarkers=function(){return this.markers},e.getTotalMarkers=function(){return this.markers.length},e.getClusters=function(){return this.clusters},e.getTotalClusters=function(){return this.clusters.length},e.addMarker=function(t,e){this.pushMarkerTo(t),e||this.redraw()},e.addMarkers=function(t,e){for(var i in t)t.hasOwnProperty(i)&&this.pushMarkerTo(t[i]);e||this.redraw()},e.pushMarkerTo=function(t){var e=this;t.getDraggable()&&google.maps.event.addListener(t,"dragend",(function(){e.ready&&(t.isAdded=!1,e.repaint())})),t.isAdded=!1,this.markers.push(t)},e.removeMarker_=function(t){var e=-1;if(this.markers.indexOf)e=this.markers.indexOf(t);else for(var i=0;i<this.markers.length;i++)if(t===this.markers[i]){e=i;break}return-1!==e&&(t.setMap(null),this.markers.splice(e,1),!0)},e.removeMarker=function(t,e){var i=this.removeMarker_(t);return!e&&i&&this.repaint(),i},e.removeMarkers=function(t,e){for(var i=!1,s=0;s<t.length;s++)i=i||this.removeMarker_(t[s]);return!e&&i&&this.repaint(),i},e.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},e.repaint=function(){var t=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout((function(){for(var e=0;e<t.length;e++)t[e].remove()}),0)},e.getExtendedBounds=function(t){var e=this.getProjection(),i=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()));i.x+=this.gridSize,i.y-=this.gridSize;var s=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()));return s.x-=this.gridSize,s.y+=this.gridSize,t.extend(e.fromDivPixelToLatLng(i)),t.extend(e.fromDivPixelToLatLng(s)),t},e.redraw=function(){this.createClusters(0)},e.resetViewport=function(t){for(var e=0;e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(var i=0;i<this.markers.length;i++){var s=this.markers[i];s.isAdded=!1,t&&s.setMap(null)}},e.distanceBetweenPoints=function(t,e){var i=(e.lat()-t.lat())*Math.PI/180,s=(e.lng()-t.lng())*Math.PI/180,n=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2);return 2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n))*6371},e.isMarkerInBounds=function(t,e){var i=t.getPosition();return!!i&&e.contains(i)},e.addToClosestCluster=function(t){for(var e,s=4e4,n=null,r=0;r<this.clusters.length;r++){var o=(e=this.clusters[r]).getCenter(),a=t.getPosition();if(o&&a){var h=this.distanceBetweenPoints(o,a);h<s&&(s=h,n=e)}}n&&n.isMarkerInClusterBounds(t)?n.addMarker(t):((e=new i(this)).addMarker(t),this.clusters.push(e))},e.createClusters=function(t){var e=this;if(this.ready){0===t&&(google.maps.event.trigger(this,"clusteringbegin",this),null!==this.timerRefStatic&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var i=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),s=this.getExtendedBounds(i),n=Math.min(t+this.batchSize,this.markers.length),r=t;r<n;r++){var o=this.markers[r];!o.isAdded&&this.isMarkerInBounds(o,s)&&(!this.ignoreHidden||this.ignoreHidden&&o.getVisible())&&this.addToClosestCluster(o)}if(n<this.markers.length)this.timerRefStatic=window.setTimeout((function(){e.createClusters(n)}),0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var a=0;a<this.clusters.length;a++)this.clusters[a].updateIcon()}}},e.extend=function(t,e){return function(t){for(var e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},t}();t.Cluster=i,t.ClusterIcon=e,t.Clusterer=r}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).markerClusterer={})}(this,(function(t){"use strict";var e=function(){function t(e,i){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.className=this.cluster.getClusterer().getClusterClass(),this.styles=i,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.setMap(e.getMap())}var e=t.prototype;return e.onAdd=function(){var t,e,i=this;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div),this.boundsChangedListener=google.maps.event.addListener(this.getMap(),"boundschanged",(function(){e=t})),google.maps.event.addDomListener(this.div,"mousedown",(function(){t=!0,e=!1})),google.maps.event.addDomListener(this.div,"click",(function(s){if(t=!1,!e){var n=i.cluster.getClusterer();if(google.maps.event.trigger(n,"click",i.cluster),google.maps.event.trigger(n,"clusterclick",i.cluster),n.getZoomOnClick()){var r=n.getMaxZoom(),o=i.cluster.getBounds();n.getMap().fitBounds(o),setTimeout((function(){n.getMap().fitBounds(o),null!==r&&n.getMap().getZoom()>r&&n.getMap().setZoom(r+1)}),100)}s.cancelBubble=!0,s.stopPropagation&&s.stopPropagation()}})),google.maps.event.addDomListener(this.div,"mouseover",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseover",i.cluster)})),google.maps.event.addDomListener(this.div,"mouseout",(function(){google.maps.event.trigger(i.cluster.getClusterer(),"mouseout",i.cluster)}))},e.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),google.maps.event.clearInstanceListeners(this.div),this.div.parentNode.removeChild(this.div),this.div=null)},e.draw=function(){if(this.visible&&null!==this.div&&this.center){var t=this.getPosFromLatLng(this.center),e=t.x;this.div.style.top=t.y+"px",this.div.style.left=e+"px"}},e.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},e.show=function(){if(this.div&&this.center){var t,e="",i=this.backgroundPosition.split(" "),s=parseInt(i[0].replace(/^\s+|\s+$/g,""),10),n=parseInt(i[1].replace(/^\s+|\s+$/g,""),10),r=this.getPosFromLatLng(this.center);t=null===this.sums||void 0===this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,this.div.style.cssText=this.createCss(r),e="<img alt='"+t+"' src='"+this.url+"' style='position: absolute; top: "+n+"px; left: "+s+"px; ",this.cluster.getClusterer().enableRetinaIcons||(e+="clip: rect("+-1*n+"px, "+(-1*s+this.width)+"px, "+(-1*n+this.height)+"px, "+-1*s+"px);"),this.div.innerHTML=(e+="'>")+"<div style='position: absolute;top: "+this.anchorText[0]+"px;left: "+this.anchorText[1]+"px;color: "+this.textColor+";font-size: "+this.textSize+"px;font-family: "+this.fontFamily+";font-weight: "+this.fontWeight+";font-style: "+this.fontStyle+";text-decoration: "+this.textDecoration+";text-align: center;width: "+this.width+"px;line-height:"+this.height+"px;'>"+this.sums.text+"</div>",this.div.title=t,this.div.style.display=""}this.visible=!0},e.useStyle=function(t){this.sums=t;var e=this.styles[Math.min(this.styles.length-1,Math.max(0,t.index-1))];this.url=e.url,this.height=e.height,this.width=e.width,this.anchorText=e.anchorText||[0,0],this.anchorIcon=e.anchorIcon||[this.height/2,this.width/2],this.textColor=e.textColor||"black",this.textSize=e.textSize||11,this.textDecoration=e.textDecoration||"none",this.fontWeight=e.fontWeight||"bold",this.fontStyle=e.fontStyle||"normal",this.fontFamily=e.fontFamily||"Arial,sans-serif",this.backgroundPosition=e.backgroundPosition||"0 0"},e.setCenter=function(t){this.center=t},e.createCss=function(t){var e=[];return e.push("cursor: pointer;"),e.push("position: absolute; top: "+t.y+"px; left: "+t.x+"px;"),e.push("width: "+this.width+"px; height: "+this.height+"px;"),e.join("")},e.getPosFromLatLng=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x-=this.anchorIcon[1],e.y-=this.anchorIcon[0],e},t}(),i=function(){function t(t){this.markerClusterer=t,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new e(this,this.markerClusterer.getStyles())}var i=t.prototype;return i.getSize=function(){return this.markers.length},i.getMarkers=function(){return this.markers},i.getCenter=function(){return this.center},i.getMap=function(){return this.map},i.getClusterer=function(){return this.markerClusterer},i.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center,this.center),e=this.getMarkers(),i=0;i<e.length;i++){var s=e[i].getPosition();s&&t.extend(s)}return t},i.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},i.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;if(this.center){if(this.averageCenter){var e=t.getPosition();if(e){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+e.lat())/i,(this.center.lng()*(i-1)+e.lng())/i),this.calculateBounds()}}}else{var s=t.getPosition();s&&(this.center=s,this.calculateBounds())}t.isAdded=!0,this.markers.push(t);var n=this.markers.length,r=this.markerClusterer.getMaxZoom();if(null!==r&&this.map.getZoom()>r)t.getMap()!==this.map&&t.setMap(this.map);else if(n<this.minClusterSize)t.getMap()!==this.map&&t.setMap(this.map);else if(n===this.minClusterSize)for(var o=0;o<n;o++)this.markers[o].setMap(null);else t.setMap(null);return!0},i.isMarkerInClusterBounds=function(t){if(null!==this.bounds){var e=t.getPosition();if(e)return this.bounds.contains(e)}return!1},i.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},i.updateIcon=function(){var t=this.markers.length,e=this.markerClusterer.getMaxZoom();null!==e&&this.map.getZoom()>e||t<this.minClusterSize?this.clusterIcon.hide():(this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show())},i.isMarkerAlreadyAdded=function(t){if(this.markers.includes)return this.markers.includes(t);for(var e=0;e<this.markers.length;e++)if(t===this.markers[e])return!0;return!1},t}(),s=function(t,e){for(var i=0,s=t.length.toString(),n=s;0!==n;)n=parseInt(n,10)/10,i++;return{text:s,index:i=Math.min(i,e),title:""}},n=[53,56,66,78,90],r=function(){function t(e,i,r){void 0===i&&(i=[]),void 0===r&&(r={}),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,void 0!==r.zoomOnClick&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,void 0!==r.averageCenter&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,void 0!==r.ignoreHidden&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,void 0!==r.enableRetinaIcons&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",this.imageExtension=r.imageExtension||"png",this.imageSizes=r.imageSizes||n,this.calculator=r.calculator||s,this.batchSize=r.batchSize||2e3,this.batchSizeIE=r.batchSizeIE||500,this.clusterClass=r.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(i,!0),this.setMap(e)}var e=t.prototype;return e.onAdd=function(){var t=this;this.activeMap=this.getMap(),this.ready=!0,this.repaint(),this.listeners=[google.maps.event.addListener(this.getMap(),"zoom_changed",(function(){t.resetViewport(!1),t.getMap().getZoom()!==(t.get("minZoom")||0)&&t.getMap().getZoom()!==t.get("maxZoom")||google.maps.event.trigger(t,"idle")})),google.maps.event.addListener(this.getMap(),"idle",(function(){t.redraw()}))]},e.onRemove=function(){for(var t=0;t<this.markers.length;t++)this.markers[t].getMap()!==this.activeMap&&this.markers[t].setMap(this.activeMap);for(var e=0;e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(var i=0;i<this.listeners.length;i++)google.maps.event.removeListener(this.listeners[i]);this.listeners=[],this.activeMap=null,this.ready=!1},e.draw=function(){},e.setupStyles=function(){if(!(this.styles.length>0))for(var t=0;t<this.imageSizes.length;t++)this.styles.push({url:this.imagePath+(t+1)+"."+this.imageExtension,height:this.imageSizes[t],width:this.imageSizes[t]})},e.fitMapToMarkers=function(){for(var t=this.getMarkers(),e=new google.maps.LatLngBounds,i=0;i<t.length;i++){var s=t[i].getPosition();s&&e.extend(s)}this.getMap().fitBounds(e)},e.getGridSize=function(){return this.gridSize},e.setGridSize=function(t){this.gridSize=t},e.getMinimumClusterSize=function(){return this.minClusterSize},e.setMinimumClusterSize=function(t){this.minClusterSize=t},e.getMaxZoom=function(){return this.maxZoom},e.setMaxZoom=function(t){this.maxZoom=t},e.getStyles=function(){return this.styles},e.setStyles=function(t){this.styles=t},e.getTitle=function(){return this.title},e.setTitle=function(t){this.title=t},e.getZoomOnClick=function(){return this.zoomOnClick},e.setZoomOnClick=function(t){this.zoomOnClick=t},e.getAverageCenter=function(){return this.averageCenter},e.setAverageCenter=function(t){this.averageCenter=t},e.getIgnoreHidden=function(){return this.ignoreHidden},e.setIgnoreHidden=function(t){this.ignoreHidden=t},e.getEnableRetinaIcons=function(){return this.enableRetinaIcons},e.setEnableRetinaIcons=function(t){this.enableRetinaIcons=t},e.getImageExtension=function(){return this.imageExtension},e.setImageExtension=function(t){this.imageExtension=t},e.getImagePath=function(){return this.imagePath},e.setImagePath=function(t){this.imagePath=t},e.getImageSizes=function(){return this.imageSizes},e.setImageSizes=function(t){this.imageSizes=t},e.getCalculator=function(){return this.calculator},e.setCalculator=function(t){this.calculator=t},e.getBatchSizeIE=function(){return this.batchSizeIE},e.setBatchSizeIE=function(t){this.batchSizeIE=t},e.getClusterClass=function(){return this.clusterClass},e.setClusterClass=function(t){this.clusterClass=t},e.getMarkers=function(){return this.markers},e.getTotalMarkers=function(){return this.markers.length},e.getClusters=function(){return this.clusters},e.getTotalClusters=function(){return this.clusters.length},e.addMarker=function(t,e){this.pushMarkerTo(t),e||this.redraw()},e.addMarkers=function(t,e){for(var i in t)t.hasOwnProperty(i)&&this.pushMarkerTo(t[i]);e||this.redraw()},e.pushMarkerTo=function(t){var e=this;t.getDraggable()&&google.maps.event.addListener(t,"dragend",(function(){e.ready&&(t.isAdded=!1,e.repaint())})),t.isAdded=!1,this.markers.push(t)},e.removeMarker_=function(t){var e=-1;if(this.markers.indexOf)e=this.markers.indexOf(t);else for(var i=0;i<this.markers.length;i++)if(t===this.markers[i]){e=i;break}return-1!==e&&(t.setMap(null),this.markers.splice(e,1),!0)},e.removeMarker=function(t,e){var i=this.removeMarker_(t);return!e&&i&&this.repaint(),i},e.removeMarkers=function(t,e){for(var i=!1,s=0;s<t.length;s++)i=i||this.removeMarker_(t[s]);return!e&&i&&this.repaint(),i},e.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},e.repaint=function(){var t=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout((function(){for(var e=0;e<t.length;e++)t[e].remove()}),0)},e.getExtendedBounds=function(t){var e=this.getProjection(),i=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()));i.x+=this.gridSize,i.y-=this.gridSize;var s=e.fromLatLngToDivPixel(new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()));return s.x-=this.gridSize,s.y+=this.gridSize,t.extend(e.fromDivPixelToLatLng(i)),t.extend(e.fromDivPixelToLatLng(s)),t},e.redraw=function(){this.createClusters(0)},e.resetViewport=function(t){for(var e=0;e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(var i=0;i<this.markers.length;i++){var s=this.markers[i];s.isAdded=!1,t&&s.setMap(null)}},e.distanceBetweenPoints=function(t,e){var i=(e.lat()-t.lat())*Math.PI/180,s=(e.lng()-t.lng())*Math.PI/180,n=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2);return 2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n))*6371},e.isMarkerInBounds=function(t,e){var i=t.getPosition();return!!i&&e.contains(i)},e.addToClosestCluster=function(t){for(var e,s=4e4,n=null,r=0;r<this.clusters.length;r++){var o=(e=this.clusters[r]).getCenter(),a=t.getPosition();if(o&&a){var h=this.distanceBetweenPoints(o,a);h<s&&(s=h,n=e)}}n&&n.isMarkerInClusterBounds(t)?n.addMarker(t):((e=new i(this)).addMarker(t),this.clusters.push(e))},e.createClusters=function(t){var e=this;if(this.ready){0===t&&(google.maps.event.trigger(this,"clusteringbegin",this),null!==this.timerRefStatic&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var i=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),s=this.getExtendedBounds(i),n=Math.min(t+this.batchSize,this.markers.length),r=t;r<n;r++){var o=this.markers[r];!o.isAdded&&this.isMarkerInBounds(o,s)&&(!this.ignoreHidden||this.ignoreHidden&&o.getVisible())&&this.addToClosestCluster(o)}if(n<this.markers.length)this.timerRefStatic=window.setTimeout((function(){e.createClusters(n)}),0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var a=0;a<this.clusters.length;a++)this.clusters[a].updateIcon()}}},e.extend=function(t,e){return function(t){for(var e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},t}();t.Cluster=i,t.ClusterIcon=e,t.Clusterer=r}));
//# sourceMappingURL=markerclusterer.umd.production.min.js.map
{
"name": "@react-google-maps/marker-clusterer",
"sideEffects": false,
"version": "2.0.0-alpha",
"version": "2.0.0",
"description": "Marker Clusterer for React.js Google Maps API",

@@ -52,51 +52,41 @@ "license": "MIT",

"devDependencies": {
"@getify/eslint-plugin-proper-arrows": "9.1.1",
"@types/babel-types": "7.0.7",
"@types/googlemaps": "3.39.6",
"@getify/eslint-plugin-proper-arrows": "10.0.0",
"@types/babel-types": "7.0.9",
"@types/googlemaps": "3.40.1",
"@types/react-dom": "16.9.8",
"@typescript-eslint/eslint-plugin": "3.0.2",
"@typescript-eslint/parser": "3.0.2",
"@typescript-eslint/eslint-plugin": "4.5.0",
"@typescript-eslint/parser": "4.5.0",
"awesome-typescript-loader": "5.2.1",
"eslint": "7.2.0",
"eslint-config-prettier": "6.11.0",
"eslint-config-standard": "14.1.1",
"eslint": "7.12.0",
"eslint-config-standard": "15.0.0",
"eslint-config-standard-react": "9.2.0",
"eslint-import-resolver-typescript": "2.0.0",
"eslint-import-resolver-typescript": "2.3.0",
"eslint-plugin-ascii": "1.0.0",
"eslint-plugin-babel": "5.3.0",
"eslint-plugin-chai-expect": "2.1.0",
"eslint-plugin-cypress": "2.11.1",
"eslint-plugin-babel": "5.3.1",
"eslint-plugin-filenames": "1.3.2",
"eslint-plugin-html": "6.0.2",
"eslint-plugin-import": "2.20.2",
"eslint-plugin-jest": "23.13.2",
"eslint-plugin-json": "2.1.1",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-markdown": "1.0.2",
"eslint-plugin-html": "6.1.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-json": "2.1.2",
"eslint-plugin-jsx-a11y": "6.3.1",
"eslint-plugin-no-inferred-method-name": "2.0.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-optimize-regex": "1.2.0",
"eslint-plugin-perf-standard": "1.0.3",
"eslint-plugin-prettier": "3.1.3",
"eslint-plugin-promise": "4.2.1",
"eslint-plugin-react": "7.20.0",
"eslint-plugin-react": "7.21.5",
"eslint-plugin-react-functional-set-state": "1.2.1",
"eslint-plugin-react-hooks": "4.0.4",
"eslint-plugin-react-perf": "3.2.3",
"eslint-plugin-security-node": "1.0.12",
"eslint-plugin-standard": "4.0.1",
"eslint-plugin-tree-shaking": "1.8.0",
"eslint-plugin-xss": "0.1.10",
"eslint-plugin-react-hooks": "4.2.0",
"eslint-plugin-react-perf": "3.2.4",
"eslint-plugin-standard": "4.0.2",
"eslint-plugin-you-dont-need-lodash-underscore": "6.10.0",
"jest": "26.0.1",
"jest-cli": "26.0.1",
"react": "16.13.1",
"react-dom": "16.13.1",
"jest": "26.6.1",
"jest-cli": "26.6.1",
"react": "17.0.1",
"react-dom": "17.0.1",
"rimraf": "3.0.2",
"ts-jest": "26.0.0",
"tsdx": "0.13.2",
"typescript": "3.9.3",
"webpack": "4.43.0"
"ts-jest": "26.4.2",
"tsdx": "0.14.1",
"typescript": "4.1.0-beta",
"webpack": "5.2.0"
},
"gitHead": "80167ddcc3d8e356dbf0b0c3a6292c6a3a989f83"
}

@@ -0,1 +1,2 @@

/* eslint-disable filenames/match-exported */
/**

@@ -2,0 +3,0 @@ * @name MarkerClusterer for Google Maps V3

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc