@react-google-maps/marker-clusterer 2.20.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/umd.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"umd.js","sources":["../src/ClusterIcon.tsx","../src/Cluster.tsx","../src/Clusterer.tsx"],"sourcesContent":["/* global google */\n/* eslint-disable filenames/match-regex */\nimport type { Cluster } from './Cluster'\n\nimport type { ClusterIconStyle, ClusterIconInfo } from './types'\n\nexport class ClusterIcon {\n cluster: Cluster\n className: string\n clusterClassName: string\n styles: ClusterIconStyle[]\n center: google.maps.LatLng | undefined\n div: HTMLDivElement | null\n sums: ClusterIconInfo | null\n visible: boolean\n url: string\n height: number\n width: number\n anchorText: [number, number]\n anchorIcon: [number, number]\n textColor: string\n textSize: number\n textDecoration: string\n fontWeight: string\n fontStyle: string\n fontFamily: string\n backgroundPosition: string\n cMouseDownInCluster: boolean | null\n cDraggingMapByCluster: boolean | null\n timeOut: number | null\n\n boundsChangedListener: google.maps.MapsEventListener | null\n\n constructor(cluster: Cluster, styles: ClusterIconStyle[]) {\n cluster.getClusterer().extend(ClusterIcon, google.maps.OverlayView)\n\n this.cluster = cluster\n\n this.clusterClassName = this.cluster.getClusterer().getClusterClass()\n\n this.className = this.clusterClassName\n\n this.styles = styles\n\n this.center = undefined\n\n this.div = null\n\n this.sums = null\n\n this.visible = false\n\n this.boundsChangedListener = null\n\n this.url = ''\n\n this.height = 0\n this.width = 0\n\n this.anchorText = [0, 0]\n this.anchorIcon = [0, 0]\n\n this.textColor = 'black'\n this.textSize = 11\n this.textDecoration = 'none'\n this.fontWeight = 'bold'\n this.fontStyle = 'normal'\n this.fontFamily = 'Arial,sans-serif'\n\n this.backgroundPosition = '0 0'\n\n this.cMouseDownInCluster = null\n this.cDraggingMapByCluster = null\n this.timeOut = null;\n\n (this as unknown as google.maps.OverlayView).setMap(cluster.getMap()) // Note: this causes onAdd to be called\n\n this.onBoundsChanged = this.onBoundsChanged.bind(this)\n this.onMouseDown = this.onMouseDown.bind(this)\n this.onClick = this.onClick.bind(this)\n this.onMouseOver = this.onMouseOver.bind(this)\n this.onMouseOut = this.onMouseOut.bind(this)\n this.onAdd = this.onAdd.bind(this)\n this.onRemove = this.onRemove.bind(this)\n this.draw = this.draw.bind(this)\n this.hide = this.hide.bind(this)\n this.show = this.show.bind(this)\n this.useStyle = this.useStyle.bind(this)\n this.setCenter = this.setCenter.bind(this)\n this.getPosFromLatLng = this.getPosFromLatLng.bind(this)\n }\n\n onBoundsChanged() {\n this.cDraggingMapByCluster = this.cMouseDownInCluster\n }\n\n onMouseDown() {\n this.cMouseDownInCluster = true\n\n this.cDraggingMapByCluster = false\n }\n\n onClick(event: Event) {\n this.cMouseDownInCluster = false\n\n if (!this.cDraggingMapByCluster) {\n const markerClusterer = this.cluster.getClusterer()\n\n /**\n * This event is fired when a cluster marker is clicked.\n * @name MarkerClusterer#click\n * @param {Cluster} c The cluster that was clicked.\n * @event\n */\n google.maps.event.trigger(markerClusterer, 'click', this.cluster)\n google.maps.event.trigger(markerClusterer, 'clusterclick', this.cluster) // deprecated name\n\n // The default click handler follows. Disable it by setting\n // the zoomOnClick property to false.\n if (markerClusterer.getZoomOnClick()) {\n // Zoom into the cluster.\n const maxZoom = markerClusterer.getMaxZoom()\n\n const bounds = this.cluster.getBounds()\n\n const map = (markerClusterer as unknown as google.maps.OverlayView).getMap()\n\n if (map !== null && 'fitBounds' in map) {\n map.fitBounds(bounds)\n }\n\n\n // There is a fix for Issue 170 here:\n this.timeOut = window.setTimeout(() => {\n const map = (markerClusterer as unknown as google.maps.OverlayView).getMap()\n\n if (map !== null) {\n if ('fitBounds' in map) {\n map.fitBounds(bounds)\n }\n\n const zoom = map.getZoom() || 0\n\n // Don't zoom beyond the max zoom level\n if (\n maxZoom !== null &&\n zoom > maxZoom\n ) {\n map.setZoom(maxZoom + 1)\n }\n }\n }, 100)\n }\n\n // Prevent event propagation to the map:\n event.cancelBubble = true\n\n if (event.stopPropagation) {\n event.stopPropagation()\n }\n }\n }\n\n onMouseOver() {\n /**\n * This event is fired when the mouse moves over a cluster marker.\n * @name MarkerClusterer#mouseover\n * @param {Cluster} c The cluster that the mouse moved over.\n * @event\n */\n google.maps.event.trigger(\n this.cluster.getClusterer(),\n 'mouseover',\n this.cluster\n )\n }\n\n onMouseOut() {\n /**\n * This event is fired when the mouse moves out of a cluster marker.\n * @name MarkerClusterer#mouseout\n * @param {Cluster} c The cluster that the mouse moved out of.\n * @event\n */\n google.maps.event.trigger(\n this.cluster.getClusterer(),\n 'mouseout',\n this.cluster\n )\n }\n\n onAdd() {\n this.div = document.createElement('div')\n\n this.div.className = this.className\n\n if (this.visible) {\n this.show()\n }\n\n ;(this as unknown as google.maps.OverlayView).getPanes()?.overlayMouseTarget.appendChild(this.div)\n\n const map = (this as unknown as google.maps.OverlayView).getMap()\n\n if (map !== null) {\n // Fix for Issue 157\n this.boundsChangedListener = google.maps.event.addListener(\n map,\n 'bounds_changed',\n this.onBoundsChanged\n )\n\n this.div.addEventListener('mousedown', this.onMouseDown)\n\n this.div.addEventListener('click', this.onClick)\n\n this.div.addEventListener('mouseover', this.onMouseOver)\n\n this.div.addEventListener('mouseout', this.onMouseOut)\n }\n }\n\n onRemove() {\n if (this.div && this.div.parentNode) {\n this.hide()\n\n if (this.boundsChangedListener !== null) {\n google.maps.event.removeListener(this.boundsChangedListener)\n }\n\n this.div.removeEventListener('mousedown', this.onMouseDown)\n\n this.div.removeEventListener('click', this.onClick)\n\n this.div.removeEventListener('mouseover', this.onMouseOver)\n\n this.div.removeEventListener('mouseout', this.onMouseOut)\n\n this.div.parentNode.removeChild(this.div)\n\n if (this.timeOut !== null) {\n window.clearTimeout(this.timeOut)\n\n this.timeOut = null\n }\n\n this.div = null\n }\n }\n\n draw() {\n if (this.visible && this.div !== null && this.center) {\n const pos = this.getPosFromLatLng(this.center)\n\n this.div.style.top = pos !== null ? `${pos.y}px` : '0'\n this.div.style.left = pos !== null ? `${pos.x}px` : '0'\n }\n }\n\n hide() {\n if (this.div) {\n this.div.style.display = 'none'\n }\n\n this.visible = false\n }\n\n show() {\n if (this.div && this.center) {\n const divTitle = this.sums === null ||\n typeof this.sums.title === 'undefined' ||\n this.sums.title === '' ? this.cluster.getClusterer().getTitle() : this.sums.title\n\n // NOTE: values must be specified in px units\n const bp = this.backgroundPosition.split(' ')\n\n const spriteH = parseInt(bp[0]?.replace(/^\\s+|\\s+$/g, '') || '0', 10)\n const spriteV = parseInt(bp[1]?.replace(/^\\s+|\\s+$/g, '') || '0', 10)\n\n const pos = this.getPosFromLatLng(this.center)\n\n this.div.className = this.className\n this.div .setAttribute('style', `cursor: pointer; position: absolute; top: ${pos !== null ? `${pos.y}px` : '0'}; left: ${pos !== null ? `${pos.x}px` : '0'}; width: ${this.width}px; height: ${this.height}px; `)\n\n const img = document.createElement('img')\n\n img.alt = divTitle\n img.src = this.url\n img.width = this.width\n img.height = this.height\n img.setAttribute('style', `position: absolute; top: ${spriteV}px; left: ${spriteH}px`)\n\n if (!this.cluster.getClusterer().enableRetinaIcons) {\n img.style.clip = `rect(-${spriteV}px, -${spriteH + this.width}px, -${\n spriteV + this.height\n }, -${spriteH})`\n }\n\n const textElm = document.createElement('div')\n\n textElm .setAttribute('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}; fontStyle: ${this.fontStyle}; text-decoration: ${this.textDecoration}; text-align: center; width: ${this.width}px; line-height: ${this.height}px`)\n\n if (this.sums?.text) textElm.innerText = `${this.sums?.text}`\n if (this.sums?.html) textElm.innerHTML = `${this.sums?.html}`\n\n this.div.innerHTML = ''\n\n this.div.appendChild(img)\n this.div.appendChild(textElm)\n\n this.div.title = divTitle\n\n this.div.style.display = ''\n }\n\n this.visible = true\n }\n\n useStyle(sums: ClusterIconInfo) {\n this.sums = sums\n\n const styles = this.cluster.getClusterer().getStyles()\n\n const style =\n styles[Math.min(styles.length - 1, Math.max(0, sums.index - 1))]\n\n if (style) {\n this.url = style.url\n this.height = style.height\n this.width = style.width\n\n if (style.className) {\n this.className = `${this.clusterClassName} ${style.className}`\n }\n\n this.anchorText = style.anchorText || [0, 0]\n this.anchorIcon = style.anchorIcon || [this.height / 2, this.width / 2]\n\n this.textColor = style.textColor || 'black'\n\n this.textSize = style.textSize || 11\n\n this.textDecoration = style.textDecoration || 'none'\n\n this.fontWeight = style.fontWeight || 'bold'\n\n this.fontStyle = style.fontStyle || 'normal'\n\n this.fontFamily = style.fontFamily || 'Arial,sans-serif'\n\n this.backgroundPosition = style.backgroundPosition || '0 0'\n }\n }\n\n setCenter(center: google.maps.LatLng) {\n this.center = center\n }\n\n getPosFromLatLng(latlng: google.maps.LatLng): google.maps.Point | null {\n const pos = (this as unknown as google.maps.OverlayView).getProjection().fromLatLngToDivPixel(latlng)\n\n if (pos !== null) {\n pos.x -= this.anchorIcon[1]\n\n pos.y -= this.anchorIcon[0]\n }\n\n return pos\n }\n}\n","/* global google */\n\nimport type { Clusterer } from './Clusterer'\n\nimport { ClusterIcon } from './ClusterIcon'\n\nimport type { MarkerExtended } from './types'\n\nexport class Cluster {\n markerClusterer: Clusterer\n map: google.maps.Map | google.maps.StreetViewPanorama | null\n gridSize: number\n minClusterSize: number\n averageCenter: boolean\n markers: MarkerExtended[]\n center: google.maps.LatLng | undefined\n bounds: google.maps.LatLngBounds | null\n clusterIcon: ClusterIcon\n\n constructor(markerClusterer: Clusterer) {\n this.markerClusterer = markerClusterer\n\n this.map = (this.markerClusterer as unknown as google.maps.OverlayView).getMap()\n\n this.gridSize = this.markerClusterer.getGridSize()\n\n this.minClusterSize = this.markerClusterer.getMinimumClusterSize()\n\n this.averageCenter = this.markerClusterer.getAverageCenter()\n\n this.markers = []\n\n this.center = undefined\n\n this.bounds = null\n\n this.clusterIcon = new ClusterIcon(this, this.markerClusterer.getStyles())\n\n this.getSize = this.getSize.bind(this)\n this.getMarkers = this.getMarkers.bind(this)\n this.getCenter = this.getCenter.bind(this)\n this.getMap = this.getMap.bind(this)\n this.getClusterer = this.getClusterer.bind(this)\n this.getBounds = this.getBounds.bind(this)\n this.remove = this.remove.bind(this)\n this.addMarker = this.addMarker.bind(this)\n this.isMarkerInClusterBounds = this.isMarkerInClusterBounds.bind(this)\n this.calculateBounds = this.calculateBounds.bind(this)\n this.updateIcon = this.updateIcon.bind(this)\n this.isMarkerAlreadyAdded = this.isMarkerAlreadyAdded.bind(this)\n }\n\n getSize(): number {\n return this.markers.length\n }\n\n getMarkers(): MarkerExtended[] {\n return this.markers\n }\n\n getCenter(): google.maps.LatLng | undefined {\n return this.center\n }\n\n getMap(): google.maps.Map | google.maps.StreetViewPanorama | null {\n return this.map\n }\n\n getClusterer(): Clusterer {\n return this.markerClusterer\n }\n\n getBounds(): google.maps.LatLngBounds {\n const bounds = new google.maps.LatLngBounds(this.center, this.center)\n\n const markers = this.getMarkers()\n\n for (const marker of markers) {\n const position = marker.getPosition()\n\n if (position) {\n bounds.extend(position)\n }\n }\n\n return bounds\n }\n\n remove() {\n (this.clusterIcon as unknown as google.maps.OverlayView).setMap(null)\n\n this.markers = []\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n delete this.markers\n }\n\n addMarker(marker: MarkerExtended): boolean {\n if (this.isMarkerAlreadyAdded(marker)) {\n return false\n }\n\n if (!this.center) {\n const position = marker.getPosition()\n\n if (position) {\n this.center = position\n\n this.calculateBounds()\n }\n } else {\n if (this.averageCenter) {\n const position = marker.getPosition()\n\n if (position) {\n const length = this.markers.length + 1\n\n this.center = new google.maps.LatLng(\n (this.center.lat() * (length - 1) + position.lat()) / length,\n (this.center.lng() * (length - 1) + position.lng()) / length\n )\n\n this.calculateBounds()\n }\n }\n }\n\n marker.isAdded = true\n\n this.markers.push(marker)\n\n const mCount = this.markers.length\n\n const maxZoom = this.markerClusterer.getMaxZoom()\n\n const zoom = this.map?.getZoom()\n\n if (maxZoom !== null && typeof zoom !== 'undefined' && zoom > maxZoom) {\n // Zoomed in past max zoom, so show the marker.\n if (marker.getMap() !== this.map) {\n marker.setMap(this.map)\n }\n } else if (mCount < this.minClusterSize) {\n // Min cluster size not reached so show the marker.\n if (marker.getMap() !== this.map) {\n marker.setMap(this.map)\n }\n } else if (mCount === this.minClusterSize) {\n // Hide the markers that were showing.\n for (const markerElement of this.markers) {\n markerElement.setMap(null)\n }\n } else {\n marker.setMap(null)\n }\n\n return true\n }\n\n isMarkerInClusterBounds(marker: MarkerExtended): boolean {\n if (this.bounds !== null) {\n const position = marker.getPosition()\n\n if (position) {\n return this.bounds.contains(position)\n }\n }\n\n return false\n }\n\n calculateBounds() {\n this.bounds = this.markerClusterer.getExtendedBounds(\n new google.maps.LatLngBounds(this.center, this.center)\n )\n }\n\n updateIcon() {\n const mCount = this.markers.length\n\n const maxZoom = this.markerClusterer.getMaxZoom()\n\n const zoom = this.map?.getZoom()\n\n if (maxZoom !== null && typeof zoom !== 'undefined' && zoom > maxZoom) {\n this.clusterIcon.hide()\n\n return\n }\n\n if (mCount < this.minClusterSize) {\n // Min cluster size not yet reached.\n this.clusterIcon.hide()\n\n return\n }\n\n if (this.center) {\n this.clusterIcon.setCenter(this.center)\n }\n\n this.clusterIcon.useStyle(\n this.markerClusterer.getCalculator()(this.markers, this.markerClusterer.getStyles().length)\n )\n\n this.clusterIcon.show()\n }\n\n isMarkerAlreadyAdded(marker: MarkerExtended): boolean {\n if (this.markers.includes) {\n return this.markers.includes(marker)\n }\n\n for (let i = 0; i < this.markers.length; i++) {\n if (marker === this.markers[i]) {\n return true\n }\n }\n\n return false\n }\n}\n","/* global google */\n/* eslint-disable filenames/match-regex */\nimport { Cluster } from './Cluster'\nimport type { ClusterIcon } from './ClusterIcon'\n\nimport type {\n MarkerExtended,\n ClustererOptions,\n ClusterIconStyle,\n TCalculator,\n ClusterIconInfo,\n} from './types'\n\n/**\n * Supports up to 9007199254740991 (Number.MAX_SAFE_INTEGER) markers\n * which is not a problem as max array length is 4294967296 (2**32)\n */\nfunction CALCULATOR(\n markers: MarkerExtended[],\n numStyles: number\n): ClusterIconInfo {\n const count = markers.length\n\n const numberOfDigits = count.toString().length\n\n const index = Math.min(numberOfDigits, numStyles)\n\n return {\n text: count.toString(),\n index,\n title: '',\n }\n}\n\nconst BATCH_SIZE = 2000\n\nconst BATCH_SIZE_IE = 500\n\nconst IMAGE_PATH =\n 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'\n\nconst IMAGE_EXTENSION = 'png'\n\nconst IMAGE_SIZES = [53, 56, 66, 78, 90]\n\nconst CLUSTERER_CLASS = 'cluster'\n\nexport class Clusterer implements google.maps.OverlayView {\n markers: MarkerExtended[]\n clusters: Cluster[]\n listeners: google.maps.MapsEventListener[]\n activeMap: google.maps.Map | google.maps.StreetViewPanorama | null\n ready: boolean\n gridSize: number\n minClusterSize: number\n maxZoom: number | null\n styles: ClusterIconStyle[]\n title: string\n zoomOnClick: boolean\n averageCenter: boolean\n ignoreHidden: boolean\n enableRetinaIcons: boolean\n imagePath: string\n imageExtension: string\n imageSizes: number[]\n calculator: TCalculator\n batchSize: number\n batchSizeIE: number\n clusterClass: string\n timerRefStatic: number | null\n\n constructor(\n map: google.maps.Map,\n optMarkers: MarkerExtended[] = [],\n optOptions: ClustererOptions = {}\n ) {\n this.getMinimumClusterSize = this.getMinimumClusterSize.bind(this)\n this.setMinimumClusterSize = this.setMinimumClusterSize.bind(this)\n this.getEnableRetinaIcons = this.getEnableRetinaIcons.bind(this)\n this.setEnableRetinaIcons = this.setEnableRetinaIcons.bind(this)\n this.addToClosestCluster = this.addToClosestCluster.bind(this)\n this.getImageExtension = this.getImageExtension.bind(this)\n this.setImageExtension = this.setImageExtension.bind(this)\n this.getExtendedBounds = this.getExtendedBounds.bind(this)\n this.getAverageCenter = this.getAverageCenter.bind(this)\n this.setAverageCenter = this.setAverageCenter.bind(this)\n this.getTotalClusters = this.getTotalClusters.bind(this)\n this.fitMapToMarkers = this.fitMapToMarkers.bind(this)\n this.getIgnoreHidden = this.getIgnoreHidden.bind(this)\n this.setIgnoreHidden = this.setIgnoreHidden.bind(this)\n this.getClusterClass = this.getClusterClass.bind(this)\n this.setClusterClass = this.setClusterClass.bind(this)\n this.getTotalMarkers = this.getTotalMarkers.bind(this)\n this.getZoomOnClick = this.getZoomOnClick.bind(this)\n this.setZoomOnClick = this.setZoomOnClick.bind(this)\n this.getBatchSizeIE = this.getBatchSizeIE.bind(this)\n this.setBatchSizeIE = this.setBatchSizeIE.bind(this)\n this.createClusters = this.createClusters.bind(this)\n this.onZoomChanged = this.onZoomChanged.bind(this)\n this.getImageSizes = this.getImageSizes.bind(this)\n this.setImageSizes = this.setImageSizes.bind(this)\n this.getCalculator = this.getCalculator.bind(this)\n this.setCalculator = this.setCalculator.bind(this)\n this.removeMarkers = this.removeMarkers.bind(this)\n this.resetViewport = this.resetViewport.bind(this)\n this.getImagePath = this.getImagePath.bind(this)\n this.setImagePath = this.setImagePath.bind(this)\n this.pushMarkerTo = this.pushMarkerTo.bind(this)\n this.removeMarker = this.removeMarker.bind(this)\n this.clearMarkers = this.clearMarkers.bind(this)\n this.setupStyles = this.setupStyles.bind(this)\n this.getGridSize = this.getGridSize.bind(this)\n this.setGridSize = this.setGridSize.bind(this)\n this.getClusters = this.getClusters.bind(this)\n this.getMaxZoom = this.getMaxZoom.bind(this)\n this.setMaxZoom = this.setMaxZoom.bind(this)\n this.getMarkers = this.getMarkers.bind(this)\n this.addMarkers = this.addMarkers.bind(this)\n this.getStyles = this.getStyles.bind(this)\n this.setStyles = this.setStyles.bind(this)\n this.addMarker = this.addMarker.bind(this)\n this.onRemove = this.onRemove.bind(this)\n this.getTitle = this.getTitle.bind(this)\n this.setTitle = this.setTitle.bind(this)\n this.repaint = this.repaint.bind(this)\n this.onIdle = this.onIdle.bind(this)\n this.redraw = this.redraw.bind(this)\n this.onAdd = this.onAdd.bind(this)\n this.draw = this.draw.bind(this)\n\n this.extend = this.extend.bind(this)\n this.extend(Clusterer, google.maps.OverlayView)\n\n this.markers = []\n this.clusters = []\n this.listeners = []\n this.activeMap = null\n this.ready = false\n this.gridSize = optOptions.gridSize || 60\n this.minClusterSize = optOptions.minimumClusterSize || 2\n this.maxZoom = optOptions.maxZoom || null\n this.styles = optOptions.styles || []\n\n this.title = optOptions.title || ''\n\n this.zoomOnClick = true\n\n if (optOptions.zoomOnClick !== undefined) {\n this.zoomOnClick = optOptions.zoomOnClick\n }\n\n this.averageCenter = false\n\n if (optOptions.averageCenter !== undefined) {\n this.averageCenter = optOptions.averageCenter\n }\n\n this.ignoreHidden = false\n\n if (optOptions.ignoreHidden !== undefined) {\n this.ignoreHidden = optOptions.ignoreHidden\n }\n\n this.enableRetinaIcons = false\n\n if (optOptions.enableRetinaIcons !== undefined) {\n this.enableRetinaIcons = optOptions.enableRetinaIcons\n }\n this.imagePath = optOptions.imagePath || IMAGE_PATH\n\n this.imageExtension = optOptions.imageExtension || IMAGE_EXTENSION\n\n this.imageSizes = optOptions.imageSizes || IMAGE_SIZES\n\n this.calculator = optOptions.calculator || CALCULATOR\n\n this.batchSize = optOptions.batchSize || BATCH_SIZE\n\n this.batchSizeIE = optOptions.batchSizeIE || BATCH_SIZE_IE\n\n this.clusterClass = optOptions.clusterClass || CLUSTERER_CLASS\n\n if (navigator.userAgent.toLowerCase().indexOf('msie') !== -1) {\n // Try to avoid IE timeout when processing a huge number of markers:\n this.batchSize = this.batchSizeIE\n }\n\n this.timerRefStatic = null\n\n this.setupStyles()\n\n this.addMarkers(optMarkers, true);\n\n (this as unknown as google.maps.OverlayView).setMap(map) // Note: this causes onAdd to be called\n }\n\n onZoomChanged(): void {\n this.resetViewport(false)\n\n // Workaround for this Google bug: when map is at level 0 and \"-\" of\n // zoom slider is clicked, a \"zoom_changed\" event is fired even though\n // the map doesn't zoom out any further. In this situation, no \"idle\"\n // event is triggered so the cluster markers that have been removed\n // do not get redrawn. Same goes for a zoom in at maxZoom.\n if (\n (this as unknown as google.maps.OverlayView).getMap()?.getZoom() === ((this as unknown as google.maps.OverlayView).get('minZoom') || 0) ||\n (this as unknown as google.maps.OverlayView).getMap()?.getZoom() === (this as unknown as google.maps.OverlayView).get('maxZoom')\n ) {\n google.maps.event.trigger(this, 'idle')\n }\n }\n\n onIdle(): void {\n this.redraw()\n }\n\n onAdd(): void {\n const map = (this as unknown as google.maps.OverlayView).getMap()\n\n this.activeMap = map\n\n this.ready = true\n\n this.repaint()\n\n if (map !== null) {\n // Add the map event listeners\n this.listeners = [\n google.maps.event.addListener(\n map,\n 'zoom_changed',\n this.onZoomChanged\n ),\n google.maps.event.addListener(\n map,\n 'idle',\n this.onIdle\n ),\n ]\n }\n }\n\n onRemove(): void {\n // Put all the managed markers back on the map:\n for (const marker of this.markers) {\n if (marker.getMap() !== this.activeMap) {\n marker.setMap(this.activeMap)\n }\n }\n\n // Remove all clusters:\n for (const cluster of this.clusters) {\n cluster.remove()\n }\n\n this.clusters = []\n\n // Remove map event listeners:\n for (const listener of this.listeners) {\n google.maps.event.removeListener(listener)\n }\n\n this.listeners = []\n\n this.activeMap = null\n\n this.ready = false\n }\n\n draw(): void { return }\n\n getMap(): null { return null }\n\n getPanes(): null { return null }\n\n getProjection() {\n return {\n fromContainerPixelToLatLng(): null { return null },\n fromDivPixelToLatLng(): null { return null},\n fromLatLngToContainerPixel(): null { return null},\n fromLatLngToDivPixel(): null { return null},\n getVisibleRegion(): null { return null },\n getWorldWidth(): number { return 0 }\n }\n }\n\n setMap(): void { return }\n\n addListener() {\n return {\n remove() { return }\n }\n }\n\n bindTo(): void { return }\n\n get(): void { return }\n\n notify(): void { return }\n\n set(): void { return }\n setValues(): void { return }\n unbind(): void { return }\n unbindAll(): void { return }\n\n setupStyles(): void {\n if (this.styles.length > 0) {\n return\n }\n\n for (let i = 0; i < this.imageSizes.length; i++) {\n this.styles.push({\n url: `${this.imagePath + (i + 1)}.${this.imageExtension}`,\n height: this.imageSizes[i] || 0,\n width: this.imageSizes[i] || 0,\n })\n }\n }\n\n fitMapToMarkers(): void {\n const markers = this.getMarkers()\n\n const bounds = new google.maps.LatLngBounds()\n\n for (const marker of markers) {\n const position = marker.getPosition()\n\n if (position) {\n bounds.extend(position)\n }\n }\n\n const map = (this as unknown as google.maps.OverlayView).getMap()\n\n if (map !== null && 'fitBounds' in map) {\n map.fitBounds(bounds)\n }\n\n }\n\n getGridSize(): number {\n return this.gridSize\n }\n\n setGridSize(gridSize: number) {\n this.gridSize = gridSize\n }\n\n getMinimumClusterSize(): number {\n return this.minClusterSize\n }\n\n setMinimumClusterSize(minimumClusterSize: number) {\n this.minClusterSize = minimumClusterSize\n }\n\n getMaxZoom(): number | null {\n return this.maxZoom\n }\n\n setMaxZoom(maxZoom: number) {\n this.maxZoom = maxZoom\n }\n\n getStyles(): ClusterIconStyle[] {\n return this.styles\n }\n\n setStyles(styles: ClusterIconStyle[]) {\n this.styles = styles\n }\n\n getTitle(): string {\n return this.title\n }\n\n setTitle(title: string) {\n this.title = title\n }\n\n getZoomOnClick(): boolean {\n return this.zoomOnClick\n }\n\n setZoomOnClick(zoomOnClick: boolean) {\n this.zoomOnClick = zoomOnClick\n }\n\n getAverageCenter(): boolean {\n return this.averageCenter\n }\n\n setAverageCenter(averageCenter: boolean) {\n this.averageCenter = averageCenter\n }\n\n getIgnoreHidden(): boolean {\n return this.ignoreHidden\n }\n\n setIgnoreHidden(ignoreHidden: boolean) {\n this.ignoreHidden = ignoreHidden\n }\n\n getEnableRetinaIcons(): boolean {\n return this.enableRetinaIcons\n }\n\n setEnableRetinaIcons(enableRetinaIcons: boolean) {\n this.enableRetinaIcons = enableRetinaIcons\n }\n\n getImageExtension(): string {\n return this.imageExtension\n }\n\n setImageExtension(imageExtension: string) {\n this.imageExtension = imageExtension\n }\n\n getImagePath(): string {\n return this.imagePath\n }\n\n setImagePath(imagePath: string) {\n this.imagePath = imagePath\n }\n\n getImageSizes(): number[] {\n return this.imageSizes\n }\n\n setImageSizes(imageSizes: number[]) {\n this.imageSizes = imageSizes\n }\n\n getCalculator(): TCalculator {\n return this.calculator\n }\n\n setCalculator(calculator: TCalculator) {\n this.calculator = calculator\n }\n\n getBatchSizeIE(): number {\n return this.batchSizeIE\n }\n\n setBatchSizeIE(batchSizeIE: number) {\n this.batchSizeIE = batchSizeIE\n }\n\n getClusterClass(): string {\n return this.clusterClass\n }\n\n setClusterClass(clusterClass: string) {\n this.clusterClass = clusterClass\n }\n\n getMarkers(): MarkerExtended[] {\n return this.markers\n }\n\n getTotalMarkers(): number {\n return this.markers.length\n }\n\n getClusters(): Cluster[] {\n return this.clusters\n }\n\n getTotalClusters(): number {\n return this.clusters.length\n }\n\n addMarker(marker: MarkerExtended, optNoDraw: boolean) {\n this.pushMarkerTo(marker)\n\n if (!optNoDraw) {\n this.redraw()\n }\n }\n\n addMarkers(markers: MarkerExtended[], optNoDraw: boolean) {\n for (const key in markers) {\n if (Object.prototype.hasOwnProperty.call(markers, key)) {\n const marker = markers[key]\n\n if (marker) {\n this.pushMarkerTo(marker)\n }\n }\n }\n\n if (!optNoDraw) {\n this.redraw()\n }\n }\n\n pushMarkerTo(marker: MarkerExtended) {\n // If the marker is draggable add a listener so we can update the clusters on the dragend:\n if (marker.getDraggable()) {\n google.maps.event.addListener(marker, 'dragend', () => {\n if (this.ready) {\n marker.isAdded = false\n\n this.repaint()\n }\n })\n }\n\n marker.isAdded = false\n\n this.markers.push(marker)\n }\n\n removeMarker_(marker: MarkerExtended): boolean {\n let index = -1\n\n if (this.markers.indexOf) {\n index = this.markers.indexOf(marker)\n } else {\n for (let i = 0; i < this.markers.length; i++) {\n if (marker === this.markers[i]) {\n index = i\n\n break\n }\n }\n }\n\n if (index === -1) {\n // Marker is not in our list of markers, so do nothing:\n return false\n }\n\n marker.setMap(null)\n\n this.markers.splice(index, 1) // Remove the marker from the list of managed markers\n\n return true\n }\n\n removeMarker(marker: MarkerExtended, optNoDraw: boolean): boolean {\n const removed = this.removeMarker_(marker)\n\n if (!optNoDraw && removed) {\n this.repaint()\n }\n\n return removed\n }\n\n removeMarkers(markers: MarkerExtended[], optNoDraw: boolean): boolean {\n let removed = false\n\n for (const marker of markers) {\n removed = removed || this.removeMarker_(marker)\n }\n\n if (!optNoDraw && removed) {\n this.repaint()\n }\n\n return removed\n }\n\n clearMarkers() {\n this.resetViewport(true)\n\n this.markers = []\n }\n\n repaint() {\n const oldClusters = this.clusters.slice()\n\n this.clusters = []\n\n this.resetViewport(false)\n\n this.redraw()\n\n // Remove the old clusters.\n // Do it in a timeout to prevent blinking effect.\n setTimeout(function timeout() {\n for (const oldCluster of oldClusters) {\n oldCluster.remove()\n }\n }, 0)\n }\n\n getExtendedBounds(bounds: google.maps.LatLngBounds): google.maps.LatLngBounds {\n const projection = (this as unknown as google.maps.OverlayView).getProjection()\n\n // Convert the points to pixels and the extend out by the grid size.\n const trPix = projection.fromLatLngToDivPixel(\n // Turn the bounds into latlng.\n new google.maps.LatLng(bounds.getNorthEast().lat(), bounds.getNorthEast().lng())\n )\n\n if (trPix !== null) {\n trPix.x += this.gridSize\n trPix.y -= this.gridSize\n }\n\n const blPix = projection.fromLatLngToDivPixel(\n // Turn the bounds into latlng.\n new google.maps.LatLng(bounds.getSouthWest().lat(), bounds.getSouthWest().lng())\n )\n\n if (blPix !== null) {\n blPix.x -= this.gridSize\n blPix.y += this.gridSize\n }\n\n\n // Extend the bounds to contain the new bounds.\n if (trPix !== null) {\n // Convert the pixel points back to LatLng nw\n const point1 = projection.fromDivPixelToLatLng(trPix)\n\n if (point1 !== null) {\n bounds.extend(point1)\n }\n }\n\n if (blPix !== null) {\n // Convert the pixel points back to LatLng sw\n const point2 = projection.fromDivPixelToLatLng(blPix)\n\n if (point2 !== null) {\n bounds.extend(\n point2\n )\n }\n }\n\n\n return bounds\n }\n\n redraw() {\n // Redraws all the clusters.\n this.createClusters(0)\n }\n\n resetViewport(optHide: boolean) {\n // Remove all the clusters\n for (const cluster of this.clusters) {\n cluster.remove()\n }\n\n this.clusters = []\n\n // Reset the markers to not be added and to be removed from the map.\n for (const marker of this.markers) {\n marker.isAdded = false\n\n if (optHide) {\n marker.setMap(null)\n }\n }\n }\n\n distanceBetweenPoints(p1: google.maps.LatLng, p2: google.maps.LatLng): number {\n const R = 6371 // Radius of the Earth in km\n\n const dLat = ((p2.lat() - p1.lat()) * Math.PI) / 180\n const dLon = ((p2.lng() - p1.lng()) * Math.PI) / 180\n\n const a =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos((p1.lat() * Math.PI) / 180) *\n Math.cos((p2.lat() * Math.PI) / 180) *\n Math.sin(dLon / 2) *\n Math.sin(dLon / 2)\n\n return R * (2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)))\n }\n\n isMarkerInBounds(marker: MarkerExtended, bounds: google.maps.LatLngBounds): boolean {\n const position = marker.getPosition()\n\n if (position) {\n return bounds.contains(position)\n }\n\n return false\n }\n\n addToClosestCluster(marker: MarkerExtended) {\n let cluster\n\n let distance = 40000 // Some large number\n\n let clusterToAddTo = null\n\n for (const clusterElement of this.clusters) {\n cluster = clusterElement\n\n const center = cluster.getCenter()\n\n const position = marker.getPosition()\n\n if (center && position) {\n const d = this.distanceBetweenPoints(center, position)\n\n if (d < distance) {\n distance = d\n\n clusterToAddTo = cluster\n }\n }\n }\n\n if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\n clusterToAddTo.addMarker(marker)\n } else {\n cluster = new Cluster(this)\n\n cluster.addMarker(marker)\n\n this.clusters.push(cluster)\n }\n }\n\n createClusters(iFirst: number) {\n if (!this.ready) {\n return\n }\n\n // Cancel previous batch processing if we're working on the first batch:\n if (iFirst === 0) {\n /**\n * This event is fired when the <code>Clusterer</code> begins\n * clustering markers.\n * @name Clusterer#clusteringbegin\n * @param {Clusterer} mc The Clusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringbegin', this)\n\n if (this.timerRefStatic !== null) {\n window.clearTimeout(this.timerRefStatic)\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n delete this.timerRefStatic\n }\n }\n\n const map = (this as unknown as google.maps.OverlayView).getMap()\n\n const bounds = map !== null && 'getBounds' in map ? map.getBounds() : null\n\n const zoom = map?.getZoom() || 0\n // Get our current map view bounds.\n // Create a new bounds object so we don't affect the map.\n //\n // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug:\n const mapBounds = zoom > 3\n ? new google.maps.LatLngBounds(\n bounds?.getSouthWest(),\n bounds?.getNorthEast()\n )\n : new google.maps.LatLngBounds(\n new google.maps.LatLng(85.02070771743472, -178.48388434375),\n new google.maps.LatLng(-85.08136444384544, 178.00048865625)\n )\n\n const extendedMapBounds = this.getExtendedBounds(mapBounds)\n\n const iLast = Math.min(iFirst + this.batchSize, this.markers.length)\n\n for (let i = iFirst; i < iLast; i++) {\n const marker = this.markers[i]\n\n if (marker && !marker.isAdded && this.isMarkerInBounds(marker, extendedMapBounds) && (!this.ignoreHidden || (this.ignoreHidden && marker.getVisible()))) {\n this.addToClosestCluster(marker)\n }\n }\n\n if (iLast < this.markers.length) {\n this.timerRefStatic = window.setTimeout(\n () => {\n this.createClusters(iLast)\n },\n 0\n )\n } else {\n this.timerRefStatic = null\n\n /**\n * This event is fired when the <code>Clusterer</code> stops\n * clustering markers.\n * @name Clusterer#clusteringend\n * @param {Clusterer} mc The Clusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringend', this)\n\n for (const cluster of this.clusters) {\n cluster.updateIcon()\n }\n }\n }\n\n extend<A extends typeof Clusterer | typeof ClusterIcon>(obj1: A, obj2: typeof google.maps.OverlayView): A {\n return function applyExtend(this: A, object: typeof google.maps.OverlayView): A {\n for (const property in object.prototype) {\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n const prop = property as keyof google.maps.OverlayView & (string & {})\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.prototype[prop] = object.prototype[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Cluster } from './Cluster'\n\nimport type { ClusterIconStyle, ClusterIconInfo } from './types'\n\nexport class ClusterIcon {\n cluster: Cluster\n className: string\n clusterClassName: string\n styles: ClusterIconStyle[]\n center: google.maps.LatLng | undefined\n div: HTMLDivElement | null\n sums: ClusterIconInfo | null\n visible: boolean\n url: string\n height: number\n width: number\n anchorText: [number, number]\n anchorIcon: [number, number]\n textColor: string\n textSize: number\n textDecoration: string\n fontWeight: string\n fontStyle: string\n fontFamily: string\n backgroundPosition: string\n cMouseDownInCluster: boolean | null\n cDraggingMapByCluster: boolean | null\n timeOut: number | null\n\n boundsChangedListener: google.maps.MapsEventListener | null\n\n constructor(cluster: Cluster, styles: ClusterIconStyle[]) {\n cluster.getClusterer().extend(ClusterIcon, google.maps.OverlayView)\n\n this.cluster = cluster\n\n this.clusterClassName = this.cluster.getClusterer().getClusterClass()\n\n this.className = this.clusterClassName\n\n this.styles = styles\n\n this.center = undefined\n\n this.div = null\n\n this.sums = null\n\n this.visible = false\n\n this.boundsChangedListener = null\n\n this.url = ''\n\n this.height = 0\n this.width = 0\n\n this.anchorText = [0, 0]\n this.anchorIcon = [0, 0]\n\n this.textColor = 'black'\n this.textSize = 11\n this.textDecoration = 'none'\n this.fontWeight = 'bold'\n this.fontStyle = 'normal'\n this.fontFamily = 'Arial,sans-serif'\n\n this.backgroundPosition = '0 0'\n\n this.cMouseDownInCluster = null\n this.cDraggingMapByCluster = null\n this.timeOut = null;\n\n (this as unknown as google.maps.OverlayView).setMap(cluster.getMap()) // Note: this causes onAdd to be called\n\n this.onBoundsChanged = this.onBoundsChanged.bind(this)\n this.onMouseDown = this.onMouseDown.bind(this)\n this.onClick = this.onClick.bind(this)\n this.onMouseOver = this.onMouseOver.bind(this)\n this.onMouseOut = this.onMouseOut.bind(this)\n this.onAdd = this.onAdd.bind(this)\n this.onRemove = this.onRemove.bind(this)\n this.draw = this.draw.bind(this)\n this.hide = this.hide.bind(this)\n this.show = this.show.bind(this)\n this.useStyle = this.useStyle.bind(this)\n this.setCenter = this.setCenter.bind(this)\n this.getPosFromLatLng = this.getPosFromLatLng.bind(this)\n }\n\n onBoundsChanged() {\n this.cDraggingMapByCluster = this.cMouseDownInCluster\n }\n\n onMouseDown() {\n this.cMouseDownInCluster = true\n\n this.cDraggingMapByCluster = false\n }\n\n onClick(event: Event) {\n this.cMouseDownInCluster = false\n\n if (!this.cDraggingMapByCluster) {\n const markerClusterer = this.cluster.getClusterer()\n\n /**\n * This event is fired when a cluster marker is clicked.\n * @name MarkerClusterer#click\n * @param {Cluster} c The cluster that was clicked.\n * @event\n */\n google.maps.event.trigger(markerClusterer, 'click', this.cluster)\n google.maps.event.trigger(markerClusterer, 'clusterclick', this.cluster) // deprecated name\n\n // The default click handler follows. Disable it by setting\n // the zoomOnClick property to false.\n if (markerClusterer.getZoomOnClick()) {\n // Zoom into the cluster.\n const maxZoom = markerClusterer.getMaxZoom()\n\n const bounds = this.cluster.getBounds()\n\n const map = (markerClusterer as unknown as google.maps.OverlayView).getMap()\n\n if (map !== null && 'fitBounds' in map) {\n map.fitBounds(bounds)\n }\n\n\n // There is a fix for Issue 170 here:\n this.timeOut = window.setTimeout(() => {\n const map = (markerClusterer as unknown as google.maps.OverlayView).getMap()\n\n if (map !== null) {\n if ('fitBounds' in map) {\n map.fitBounds(bounds)\n }\n\n const zoom = map.getZoom() || 0\n\n // Don't zoom beyond the max zoom level\n if (\n maxZoom !== null &&\n zoom > maxZoom\n ) {\n map.setZoom(maxZoom + 1)\n }\n }\n }, 100)\n }\n\n // Prevent event propagation to the map:\n event.cancelBubble = true\n\n if (event.stopPropagation) {\n event.stopPropagation()\n }\n }\n }\n\n onMouseOver() {\n /**\n * This event is fired when the mouse moves over a cluster marker.\n * @name MarkerClusterer#mouseover\n * @param {Cluster} c The cluster that the mouse moved over.\n * @event\n */\n google.maps.event.trigger(\n this.cluster.getClusterer(),\n 'mouseover',\n this.cluster\n )\n }\n\n onMouseOut() {\n /**\n * This event is fired when the mouse moves out of a cluster marker.\n * @name MarkerClusterer#mouseout\n * @param {Cluster} c The cluster that the mouse moved out of.\n * @event\n */\n google.maps.event.trigger(\n this.cluster.getClusterer(),\n 'mouseout',\n this.cluster\n )\n }\n\n onAdd() {\n this.div = document.createElement('div')\n\n this.div.className = this.className\n\n if (this.visible) {\n this.show()\n }\n\n ;(this as unknown as google.maps.OverlayView).getPanes()?.overlayMouseTarget.appendChild(this.div)\n\n const map = (this as unknown as google.maps.OverlayView).getMap()\n\n if (map !== null) {\n // Fix for Issue 157\n this.boundsChangedListener = google.maps.event.addListener(\n map,\n 'bounds_changed',\n this.onBoundsChanged\n )\n\n this.div.addEventListener('mousedown', this.onMouseDown)\n\n this.div.addEventListener('click', this.onClick)\n\n this.div.addEventListener('mouseover', this.onMouseOver)\n\n this.div.addEventListener('mouseout', this.onMouseOut)\n }\n }\n\n onRemove() {\n if (this.div && this.div.parentNode) {\n this.hide()\n\n if (this.boundsChangedListener !== null) {\n google.maps.event.removeListener(this.boundsChangedListener)\n }\n\n this.div.removeEventListener('mousedown', this.onMouseDown)\n\n this.div.removeEventListener('click', this.onClick)\n\n this.div.removeEventListener('mouseover', this.onMouseOver)\n\n this.div.removeEventListener('mouseout', this.onMouseOut)\n\n this.div.parentNode.removeChild(this.div)\n\n if (this.timeOut !== null) {\n window.clearTimeout(this.timeOut)\n\n this.timeOut = null\n }\n\n this.div = null\n }\n }\n\n draw() {\n if (this.visible && this.div !== null && this.center) {\n const pos = this.getPosFromLatLng(this.center)\n\n this.div.style.top = pos !== null ? `${pos.y}px` : '0'\n this.div.style.left = pos !== null ? `${pos.x}px` : '0'\n }\n }\n\n hide() {\n if (this.div) {\n this.div.style.display = 'none'\n }\n\n this.visible = false\n }\n\n show() {\n if (this.div && this.center) {\n const divTitle = this.sums === null ||\n typeof this.sums.title === 'undefined' ||\n this.sums.title === '' ? this.cluster.getClusterer().getTitle() : this.sums.title\n\n // NOTE: values must be specified in px units\n const bp = this.backgroundPosition.split(' ')\n\n const spriteH = parseInt(bp[0]?.replace(/^\\s+|\\s+$/g, '') || '0', 10)\n const spriteV = parseInt(bp[1]?.replace(/^\\s+|\\s+$/g, '') || '0', 10)\n\n const pos = this.getPosFromLatLng(this.center)\n\n this.div.className = this.className\n this.div .setAttribute('style', `cursor: pointer; position: absolute; top: ${pos !== null ? `${pos.y}px` : '0'}; left: ${pos !== null ? `${pos.x}px` : '0'}; width: ${this.width}px; height: ${this.height}px; `)\n\n const img = document.createElement('img')\n\n img.alt = divTitle\n img.src = this.url\n img.width = this.width\n img.height = this.height\n img.setAttribute('style', `position: absolute; top: ${spriteV}px; left: ${spriteH}px`)\n\n if (!this.cluster.getClusterer().enableRetinaIcons) {\n img.style.clip = `rect(-${spriteV}px, -${spriteH + this.width}px, -${\n spriteV + this.height\n }, -${spriteH})`\n }\n\n const textElm = document.createElement('div')\n\n textElm .setAttribute('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}; fontStyle: ${this.fontStyle}; text-decoration: ${this.textDecoration}; text-align: center; width: ${this.width}px; line-height: ${this.height}px`)\n\n if (this.sums?.text) textElm.innerText = `${this.sums?.text}`\n if (this.sums?.html) textElm.innerHTML = `${this.sums?.html}`\n\n this.div.innerHTML = ''\n\n this.div.appendChild(img)\n this.div.appendChild(textElm)\n\n this.div.title = divTitle\n\n this.div.style.display = ''\n }\n\n this.visible = true\n }\n\n useStyle(sums: ClusterIconInfo) {\n this.sums = sums\n\n const styles = this.cluster.getClusterer().getStyles()\n\n const style =\n styles[Math.min(styles.length - 1, Math.max(0, sums.index - 1))]\n\n if (style) {\n this.url = style.url\n this.height = style.height\n this.width = style.width\n\n if (style.className) {\n this.className = `${this.clusterClassName} ${style.className}`\n }\n\n this.anchorText = style.anchorText || [0, 0]\n this.anchorIcon = style.anchorIcon || [this.height / 2, this.width / 2]\n\n this.textColor = style.textColor || 'black'\n\n this.textSize = style.textSize || 11\n\n this.textDecoration = style.textDecoration || 'none'\n\n this.fontWeight = style.fontWeight || 'bold'\n\n this.fontStyle = style.fontStyle || 'normal'\n\n this.fontFamily = style.fontFamily || 'Arial,sans-serif'\n\n this.backgroundPosition = style.backgroundPosition || '0 0'\n }\n }\n\n setCenter(center: google.maps.LatLng) {\n this.center = center\n }\n\n getPosFromLatLng(latlng: google.maps.LatLng): google.maps.Point | null {\n const pos = (this as unknown as google.maps.OverlayView).getProjection().fromLatLngToDivPixel(latlng)\n\n if (pos !== null) {\n pos.x -= this.anchorIcon[1]\n\n pos.y -= this.anchorIcon[0]\n }\n\n return pos\n }\n}\n","/* global google */\n\nimport type { Clusterer } from './Clusterer'\n\nimport { ClusterIcon } from './ClusterIcon'\n\nimport type { MarkerExtended } from './types'\n\nexport class Cluster {\n markerClusterer: Clusterer\n map: google.maps.Map | google.maps.StreetViewPanorama | null\n gridSize: number\n minClusterSize: number\n averageCenter: boolean\n markers: MarkerExtended[]\n center: google.maps.LatLng | undefined\n bounds: google.maps.LatLngBounds | null\n clusterIcon: ClusterIcon\n\n constructor(markerClusterer: Clusterer) {\n this.markerClusterer = markerClusterer\n\n this.map = (this.markerClusterer as unknown as google.maps.OverlayView).getMap()\n\n this.gridSize = this.markerClusterer.getGridSize()\n\n this.minClusterSize = this.markerClusterer.getMinimumClusterSize()\n\n this.averageCenter = this.markerClusterer.getAverageCenter()\n\n this.markers = []\n\n this.center = undefined\n\n this.bounds = null\n\n this.clusterIcon = new ClusterIcon(this, this.markerClusterer.getStyles())\n\n this.getSize = this.getSize.bind(this)\n this.getMarkers = this.getMarkers.bind(this)\n this.getCenter = this.getCenter.bind(this)\n this.getMap = this.getMap.bind(this)\n this.getClusterer = this.getClusterer.bind(this)\n this.getBounds = this.getBounds.bind(this)\n this.remove = this.remove.bind(this)\n this.addMarker = this.addMarker.bind(this)\n this.isMarkerInClusterBounds = this.isMarkerInClusterBounds.bind(this)\n this.calculateBounds = this.calculateBounds.bind(this)\n this.updateIcon = this.updateIcon.bind(this)\n this.isMarkerAlreadyAdded = this.isMarkerAlreadyAdded.bind(this)\n }\n\n getSize(): number {\n return this.markers.length\n }\n\n getMarkers(): MarkerExtended[] {\n return this.markers\n }\n\n getCenter(): google.maps.LatLng | undefined {\n return this.center\n }\n\n getMap(): google.maps.Map | google.maps.StreetViewPanorama | null {\n return this.map\n }\n\n getClusterer(): Clusterer {\n return this.markerClusterer\n }\n\n getBounds(): google.maps.LatLngBounds {\n const bounds = new google.maps.LatLngBounds(this.center, this.center)\n\n const markers = this.getMarkers()\n\n for (const marker of markers) {\n const position = marker.getPosition()\n\n if (position) {\n bounds.extend(position)\n }\n }\n\n return bounds\n }\n\n remove() {\n (this.clusterIcon as unknown as google.maps.OverlayView).setMap(null)\n\n this.markers = []\n\n // @ts-ignore\n delete this.markers\n }\n\n addMarker(marker: MarkerExtended): boolean {\n if (this.isMarkerAlreadyAdded(marker)) {\n return false\n }\n\n if (!this.center) {\n const position = marker.getPosition()\n\n if (position) {\n this.center = position\n\n this.calculateBounds()\n }\n } else {\n if (this.averageCenter) {\n const position = marker.getPosition()\n\n if (position) {\n const length = this.markers.length + 1\n\n this.center = new google.maps.LatLng(\n (this.center.lat() * (length - 1) + position.lat()) / length,\n (this.center.lng() * (length - 1) + position.lng()) / length\n )\n\n this.calculateBounds()\n }\n }\n }\n\n marker.isAdded = true\n\n this.markers.push(marker)\n\n const mCount = this.markers.length\n\n const maxZoom = this.markerClusterer.getMaxZoom()\n\n const zoom = this.map?.getZoom()\n\n if (maxZoom !== null && typeof zoom !== 'undefined' && zoom > maxZoom) {\n // Zoomed in past max zoom, so show the marker.\n if (marker.getMap() !== this.map) {\n marker.setMap(this.map)\n }\n } else if (mCount < this.minClusterSize) {\n // Min cluster size not reached so show the marker.\n if (marker.getMap() !== this.map) {\n marker.setMap(this.map)\n }\n } else if (mCount === this.minClusterSize) {\n // Hide the markers that were showing.\n for (const markerElement of this.markers) {\n markerElement.setMap(null)\n }\n } else {\n marker.setMap(null)\n }\n\n return true\n }\n\n isMarkerInClusterBounds(marker: MarkerExtended): boolean {\n if (this.bounds !== null) {\n const position = marker.getPosition()\n\n if (position) {\n return this.bounds.contains(position)\n }\n }\n\n return false\n }\n\n calculateBounds() {\n this.bounds = this.markerClusterer.getExtendedBounds(\n new google.maps.LatLngBounds(this.center, this.center)\n )\n }\n\n updateIcon() {\n const mCount = this.markers.length\n\n const maxZoom = this.markerClusterer.getMaxZoom()\n\n const zoom = this.map?.getZoom()\n\n if (maxZoom !== null && typeof zoom !== 'undefined' && zoom > maxZoom) {\n this.clusterIcon.hide()\n\n return\n }\n\n if (mCount < this.minClusterSize) {\n // Min cluster size not yet reached.\n this.clusterIcon.hide()\n\n return\n }\n\n if (this.center) {\n this.clusterIcon.setCenter(this.center)\n }\n\n this.clusterIcon.useStyle(\n this.markerClusterer.getCalculator()(this.markers, this.markerClusterer.getStyles().length)\n )\n\n this.clusterIcon.show()\n }\n\n isMarkerAlreadyAdded(marker: MarkerExtended): boolean {\n if (this.markers.includes) {\n return this.markers.includes(marker)\n }\n\n for (let i = 0; i < this.markers.length; i++) {\n if (marker === this.markers[i]) {\n return true\n }\n }\n\n return false\n }\n}\n","/* global google */\nimport { Cluster } from './Cluster'\nimport type { ClusterIcon } from './ClusterIcon'\n\nimport type {\n MarkerExtended,\n ClustererOptions,\n ClusterIconStyle,\n TCalculator,\n ClusterIconInfo,\n} from './types'\n\n/**\n * Supports up to 9007199254740991 (Number.MAX_SAFE_INTEGER) markers\n * which is not a problem as max array length is 4294967296 (2**32)\n */\nfunction CALCULATOR(\n markers: MarkerExtended[],\n numStyles: number\n): ClusterIconInfo {\n const count = markers.length\n\n const numberOfDigits = count.toString().length\n\n const index = Math.min(numberOfDigits, numStyles)\n\n return {\n text: count.toString(),\n index,\n title: '',\n }\n}\n\nconst BATCH_SIZE = 2000\n\nconst BATCH_SIZE_IE = 500\n\nconst IMAGE_PATH =\n 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'\n\nconst IMAGE_EXTENSION = 'png'\n\nconst IMAGE_SIZES = [53, 56, 66, 78, 90]\n\nconst CLUSTERER_CLASS = 'cluster'\n\nexport class Clusterer implements google.maps.OverlayView {\n markers: MarkerExtended[]\n clusters: Cluster[]\n listeners: google.maps.MapsEventListener[]\n activeMap: google.maps.Map | google.maps.StreetViewPanorama | null\n ready: boolean\n gridSize: number\n minClusterSize: number\n maxZoom: number | null\n styles: ClusterIconStyle[]\n title: string\n zoomOnClick: boolean\n averageCenter: boolean\n ignoreHidden: boolean\n enableRetinaIcons: boolean\n imagePath: string\n imageExtension: string\n imageSizes: number[]\n calculator: TCalculator\n batchSize: number\n batchSizeIE: number\n clusterClass: string\n timerRefStatic: number | null\n\n constructor(\n map: google.maps.Map,\n optMarkers: MarkerExtended[] = [],\n optOptions: ClustererOptions = {}\n ) {\n this.getMinimumClusterSize = this.getMinimumClusterSize.bind(this)\n this.setMinimumClusterSize = this.setMinimumClusterSize.bind(this)\n this.getEnableRetinaIcons = this.getEnableRetinaIcons.bind(this)\n this.setEnableRetinaIcons = this.setEnableRetinaIcons.bind(this)\n this.addToClosestCluster = this.addToClosestCluster.bind(this)\n this.getImageExtension = this.getImageExtension.bind(this)\n this.setImageExtension = this.setImageExtension.bind(this)\n this.getExtendedBounds = this.getExtendedBounds.bind(this)\n this.getAverageCenter = this.getAverageCenter.bind(this)\n this.setAverageCenter = this.setAverageCenter.bind(this)\n this.getTotalClusters = this.getTotalClusters.bind(this)\n this.fitMapToMarkers = this.fitMapToMarkers.bind(this)\n this.getIgnoreHidden = this.getIgnoreHidden.bind(this)\n this.setIgnoreHidden = this.setIgnoreHidden.bind(this)\n this.getClusterClass = this.getClusterClass.bind(this)\n this.setClusterClass = this.setClusterClass.bind(this)\n this.getTotalMarkers = this.getTotalMarkers.bind(this)\n this.getZoomOnClick = this.getZoomOnClick.bind(this)\n this.setZoomOnClick = this.setZoomOnClick.bind(this)\n this.getBatchSizeIE = this.getBatchSizeIE.bind(this)\n this.setBatchSizeIE = this.setBatchSizeIE.bind(this)\n this.createClusters = this.createClusters.bind(this)\n this.onZoomChanged = this.onZoomChanged.bind(this)\n this.getImageSizes = this.getImageSizes.bind(this)\n this.setImageSizes = this.setImageSizes.bind(this)\n this.getCalculator = this.getCalculator.bind(this)\n this.setCalculator = this.setCalculator.bind(this)\n this.removeMarkers = this.removeMarkers.bind(this)\n this.resetViewport = this.resetViewport.bind(this)\n this.getImagePath = this.getImagePath.bind(this)\n this.setImagePath = this.setImagePath.bind(this)\n this.pushMarkerTo = this.pushMarkerTo.bind(this)\n this.removeMarker = this.removeMarker.bind(this)\n this.clearMarkers = this.clearMarkers.bind(this)\n this.setupStyles = this.setupStyles.bind(this)\n this.getGridSize = this.getGridSize.bind(this)\n this.setGridSize = this.setGridSize.bind(this)\n this.getClusters = this.getClusters.bind(this)\n this.getMaxZoom = this.getMaxZoom.bind(this)\n this.setMaxZoom = this.setMaxZoom.bind(this)\n this.getMarkers = this.getMarkers.bind(this)\n this.addMarkers = this.addMarkers.bind(this)\n this.getStyles = this.getStyles.bind(this)\n this.setStyles = this.setStyles.bind(this)\n this.addMarker = this.addMarker.bind(this)\n this.onRemove = this.onRemove.bind(this)\n this.getTitle = this.getTitle.bind(this)\n this.setTitle = this.setTitle.bind(this)\n this.repaint = this.repaint.bind(this)\n this.onIdle = this.onIdle.bind(this)\n this.redraw = this.redraw.bind(this)\n this.onAdd = this.onAdd.bind(this)\n this.draw = this.draw.bind(this)\n\n this.extend = this.extend.bind(this)\n this.extend(Clusterer, google.maps.OverlayView)\n\n this.markers = []\n this.clusters = []\n this.listeners = []\n this.activeMap = null\n this.ready = false\n this.gridSize = optOptions.gridSize || 60\n this.minClusterSize = optOptions.minimumClusterSize || 2\n this.maxZoom = optOptions.maxZoom || null\n this.styles = optOptions.styles || []\n\n this.title = optOptions.title || ''\n\n this.zoomOnClick = true\n\n if (typeof optOptions.zoomOnClick !== 'undefined') {\n this.zoomOnClick = optOptions.zoomOnClick\n }\n\n this.averageCenter = false\n\n if (typeof optOptions.averageCenter !== 'undefined') {\n this.averageCenter = optOptions.averageCenter\n }\n\n this.ignoreHidden = false\n\n if (typeof optOptions.ignoreHidden !== 'undefined') {\n this.ignoreHidden = optOptions.ignoreHidden\n }\n\n this.enableRetinaIcons = false\n\n if (typeof optOptions.enableRetinaIcons !== 'undefined') {\n this.enableRetinaIcons = optOptions.enableRetinaIcons\n }\n this.imagePath = optOptions.imagePath || IMAGE_PATH\n\n this.imageExtension = optOptions.imageExtension || IMAGE_EXTENSION\n\n this.imageSizes = optOptions.imageSizes || IMAGE_SIZES\n\n this.calculator = optOptions.calculator || CALCULATOR\n\n this.batchSize = optOptions.batchSize || BATCH_SIZE\n\n this.batchSizeIE = optOptions.batchSizeIE || BATCH_SIZE_IE\n\n this.clusterClass = optOptions.clusterClass || CLUSTERER_CLASS\n\n if (navigator.userAgent.toLowerCase().indexOf('msie') !== -1) {\n // Try to avoid IE timeout when processing a huge number of markers:\n this.batchSize = this.batchSizeIE\n }\n\n this.timerRefStatic = null\n\n this.setupStyles()\n\n this.addMarkers(optMarkers, true);\n\n (this as unknown as google.maps.OverlayView).setMap(map) // Note: this causes onAdd to be called\n }\n\n onZoomChanged(): void {\n this.resetViewport(false)\n\n // Workaround for this Google bug: when map is at level 0 and \"-\" of\n // zoom slider is clicked, a \"zoom_changed\" event is fired even though\n // the map doesn't zoom out any further. In this situation, no \"idle\"\n // event is triggered so the cluster markers that have been removed\n // do not get redrawn. Same goes for a zoom in at maxZoom.\n if (\n (this as unknown as google.maps.OverlayView).getMap()?.getZoom() === ((this as unknown as google.maps.OverlayView).get('minZoom') || 0) ||\n (this as unknown as google.maps.OverlayView).getMap()?.getZoom() === (this as unknown as google.maps.OverlayView).get('maxZoom')\n ) {\n google.maps.event.trigger(this, 'idle')\n }\n }\n\n onIdle(): void {\n this.redraw()\n }\n\n onAdd(): void {\n const map = (this as unknown as google.maps.OverlayView).getMap()\n\n this.activeMap = map\n\n this.ready = true\n\n this.repaint()\n\n if (map !== null) {\n // Add the map event listeners\n this.listeners = [\n google.maps.event.addListener(\n map,\n 'zoom_changed',\n this.onZoomChanged\n ),\n google.maps.event.addListener(\n map,\n 'idle',\n this.onIdle\n ),\n ]\n }\n }\n\n onRemove(): void {\n // Put all the managed markers back on the map:\n for (const marker of this.markers) {\n if (marker.getMap() !== this.activeMap) {\n marker.setMap(this.activeMap)\n }\n }\n\n // Remove all clusters:\n for (const cluster of this.clusters) {\n cluster.remove()\n }\n\n this.clusters = []\n\n // Remove map event listeners:\n for (const listener of this.listeners) {\n google.maps.event.removeListener(listener)\n }\n\n this.listeners = []\n\n this.activeMap = null\n\n this.ready = false\n }\n\n draw(): void { return }\n\n getMap(): null { return null }\n\n getPanes(): null { return null }\n\n getProjection() {\n return {\n fromContainerPixelToLatLng(): null { return null },\n fromDivPixelToLatLng(): null { return null},\n fromLatLngToContainerPixel(): null { return null},\n fromLatLngToDivPixel(): null { return null},\n getVisibleRegion(): null { return null },\n getWorldWidth(): number { return 0 }\n }\n }\n\n setMap(): void { return }\n\n addListener() {\n return {\n remove() { return }\n }\n }\n\n bindTo(): void { return }\n\n get(): void { return }\n\n notify(): void { return }\n\n set(): void { return }\n setValues(): void { return }\n unbind(): void { return }\n unbindAll(): void { return }\n\n setupStyles(): void {\n if (this.styles.length > 0) {\n return\n }\n\n for (let i = 0; i < this.imageSizes.length; i++) {\n this.styles.push({\n url: `${this.imagePath + (i + 1)}.${this.imageExtension}`,\n height: this.imageSizes[i] || 0,\n width: this.imageSizes[i] || 0,\n })\n }\n }\n\n fitMapToMarkers(): void {\n const markers = this.getMarkers()\n\n const bounds = new google.maps.LatLngBounds()\n\n for (const marker of markers) {\n const position = marker.getPosition()\n\n if (position) {\n bounds.extend(position)\n }\n }\n\n const map = (this as unknown as google.maps.OverlayView).getMap()\n\n if (map !== null && 'fitBounds' in map) {\n map.fitBounds(bounds)\n }\n\n }\n\n getGridSize(): number {\n return this.gridSize\n }\n\n setGridSize(gridSize: number) {\n this.gridSize = gridSize\n }\n\n getMinimumClusterSize(): number {\n return this.minClusterSize\n }\n\n setMinimumClusterSize(minimumClusterSize: number) {\n this.minClusterSize = minimumClusterSize\n }\n\n getMaxZoom(): number | null {\n return this.maxZoom\n }\n\n setMaxZoom(maxZoom: number) {\n this.maxZoom = maxZoom\n }\n\n getStyles(): ClusterIconStyle[] {\n return this.styles\n }\n\n setStyles(styles: ClusterIconStyle[]) {\n this.styles = styles\n }\n\n getTitle(): string {\n return this.title\n }\n\n setTitle(title: string) {\n this.title = title\n }\n\n getZoomOnClick(): boolean {\n return this.zoomOnClick\n }\n\n setZoomOnClick(zoomOnClick: boolean) {\n this.zoomOnClick = zoomOnClick\n }\n\n getAverageCenter(): boolean {\n return this.averageCenter\n }\n\n setAverageCenter(averageCenter: boolean) {\n this.averageCenter = averageCenter\n }\n\n getIgnoreHidden(): boolean {\n return this.ignoreHidden\n }\n\n setIgnoreHidden(ignoreHidden: boolean) {\n this.ignoreHidden = ignoreHidden\n }\n\n getEnableRetinaIcons(): boolean {\n return this.enableRetinaIcons\n }\n\n setEnableRetinaIcons(enableRetinaIcons: boolean) {\n this.enableRetinaIcons = enableRetinaIcons\n }\n\n getImageExtension(): string {\n return this.imageExtension\n }\n\n setImageExtension(imageExtension: string) {\n this.imageExtension = imageExtension\n }\n\n getImagePath(): string {\n return this.imagePath\n }\n\n setImagePath(imagePath: string) {\n this.imagePath = imagePath\n }\n\n getImageSizes(): number[] {\n return this.imageSizes\n }\n\n setImageSizes(imageSizes: number[]) {\n this.imageSizes = imageSizes\n }\n\n getCalculator(): TCalculator {\n return this.calculator\n }\n\n setCalculator(calculator: TCalculator) {\n this.calculator = calculator\n }\n\n getBatchSizeIE(): number {\n return this.batchSizeIE\n }\n\n setBatchSizeIE(batchSizeIE: number) {\n this.batchSizeIE = batchSizeIE\n }\n\n getClusterClass(): string {\n return this.clusterClass\n }\n\n setClusterClass(clusterClass: string) {\n this.clusterClass = clusterClass\n }\n\n getMarkers(): MarkerExtended[] {\n return this.markers\n }\n\n getTotalMarkers(): number {\n return this.markers.length\n }\n\n getClusters(): Cluster[] {\n return this.clusters\n }\n\n getTotalClusters(): number {\n return this.clusters.length\n }\n\n addMarker(marker: MarkerExtended, optNoDraw: boolean) {\n this.pushMarkerTo(marker)\n\n if (!optNoDraw) {\n this.redraw()\n }\n }\n\n addMarkers(markers: MarkerExtended[], optNoDraw: boolean) {\n for (const key in markers) {\n if (Object.prototype.hasOwnProperty.call(markers, key)) {\n const marker = markers[key]\n\n if (marker) {\n this.pushMarkerTo(marker)\n }\n }\n }\n\n if (!optNoDraw) {\n this.redraw()\n }\n }\n\n pushMarkerTo(marker: MarkerExtended) {\n // If the marker is draggable add a listener so we can update the clusters on the dragend:\n if (marker.getDraggable()) {\n google.maps.event.addListener(marker, 'dragend', () => {\n if (this.ready) {\n marker.isAdded = false\n\n this.repaint()\n }\n })\n }\n\n marker.isAdded = false\n\n this.markers.push(marker)\n }\n\n removeMarker_(marker: MarkerExtended): boolean {\n let index = -1\n\n if (this.markers.indexOf) {\n index = this.markers.indexOf(marker)\n } else {\n for (let i = 0; i < this.markers.length; i++) {\n if (marker === this.markers[i]) {\n index = i\n\n break\n }\n }\n }\n\n if (index === -1) {\n // Marker is not in our list of markers, so do nothing:\n return false\n }\n\n marker.setMap(null)\n\n this.markers.splice(index, 1) // Remove the marker from the list of managed markers\n\n return true\n }\n\n removeMarker(marker: MarkerExtended, optNoDraw: boolean): boolean {\n const removed = this.removeMarker_(marker)\n\n if (!optNoDraw && removed) {\n this.repaint()\n }\n\n return removed\n }\n\n removeMarkers(markers: MarkerExtended[], optNoDraw: boolean): boolean {\n let removed = false\n\n for (const marker of markers) {\n removed = removed || this.removeMarker_(marker)\n }\n\n if (!optNoDraw && removed) {\n this.repaint()\n }\n\n return removed\n }\n\n clearMarkers() {\n this.resetViewport(true)\n\n this.markers = []\n }\n\n repaint() {\n const oldClusters = this.clusters.slice()\n\n this.clusters = []\n\n this.resetViewport(false)\n\n this.redraw()\n\n // Remove the old clusters.\n // Do it in a timeout to prevent blinking effect.\n setTimeout(function timeout() {\n for (const oldCluster of oldClusters) {\n oldCluster.remove()\n }\n }, 0)\n }\n\n getExtendedBounds(bounds: google.maps.LatLngBounds): google.maps.LatLngBounds {\n const projection = (this as unknown as google.maps.OverlayView).getProjection()\n\n // Convert the points to pixels and the extend out by the grid size.\n const trPix = projection.fromLatLngToDivPixel(\n // Turn the bounds into latlng.\n new google.maps.LatLng(bounds.getNorthEast().lat(), bounds.getNorthEast().lng())\n )\n\n if (trPix !== null) {\n trPix.x += this.gridSize\n trPix.y -= this.gridSize\n }\n\n const blPix = projection.fromLatLngToDivPixel(\n // Turn the bounds into latlng.\n new google.maps.LatLng(bounds.getSouthWest().lat(), bounds.getSouthWest().lng())\n )\n\n if (blPix !== null) {\n blPix.x -= this.gridSize\n blPix.y += this.gridSize\n }\n\n\n // Extend the bounds to contain the new bounds.\n if (trPix !== null) {\n // Convert the pixel points back to LatLng nw\n const point1 = projection.fromDivPixelToLatLng(trPix)\n\n if (point1 !== null) {\n bounds.extend(point1)\n }\n }\n\n if (blPix !== null) {\n // Convert the pixel points back to LatLng sw\n const point2 = projection.fromDivPixelToLatLng(blPix)\n\n if (point2 !== null) {\n bounds.extend(\n point2\n )\n }\n }\n\n\n return bounds\n }\n\n redraw() {\n // Redraws all the clusters.\n this.createClusters(0)\n }\n\n resetViewport(optHide: boolean) {\n // Remove all the clusters\n for (const cluster of this.clusters) {\n cluster.remove()\n }\n\n this.clusters = []\n\n // Reset the markers to not be added and to be removed from the map.\n for (const marker of this.markers) {\n marker.isAdded = false\n\n if (optHide) {\n marker.setMap(null)\n }\n }\n }\n\n distanceBetweenPoints(p1: google.maps.LatLng, p2: google.maps.LatLng): number {\n const R = 6371 // Radius of the Earth in km\n\n const dLat = ((p2.lat() - p1.lat()) * Math.PI) / 180\n const dLon = ((p2.lng() - p1.lng()) * Math.PI) / 180\n\n const a =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos((p1.lat() * Math.PI) / 180) *\n Math.cos((p2.lat() * Math.PI) / 180) *\n Math.sin(dLon / 2) *\n Math.sin(dLon / 2)\n\n return R * (2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)))\n }\n\n isMarkerInBounds(marker: MarkerExtended, bounds: google.maps.LatLngBounds): boolean {\n const position = marker.getPosition()\n\n if (position) {\n return bounds.contains(position)\n }\n\n return false\n }\n\n addToClosestCluster(marker: MarkerExtended) {\n let cluster\n\n let distance = 40000 // Some large number\n\n let clusterToAddTo = null\n\n for (const clusterElement of this.clusters) {\n cluster = clusterElement\n\n const center = cluster.getCenter()\n\n const position = marker.getPosition()\n\n if (center && position) {\n const d = this.distanceBetweenPoints(center, position)\n\n if (d < distance) {\n distance = d\n\n clusterToAddTo = cluster\n }\n }\n }\n\n if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\n clusterToAddTo.addMarker(marker)\n } else {\n cluster = new Cluster(this)\n\n cluster.addMarker(marker)\n\n this.clusters.push(cluster)\n }\n }\n\n createClusters(iFirst: number) {\n if (!this.ready) {\n return\n }\n\n // Cancel previous batch processing if we're working on the first batch:\n if (iFirst === 0) {\n /**\n * This event is fired when the <code>Clusterer</code> begins\n * clustering markers.\n * @name Clusterer#clusteringbegin\n * @param {Clusterer} mc The Clusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringbegin', this)\n\n if (this.timerRefStatic !== null) {\n window.clearTimeout(this.timerRefStatic)\n\n // @ts-ignore\n delete this.timerRefStatic\n }\n }\n\n const map = (this as unknown as google.maps.OverlayView).getMap()\n\n const bounds = map !== null && 'getBounds' in map ? map.getBounds() : null\n\n const zoom = map?.getZoom() || 0\n // Get our current map view bounds.\n // Create a new bounds object so we don't affect the map.\n //\n // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug:\n const mapBounds = zoom > 3\n ? new google.maps.LatLngBounds(\n bounds?.getSouthWest(),\n bounds?.getNorthEast()\n )\n : new google.maps.LatLngBounds(\n new google.maps.LatLng(85.02070771743472, -178.48388434375),\n new google.maps.LatLng(-85.08136444384544, 178.00048865625)\n )\n\n const extendedMapBounds = this.getExtendedBounds(mapBounds)\n\n const iLast = Math.min(iFirst + this.batchSize, this.markers.length)\n\n for (let i = iFirst; i < iLast; i++) {\n const marker = this.markers[i]\n\n if (marker && !marker.isAdded && this.isMarkerInBounds(marker, extendedMapBounds) && (!this.ignoreHidden || (this.ignoreHidden && marker.getVisible()))) {\n this.addToClosestCluster(marker)\n }\n }\n\n if (iLast < this.markers.length) {\n this.timerRefStatic = window.setTimeout(\n () => {\n this.createClusters(iLast)\n },\n 0\n )\n } else {\n this.timerRefStatic = null\n\n /**\n * This event is fired when the <code>Clusterer</code> stops\n * clustering markers.\n * @name Clusterer#clusteringend\n * @param {Clusterer} mc The Clusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringend', this)\n\n for (const cluster of this.clusters) {\n cluster.updateIcon()\n }\n }\n }\n\n extend<A extends typeof Clusterer | typeof ClusterIcon>(obj1: A, obj2: typeof google.maps.OverlayView): A {\n return function applyExtend(this: A, object: typeof google.maps.OverlayView): A {\n for (const property in object.prototype) {\n\n const prop = property as keyof google.maps.OverlayView & (string & {})\n\n // @ts-ignore\n this.prototype[prop] = object.prototype[prop]\n }\n\n return this\n }.apply<A, [typeof google.maps.OverlayView], A>(obj1, [obj2])\n }\n}\n"],"names":[],"mappings":";;;;;;AAKA,QAAA,WAAA,kBAAA,YAAA;QA2BE,SAAY,WAAA,CAAA,OAAgB,EAAE,MAA0B,EAAA;IACtD,QAAA,OAAO,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IAEnE,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IAEtB,QAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,eAA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