@react-google-maps/marker-clusterer 2.5.0 → 2.9.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/cjs.js +44 -121
- package/dist/cjs.js.map +1 -1
- package/dist/cjs.min.js +1 -1
- package/dist/cjs.min.js.map +1 -1
- package/dist/esm.js +44 -121
- package/dist/esm.js.map +1 -1
- package/dist/esm.min.js +1 -1
- package/dist/esm.min.js.map +1 -1
- package/dist/index.d.ts +16 -16
- package/dist/umd.js +46 -123
- package/dist/umd.js.map +1 -1
- package/dist/umd.min.js +1 -1
- package/dist/umd.min.js.map +1 -1
- package/package.json +34 -27
- package/src/Cluster.tsx +0 -2
- package/src/ClusterIcon.tsx +40 -102
- package/src/Clusterer.tsx +2 -20
- package/src/__tests__/clusterer.test.ts +4 -0
- package/src/types.tsx +16 -16
package/dist/cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cjs.js","sources":["../src/ClusterIcon.tsx","../src/Cluster.tsx","../src/Clusterer.tsx"],"sourcesContent":["/* global google */\n/* eslint-disable filenames/match-regex */\nimport { Cluster } from './Cluster'\n\nimport { ClusterIconStyle, ClusterIconInfo } from './types'\n\nexport class ClusterIcon {\n cluster: Cluster\n className: 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[]\n anchorIcon: number[]\n textColor: string\n textSize: number\n textDecoration: string\n fontWeight: string\n fontStyle: string\n fontFamily: string\n backgroundPosition: string\n\n boundsChangedListener: google.maps.MapsEventListener | null\n\n constructor(cluster: Cluster, styles: ClusterIconStyle[]) {\n cluster.getClusterer().extend(ClusterIcon, google.maps.OverlayView)\n this.cluster = cluster\n this.className = this.cluster.getClusterer().getClusterClass()\n this.styles = styles\n this.center = undefined\n this.div = null\n this.sums = null\n this.visible = false\n this.boundsChangedListener = null\n this.url = ''\n this.height = 0\n this.width = 0\n this.anchorText = [0, 0]\n this.anchorIcon = [0, 0]\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 this.backgroundPosition = '0 0'\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.setMap(cluster.getMap()) // Note: this causes onAdd to be called\n }\n\n onAdd() {\n let cMouseDownInCluster: boolean\n let cDraggingMapByCluster: boolean\n\n this.div = document.createElement('div')\n this.div.className = this.className\n if (this.visible) {\n this.show()\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getPanes().overlayMouseTarget.appendChild(this.div)\n\n // Fix for Issue 157\n this.boundsChangedListener = google.maps.event.addListener(\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap(),\n 'boundschanged',\n function boundsChanged() {\n cDraggingMapByCluster = cMouseDownInCluster\n }\n )\n\n google.maps.event.addDomListener(this.div, 'mousedown', function onMouseDown() {\n cMouseDownInCluster = true\n cDraggingMapByCluster = false\n })\n\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n google.maps.event.addDomListener(\n this.div,\n 'click',\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n (event: Event) => {\n cMouseDownInCluster = false\n\n if (!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 // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n markerClusterer.getMap().fitBounds(bounds)\n\n // There is a fix for Issue 170 here:\n setTimeout(function timeout() {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n markerClusterer.getMap().fitBounds(bounds)\n\n // Don't zoom beyond the max zoom level\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n if (maxZoom !== null && markerClusterer.getMap().getZoom() > maxZoom) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n markerClusterer.getMap().setZoom(maxZoom + 1)\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\n google.maps.event.addDomListener(\n this.div,\n 'mouseover',\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n () => {\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(this.cluster.getClusterer(), 'mouseover', this.cluster)\n }\n )\n\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n google.maps.event.addDomListener(\n this.div,\n 'mouseout',\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n () => {\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(this.cluster.getClusterer(), 'mouseout', this.cluster)\n }\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 google.maps.event.clearInstanceListeners(this.div)\n\n this.div.parentNode.removeChild(this.div)\n\n this.div = null\n }\n }\n\n draw() {\n if (this.visible && this.div !== null && this.center) {\n const { x, y } = this.getPosFromLatLng(this.center)\n\n this.div.style.top = y + 'px'\n this.div.style.left = x + 'px'\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 let img = '',\n divTitle = ''\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, ''), 10)\n\n const spriteV = parseInt(bp[1].replace(/^\\s+|\\s+$/g, ''), 10)\n\n const pos = this.getPosFromLatLng(this.center)\n\n if (this.sums === null || typeof this.sums.title === 'undefined' || this.sums.title === '') {\n divTitle = this.cluster.getClusterer().getTitle()\n } else {\n divTitle = this.sums.title\n }\n\n this.div.style.cssText = this.createCss(pos)\n\n img =\n \"<img alt='\" +\n divTitle +\n \"' src='\" +\n this.url +\n \"' style='position: absolute; top: \" +\n spriteV +\n 'px; left: ' +\n spriteH +\n 'px; '\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n //@ts-ignore\n if (!this.cluster.getClusterer().enableRetinaIcons) {\n img +=\n 'clip: rect(' +\n -1 * spriteV +\n 'px, ' +\n (-1 * spriteH + this.width) +\n 'px, ' +\n (-1 * spriteV + this.height) +\n 'px, ' +\n -1 * spriteH +\n 'px);'\n }\n\n img += \"'>\"\n\n this.div.innerHTML =\n img +\n \"<div style='\" +\n 'position: absolute;' +\n 'top: ' +\n this.anchorText[0] +\n 'px;' +\n 'left: ' +\n this.anchorText[1] +\n 'px;' +\n 'color: ' +\n this.textColor +\n ';' +\n 'font-size: ' +\n this.textSize +\n 'px;' +\n 'font-family: ' +\n this.fontFamily +\n ';' +\n 'font-weight: ' +\n this.fontWeight +\n ';' +\n 'font-style: ' +\n this.fontStyle +\n ';' +\n 'text-decoration: ' +\n this.textDecoration +\n ';' +\n 'text-align: center;' +\n 'width: ' +\n this.width +\n 'px;' +\n 'line-height:' +\n this.height +\n 'px;' +\n \"'>\" +\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.sums.text +\n '</div>'\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 style = this.styles[Math.min(this.styles.length - 1, Math.max(0, sums.index - 1))]\n\n this.url = style.url\n this.height = style.height\n this.width = style.width\n\n if (style.className)\n this.className = `${this.className} ${style.className}`\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 setCenter(center: google.maps.LatLng) {\n this.center = center\n }\n\n createCss(pos: google.maps.Point): string {\n const style = []\n\n style.push('cursor: pointer;')\n\n style.push('position: absolute; top: ' + pos.y + 'px; left: ' + pos.x + 'px;')\n\n style.push('width: ' + this.width + 'px; height: ' + this.height + 'px;')\n\n return style.join('')\n }\n\n getPosFromLatLng(latlng: google.maps.LatLng): google.maps.Point {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n const pos = this.getProjection().fromLatLngToDivPixel(latlng)\n\n pos.x -= this.anchorIcon[1]\n\n pos.y -= this.anchorIcon[0]\n\n // pos.x = pos.x\n\n // pos.y = pos.y\n\n return pos\n }\n}\n","/* global google */\n/* eslint-disable filenames/match-regex */\nimport { Clusterer } from './Clusterer'\n\nimport { ClusterIcon } from './ClusterIcon'\n\nimport { MarkerExtended } from './types'\n\nexport class Cluster {\n markerClusterer: Clusterer\n map: google.maps.Map | google.maps.StreetViewPanorama\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 // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.map = this.markerClusterer.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\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 {\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 (let i = 0; i < markers.length; i++) {\n const position = markers[i].getPosition()\n\n if (position) {\n bounds.extend(position)\n }\n }\n\n return bounds\n }\n\n remove() {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.clusterIcon.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 (let i = 0; i < mCount; i++) {\n this.markers[i].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 } else {\n for (let i = 0; i < this.markers.length; i++) {\n if (marker === this.markers[i]) {\n return true\n }\n }\n }\n\n return false\n }\n}\n","/* global google */\n/* eslint-disable filenames/match-regex */\nimport { Cluster } from './Cluster'\n\nimport {\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 */\nconst CALCULATOR = function 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: 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 {\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.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 // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.setMap(map) // Note: this causes onAdd to be called\n }\n\n onAdd() {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.activeMap = this.getMap()\n\n this.ready = true\n\n this.repaint()\n\n // Add the map event listeners\n this.listeners = [\n google.maps.event.addListener(\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap(),\n 'zoom_changed',\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n () => {\n this.resetViewport(false)\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 // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap().getZoom() === (this.get('minZoom') || 0) ||\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap().getZoom() === this.get('maxZoom')\n ) {\n google.maps.event.trigger(this, 'idle')\n }\n }\n ),\n google.maps.event.addListener(\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap(),\n 'idle',\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\n () => {\n this.redraw()\n }\n ),\n ]\n }\n\n // eslint-disable-next-line @getify/proper-arrows/this\n onRemove() {\n // Put all the managed markers back on the map:\n for (let i = 0; i < this.markers.length; i++) {\n if (this.markers[i].getMap() !== this.activeMap) {\n this.markers[i].setMap(this.activeMap)\n }\n }\n\n // Remove all clusters:\n for (let i = 0; i < this.clusters.length; i++) {\n this.clusters[i].remove()\n }\n\n this.clusters = []\n\n // Remove map event listeners:\n for (let i = 0; i < this.listeners.length; i++) {\n google.maps.event.removeListener(this.listeners[i])\n }\n\n this.listeners = []\n\n this.activeMap = null\n\n this.ready = false\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n draw() {}\n\n setupStyles() {\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],\n width: this.imageSizes[i],\n })\n }\n }\n\n fitMapToMarkers() {\n const markers = this.getMarkers()\n\n const bounds = new google.maps.LatLngBounds()\n\n for (let i = 0; i < markers.length; i++) {\n const position = markers[i].getPosition()\n if (position) {\n bounds.extend(position)\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap().fitBounds(bounds)\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 (markers.hasOwnProperty(key)) {\n this.pushMarkerTo(markers[key])\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 // eslint-disable-next-line @getify/proper-arrows/name, @getify/proper-arrows/this\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 (let i = 0; i < markers.length; i++) {\n removed = removed || this.removeMarker_(markers[i])\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 (let i = 0; i < oldClusters.length; i++) {\n oldClusters[i].remove()\n }\n }, 0)\n }\n\n getExtendedBounds(bounds: google.maps.LatLngBounds): google.maps.LatLngBounds {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n const projection = this.getProjection()\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 trPix.x += this.gridSize\n trPix.y -= this.gridSize\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 blPix.x -= this.gridSize\n blPix.y += this.gridSize\n\n // Extend the bounds to contain the new bounds.\n bounds.extend(\n // Convert the pixel points back to LatLng nw\n projection.fromDivPixelToLatLng(trPix)\n )\n\n bounds.extend(\n // Convert the pixel points back to LatLng sw\n projection.fromDivPixelToLatLng(blPix)\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 (let i = 0; i < this.clusters.length; i++) {\n this.clusters[i].remove()\n }\n\n this.clusters = []\n\n // Reset the markers to not be added and to be removed from the map.\n for (let i = 0; i < this.markers.length; i++) {\n const marker = this.markers[i]\n\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 (let i = 0; i < this.clusters.length; i++) {\n cluster = this.clusters[i]\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 // 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 =\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap().getZoom() > 3\n ? new google.maps.LatLngBounds(\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap()\n .getBounds()\n .getSouthWest(),\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.getMap()\n .getBounds()\n .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 bounds = 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.isAdded && this.isMarkerInBounds(marker, bounds)) {\n if (!this.ignoreHidden || (this.ignoreHidden && marker.getVisible())) {\n this.addToClosestCluster(marker)\n }\n }\n }\n\n if (iLast < this.markers.length) {\n this.timerRefStatic = window.setTimeout(\n // eslint-disable-next-line @getify/proper-arrows/this, @getify/proper-arrows/name\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 (let i = 0; i < this.clusters.length; i++) {\n this.clusters[i].updateIcon()\n }\n }\n }\n\n extend(obj1: any, obj2: any): any {\n return function applyExtend(object: any) {\n // eslint-disable-next-line guard-for-in\n for (const property in object.prototype) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n this.prototype[property] = object.prototype[property]\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-ignore\n // @ts-ignore\n return this\n }.apply(obj1, [obj2])\n }\n}\n"],"names":[],"mappings":";;;;;IA6BE,qBAAY,OAAgB,EAAE,MAA0B;QACtD,OAAO,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QACnE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,eAAe,EAAE,CAAA;QAC9D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,SAAS,CAAA;QACvB,IAAI,CAAC,GAAG,G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aACtD;;;YAID,OAAO,IAAI,CAAA;SACZ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;KACtB;IACH,gBAAC;AAAD,CAAC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"cjs.js","sources":["../src/ClusterIcon.tsx","../src/Cluster.tsx","../src/Clusterer.tsx"],"sourcesContent":["/* global google */\n/* eslint-disable filenames/match-regex */\nimport { Cluster } from './Cluster'\n\nimport { 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[]\n anchorIcon: number[]\n textColor: string\n textSize: number\n textDecoration: string\n fontWeight: string\n fontStyle: string\n fontFamily: string\n backgroundPosition: string\n\n boundsChangedListener: google.maps.MapsEventListener | null\n\n constructor(cluster: Cluster, styles: ClusterIconStyle[]) {\n cluster.getClusterer().extend(ClusterIcon, google.maps.OverlayView)\n this.cluster = cluster\n this.clusterClassName = this.cluster.getClusterer().getClusterClass()\n this.className = this.clusterClassName\n this.styles = styles\n this.center = undefined\n this.div = null\n this.sums = null\n this.visible = false\n this.boundsChangedListener = null\n this.url = ''\n this.height = 0\n this.width = 0\n this.anchorText = [0, 0]\n this.anchorIcon = [0, 0]\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 this.backgroundPosition = '0 0'\n // @ts-ignore\n this.setMap(cluster.getMap()) // Note: this causes onAdd to be called\n }\n\n onAdd() {\n let cMouseDownInCluster: boolean\n let cDraggingMapByCluster: boolean\n\n this.div = document.createElement('div')\n this.div.className = this.className\n if (this.visible) {\n this.show()\n }\n\n // @ts-ignore\n this.getPanes().overlayMouseTarget.appendChild(this.div)\n\n // Fix for Issue 157\n this.boundsChangedListener = google.maps.event.addListener(\n // @ts-ignore\n this.getMap(),\n 'boundschanged',\n function boundsChanged() {\n cDraggingMapByCluster = cMouseDownInCluster\n }\n )\n\n google.maps.event.addDomListener(this.div, 'mousedown', function onMouseDown() {\n cMouseDownInCluster = true\n cDraggingMapByCluster = false\n })\n\n google.maps.event.addDomListener(\n this.div,\n 'click',\n (event: Event) => {\n cMouseDownInCluster = false\n\n if (!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 // @ts-ignore\n markerClusterer.getMap().fitBounds(bounds)\n\n // There is a fix for Issue 170 here:\n setTimeout(function timeout() {\n // @ts-ignore\n markerClusterer.getMap().fitBounds(bounds)\n\n // Don't zoom beyond the max zoom level\n // @ts-ignore\n if (maxZoom !== null && markerClusterer.getMap().getZoom() > maxZoom) {\n // @ts-ignore\n markerClusterer.getMap().setZoom(maxZoom + 1)\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\n google.maps.event.addDomListener(\n this.div,\n 'mouseover',\n () => {\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(this.cluster.getClusterer(), 'mouseover', this.cluster)\n }\n )\n\n google.maps.event.addDomListener(\n this.div,\n 'mouseout',\n () => {\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(this.cluster.getClusterer(), 'mouseout', this.cluster)\n }\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 google.maps.event.clearInstanceListeners(this.div)\n\n this.div.parentNode.removeChild(this.div)\n\n this.div = null\n }\n }\n\n draw() {\n if (this.visible && this.div !== null && this.center) {\n const { x, y } = this.getPosFromLatLng(this.center)\n\n this.div.style.top = y + 'px'\n this.div.style.left = x + 'px'\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 let divTitle = ''\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, ''), 10)\n const spriteV = parseInt(bp[1].replace(/^\\s+|\\s+$/g, ''), 10)\n\n const pos = this.getPosFromLatLng(this.center)\n\n if (this.sums === null || typeof this.sums.title === 'undefined' || this.sums.title === '') {\n divTitle = this.cluster.getClusterer().getTitle()\n } else {\n divTitle = this.sums.title\n }\n\n this.div.style.cursor = 'pointer'\n this.div.style.position = 'absolute'\n this.div.style.top = `${pos.y}px`\n this.div.style.left = `${pos.x}px`\n this.div.style.width = `${this.width}px`\n this.div.style.height = `${this.height}px`\n\n const img = document.createElement('img')\n img.alt = divTitle\n img.src = this.url\n img.style.position = 'absolute'\n img.style.top = `${spriteV}px`\n img.style.left = `${spriteH}px`\n\n if (!this.cluster.getClusterer().enableRetinaIcons) {\n img.style.clip = `rect(-${spriteV}px, -${spriteH + this.width}px, -${spriteV + this.height}, -${spriteH})`\n }\n\n const textElm = document.createElement('div')\n textElm.style.position = 'absolute'\n textElm.style.top = `${this.anchorText[0]}px`\n textElm.style.left = `${this.anchorText[1]}px`\n textElm.style.color = this.textColor\n textElm.style.fontSize = `${this.textSize}px`\n textElm.style.fontFamily = this.fontFamily\n textElm.style.fontWeight = this.fontWeight\n textElm.style.fontStyle = this.fontStyle\n textElm.style.textDecoration = this.textDecoration\n textElm.style.textAlign = 'center'\n textElm.style.width = `${this.width}px`\n textElm.style.lineHeight = `${this.height}px`\n textElm.innerText = `${this.sums?.text}`\n\n this.div.innerHTML = ''\n this.div.appendChild(img)\n this.div.appendChild(textElm)\n this.div.title = divTitle\n this.div.style.display = ''\n }\n\n this.visible = true\n }\n\n useStyle(sums: ClusterIconInfo) {\n this.sums = sums\n const styles = this.cluster.getClusterer().getStyles()\n const style = styles[Math.min(styles.length - 1, Math.max(0, sums.index - 1))]\n\n this.url = style.url\n this.height = style.height\n this.width = style.width\n\n if (style.className) this.className = `${this.clusterClassName} ${style.className}`\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 setCenter(center: google.maps.LatLng) {\n this.center = center\n }\n\n getPosFromLatLng(latlng: google.maps.LatLng): google.maps.Point {\n // @ts-ignore\n const pos = this.getProjection().fromLatLngToDivPixel(latlng)\n\n pos.x -= this.anchorIcon[1]\n\n pos.y -= this.anchorIcon[0]\n\n // pos.x = pos.x\n\n // pos.y = pos.y\n\n return pos\n }\n}\n","/* global google */\n/* eslint-disable filenames/match-regex */\nimport { Clusterer } from './Clusterer'\n\nimport { ClusterIcon } from './ClusterIcon'\n\nimport { MarkerExtended } from './types'\n\nexport class Cluster {\n markerClusterer: Clusterer\n map: google.maps.Map | google.maps.StreetViewPanorama\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 // @ts-ignore\n this.map = this.markerClusterer.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\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 {\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 (let i = 0; i < markers.length; i++) {\n const position = markers[i].getPosition()\n\n if (position) {\n bounds.extend(position)\n }\n }\n\n return bounds\n }\n\n remove() {\n // @ts-ignore\n this.clusterIcon.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 (let i = 0; i < mCount; i++) {\n this.markers[i].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 } else {\n for (let i = 0; i < this.markers.length; i++) {\n if (marker === this.markers[i]) {\n return true\n }\n }\n }\n\n return false\n }\n}\n","/* global google */\n/* eslint-disable filenames/match-regex */\nimport { Cluster } from './Cluster'\n\nimport {\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 */\nconst CALCULATOR = function 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 {\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.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 // @ts-ignore\n this.setMap(map) // Note: this causes onAdd to be called\n }\n\n onAdd() {\n // @ts-ignore\n this.activeMap = this.getMap()\n\n this.ready = true\n\n this.repaint()\n\n // Add the map event listeners\n this.listeners = [\n google.maps.event.addListener(\n // @ts-ignore\n this.getMap(),\n 'zoom_changed',\n () => {\n this.resetViewport(false)\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 // @ts-ignore\n this.getMap().getZoom() === (this.get('minZoom') || 0) ||\n // @ts-ignore\n this.getMap().getZoom() === this.get('maxZoom')\n ) {\n google.maps.event.trigger(this, 'idle')\n }\n }\n ),\n google.maps.event.addListener(\n // @ts-ignore\n this.getMap(),\n 'idle',\n () => {\n this.redraw()\n }\n ),\n ]\n }\n\n onRemove() {\n // Put all the managed markers back on the map:\n for (let i = 0; i < this.markers.length; i++) {\n if (this.markers[i].getMap() !== this.activeMap) {\n this.markers[i].setMap(this.activeMap)\n }\n }\n\n // Remove all clusters:\n for (let i = 0; i < this.clusters.length; i++) {\n this.clusters[i].remove()\n }\n\n this.clusters = []\n\n // Remove map event listeners:\n for (let i = 0; i < this.listeners.length; i++) {\n google.maps.event.removeListener(this.listeners[i])\n }\n\n this.listeners = []\n\n this.activeMap = null\n\n this.ready = false\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n draw() {}\n\n setupStyles() {\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],\n width: this.imageSizes[i],\n })\n }\n }\n\n fitMapToMarkers() {\n const markers = this.getMarkers()\n\n const bounds = new google.maps.LatLngBounds()\n\n for (let i = 0; i < markers.length; i++) {\n const position = markers[i].getPosition()\n if (position) {\n bounds.extend(position)\n }\n }\n\n // @ts-ignore\n this.getMap().fitBounds(bounds)\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 this.pushMarkerTo(markers[key])\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 (let i = 0; i < markers.length; i++) {\n removed = removed || this.removeMarker_(markers[i])\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 (let i = 0; i < oldClusters.length; i++) {\n oldClusters[i].remove()\n }\n }, 0)\n }\n\n getExtendedBounds(bounds: google.maps.LatLngBounds): google.maps.LatLngBounds {\n // @ts-ignore\n const projection = this.getProjection()\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 trPix.x += this.gridSize\n trPix.y -= this.gridSize\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 blPix.x -= this.gridSize\n blPix.y += this.gridSize\n\n // Extend the bounds to contain the new bounds.\n bounds.extend(\n // Convert the pixel points back to LatLng nw\n projection.fromDivPixelToLatLng(trPix)\n )\n\n bounds.extend(\n // Convert the pixel points back to LatLng sw\n projection.fromDivPixelToLatLng(blPix)\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 (let i = 0; i < this.clusters.length; i++) {\n this.clusters[i].remove()\n }\n\n this.clusters = []\n\n // Reset the markers to not be added and to be removed from the map.\n for (let i = 0; i < this.markers.length; i++) {\n const marker = this.markers[i]\n\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 (let i = 0; i < this.clusters.length; i++) {\n cluster = this.clusters[i]\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 // 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 =\n // @ts-ignore\n this.getMap().getZoom() > 3\n ? new google.maps.LatLngBounds(\n // @ts-ignore\n this.getMap()\n .getBounds()\n .getSouthWest(),\n // @ts-ignore\n this.getMap()\n .getBounds()\n .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 bounds = 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.isAdded && this.isMarkerInBounds(marker, bounds)) {\n if (!this.ignoreHidden || (this.ignoreHidden && marker.getVisible())) {\n this.addToClosestCluster(marker)\n }\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 (let i = 0; i < this.clusters.length; i++) {\n this.clusters[i].updateIcon()\n }\n }\n }\n\n extend(obj1: any, obj2: any): any {\n return function applyExtend(object: any) {\n // eslint-disable-next-line guard-for-in\n for (const property in object.prototype) {\n // @ts-ignore\n this.prototype[property] = object.prototype[property]\n }\n\n // @ts-ignore\n return this\n }.apply(obj1, [obj2])\n }\n}\n"],"names":[],"mappings":";;;;AAMA,IAAA,WAAA,kBAAA,YAAA;IAwBE,SAAY,WAAA,CAAA,OAAgB,EAAE,MAA0B,EAAA;AACtD,QAAA,OAAO,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;AACnE,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;AACtB,QAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,eAAe,EAAE,CAAA;AACrE,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAA;AACtC,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;AACpB,QAAA,IAAI,CAAC,MAAM,GAAG,SAAS,CAAA;AACvB,QAAA,IAAI,CAAC,GAAG,GAAG,IAAI,CAAA;AACf,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;AAChB,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;AACpB,QAAA,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAA;AACjC,QAAA,IAAI,CAAC,GAAG,GAAG,EAAE,CAAA;AACb,QAAA,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;AACf,QAAA,IAAI,CAAC,KAAK,GAAG,CAAC,CAAA;QACd,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACxB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACxB,QAAA,IAAI,CAAC,SAAS,GAAG,OAAO,CAAA;AACxB,QAAA,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;AAClB,QAAA,IAAI,CAAC,cAAc,GAAG,MAAM,CAAA;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O,IAAI,CAAA;SACZ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;KACtB,CAAA;IACH,OAAC,SAAA,CAAA;AAAD,CAAC,EAAA;;;;;;"}
|
package/dist/cjs.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});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())}return t.prototype.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 o=r.getMaxZoom(),n=i.cluster.getBounds();r.getMap().fitBounds(n),setTimeout((function(){r.getMap().fitBounds(n),null!==o&&r.getMap().getZoom()>o&&r.getMap().setZoom(o+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)}))},t.prototype.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)},t.prototype.draw=function(){if(this.visible&&null!==this.div&&this.center){var t=this.getPosFromLatLng(this.center),e=t.x,i=t.y;this.div.style.top=i+"px",this.div.style.left=e+"px"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.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),o=this.getPosFromLatLng(this.center);e=null===this.sums||void 0===this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,this.div.style.cssText=this.createCss(o),t="<img alt='"+e+"' src='"+this.url+"' style='position: absolute; top: "+r+"px; left: "+s+"px; ",this.cluster.getClusterer().enableRetinaIcons||(t+="clip: rect("+-1*r+"px, "+(-1*s+this.width)+"px, "+(-1*r+this.height)+"px, "+-1*s+"px);"),t+="'>",this.div.innerHTML=t+"<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=e,this.div.style.display=""}this.visible=!0},t.prototype.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,e.className&&(this.className=this.className+" "+e.className),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"},t.prototype.setCenter=function(t){this.center=t},t.prototype.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("")},t.prototype.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())}return e.prototype.getSize=function(){return this.markers.length},e.prototype.getMarkers=function(){return this.markers},e.prototype.getCenter=function(){return this.center},e.prototype.getMap=function(){return this.map},e.prototype.getClusterer=function(){return this.markerClusterer},e.prototype.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},e.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},e.prototype.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;var e;if(this.center){if(this.averageCenter&&(e=t.getPosition())){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(e=t.getPosition())&&(this.center=e,this.calculateBounds());t.isAdded=!0,this.markers.push(t);var s=this.markers.length,r=this.markerClusterer.getMaxZoom(),o=this.map.getZoom();if(null!==r&&void 0!==o&&o>r)t.getMap()!==this.map&&t.setMap(this.map);else if(s<this.minClusterSize)t.getMap()!==this.map&&t.setMap(this.map);else if(s===this.minClusterSize)for(var n=0;n<s;n++)this.markers[n].setMap(null);else t.setMap(null);return!0},e.prototype.isMarkerInClusterBounds=function(t){if(null!==this.bounds){var e=t.getPosition();if(e)return this.bounds.contains(e)}return!1},e.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},e.prototype.updateIcon=function(){var t=this.markers.length,e=this.markerClusterer.getMaxZoom(),i=this.map.getZoom();null!==e&&void 0!==i&&i>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())},e.prototype.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){var i=t.length,s=i.toString().length,r=Math.min(s,e);return{text:i.toString(),index:r,title:""}},s=[53,56,66,78,90],r=function(){function t(e,r,o){void 0===r&&(r=[]),void 0===o&&(o={}),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=o.gridSize||60,this.minClusterSize=o.minimumClusterSize||2,this.maxZoom=o.maxZoom||null,this.styles=o.styles||[],this.title=o.title||"",this.zoomOnClick=!0,void 0!==o.zoomOnClick&&(this.zoomOnClick=o.zoomOnClick),this.averageCenter=!1,void 0!==o.averageCenter&&(this.averageCenter=o.averageCenter),this.ignoreHidden=!1,void 0!==o.ignoreHidden&&(this.ignoreHidden=o.ignoreHidden),this.enableRetinaIcons=!1,void 0!==o.enableRetinaIcons&&(this.enableRetinaIcons=o.enableRetinaIcons),this.imagePath=o.imagePath||"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",this.imageExtension=o.imageExtension||"png",this.imageSizes=o.imageSizes||s,this.calculator=o.calculator||i,this.batchSize=o.batchSize||2e3,this.batchSizeIE=o.batchSizeIE||500,this.clusterClass=o.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(r,!0),this.setMap(e)}return t.prototype.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()}))]},t.prototype.onRemove=function(){for(var t=0;t<this.markers.length;t++)this.markers[t].getMap()!==this.activeMap&&this.markers[t].setMap(this.activeMap);for(t=0;t<this.clusters.length;t++)this.clusters[t].remove();this.clusters=[];for(t=0;t<this.listeners.length;t++)google.maps.event.removeListener(this.listeners[t]);this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.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]})},t.prototype.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)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(t){this.gridSize=t},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(t){this.minClusterSize=t},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(t){this.maxZoom=t},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(t){this.styles=t},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(t){this.title=t},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(t){this.zoomOnClick=t},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(t){this.averageCenter=t},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(t){this.ignoreHidden=t},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(t){this.enableRetinaIcons=t},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(t){this.imageExtension=t},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(t){this.imagePath=t},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(t){this.imageSizes=t},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(t){this.calculator=t},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(t){this.batchSizeIE=t},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(t){this.clusterClass=t},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(t,e){this.pushMarkerTo(t),e||this.redraw()},t.prototype.addMarkers=function(t,e){for(var i in t)t.hasOwnProperty(i)&&this.pushMarkerTo(t[i]);e||this.redraw()},t.prototype.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)},t.prototype.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)},t.prototype.removeMarker=function(t,e){var i=this.removeMarker_(t);return!e&&i&&this.repaint(),i},t.prototype.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},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.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)},t.prototype.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},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(t){for(var e=0;e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(e=0;e<this.markers.length;e++){var i=this.markers[e];i.isAdded=!1,t&&i.setMap(null)}},t.prototype.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},t.prototype.isMarkerInBounds=function(t,e){var i=t.getPosition();return!!i&&e.contains(i)},t.prototype.addToClosestCluster=function(t){for(var i,s=4e4,r=null,o=0;o<this.clusters.length;o++){var n=(i=this.clusters[o]).getCenter(),a=t.getPosition();if(n&&a){var h=this.distanceBetweenPoints(n,a);h<s&&(s=h,r=i)}}r&&r.isMarkerInClusterBounds(t)?r.addMarker(t):((i=new e(this)).addMarker(t),this.clusters.push(i))},t.prototype.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),o=t;o<r;o++){var n=this.markers[o];!n.isAdded&&this.isMarkerInBounds(n,s)&&(!this.ignoreHidden||this.ignoreHidden&&n.getVisible())&&this.addToClosestCluster(n)}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(o=0;o<this.clusters.length;o++)this.clusters[o].updateIcon()}}},t.prototype.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;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(){function t(e,i){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,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())}return t.prototype.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 o=r.getMaxZoom(),n=i.cluster.getBounds();r.getMap().fitBounds(n),setTimeout((function(){r.getMap().fitBounds(n),null!==o&&r.getMap().getZoom()>o&&r.getMap().setZoom(o+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)}))},t.prototype.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)},t.prototype.draw=function(){if(this.visible&&null!==this.div&&this.center){var t=this.getPosFromLatLng(this.center),e=t.x,i=t.y;this.div.style.top=i+"px",this.div.style.left=e+"px"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var t;if(this.div&&this.center){var e="",i=this.backgroundPosition.split(" "),s=parseInt(i[0].replace(/^\s+|\s+$/g,""),10),r=parseInt(i[1].replace(/^\s+|\s+$/g,""),10),o=this.getPosFromLatLng(this.center);e=null===this.sums||void 0===this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,this.div.style.cursor="pointer",this.div.style.position="absolute",this.div.style.top="".concat(o.y,"px"),this.div.style.left="".concat(o.x,"px"),this.div.style.width="".concat(this.width,"px"),this.div.style.height="".concat(this.height,"px");var n=document.createElement("img");n.alt=e,n.src=this.url,n.style.position="absolute",n.style.top="".concat(r,"px"),n.style.left="".concat(s,"px"),this.cluster.getClusterer().enableRetinaIcons||(n.style.clip="rect(-".concat(r,"px, -").concat(s+this.width,"px, -").concat(r+this.height,", -").concat(s,")"));var a=document.createElement("div");a.style.position="absolute",a.style.top="".concat(this.anchorText[0],"px"),a.style.left="".concat(this.anchorText[1],"px"),a.style.color=this.textColor,a.style.fontSize="".concat(this.textSize,"px"),a.style.fontFamily=this.fontFamily,a.style.fontWeight=this.fontWeight,a.style.fontStyle=this.fontStyle,a.style.textDecoration=this.textDecoration,a.style.textAlign="center",a.style.width="".concat(this.width,"px"),a.style.lineHeight="".concat(this.height,"px"),a.innerText="".concat(null===(t=this.sums)||void 0===t?void 0:t.text),this.div.innerHTML="",this.div.appendChild(n),this.div.appendChild(a),this.div.title=e,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(t){this.sums=t;var e=this.cluster.getClusterer().getStyles(),i=e[Math.min(e.length-1,Math.max(0,t.index-1))];this.url=i.url,this.height=i.height,this.width=i.width,i.className&&(this.className="".concat(this.clusterClassName," ").concat(i.className)),this.anchorText=i.anchorText||[0,0],this.anchorIcon=i.anchorIcon||[this.height/2,this.width/2],this.textColor=i.textColor||"black",this.textSize=i.textSize||11,this.textDecoration=i.textDecoration||"none",this.fontWeight=i.fontWeight||"bold",this.fontStyle=i.fontStyle||"normal",this.fontFamily=i.fontFamily||"Arial,sans-serif",this.backgroundPosition=i.backgroundPosition||"0 0"},t.prototype.setCenter=function(t){this.center=t},t.prototype.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())}return e.prototype.getSize=function(){return this.markers.length},e.prototype.getMarkers=function(){return this.markers},e.prototype.getCenter=function(){return this.center},e.prototype.getMap=function(){return this.map},e.prototype.getClusterer=function(){return this.markerClusterer},e.prototype.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},e.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},e.prototype.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;var e;if(this.center){if(this.averageCenter&&(e=t.getPosition())){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(e=t.getPosition())&&(this.center=e,this.calculateBounds());t.isAdded=!0,this.markers.push(t);var s=this.markers.length,r=this.markerClusterer.getMaxZoom(),o=this.map.getZoom();if(null!==r&&void 0!==o&&o>r)t.getMap()!==this.map&&t.setMap(this.map);else if(s<this.minClusterSize)t.getMap()!==this.map&&t.setMap(this.map);else if(s===this.minClusterSize)for(var n=0;n<s;n++)this.markers[n].setMap(null);else t.setMap(null);return!0},e.prototype.isMarkerInClusterBounds=function(t){if(null!==this.bounds){var e=t.getPosition();if(e)return this.bounds.contains(e)}return!1},e.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},e.prototype.updateIcon=function(){var t=this.markers.length,e=this.markerClusterer.getMaxZoom(),i=this.map.getZoom();null!==e&&void 0!==i&&i>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())},e.prototype.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){var i=t.length,s=i.toString().length,r=Math.min(s,e);return{text:i.toString(),index:r,title:""}},s=[53,56,66,78,90],r=function(){function t(e,r,o){void 0===r&&(r=[]),void 0===o&&(o={}),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=o.gridSize||60,this.minClusterSize=o.minimumClusterSize||2,this.maxZoom=o.maxZoom||null,this.styles=o.styles||[],this.title=o.title||"",this.zoomOnClick=!0,void 0!==o.zoomOnClick&&(this.zoomOnClick=o.zoomOnClick),this.averageCenter=!1,void 0!==o.averageCenter&&(this.averageCenter=o.averageCenter),this.ignoreHidden=!1,void 0!==o.ignoreHidden&&(this.ignoreHidden=o.ignoreHidden),this.enableRetinaIcons=!1,void 0!==o.enableRetinaIcons&&(this.enableRetinaIcons=o.enableRetinaIcons),this.imagePath=o.imagePath||"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",this.imageExtension=o.imageExtension||"png",this.imageSizes=o.imageSizes||s,this.calculator=o.calculator||i,this.batchSize=o.batchSize||2e3,this.batchSizeIE=o.batchSizeIE||500,this.clusterClass=o.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(r,!0),this.setMap(e)}return t.prototype.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()}))]},t.prototype.onRemove=function(){for(var t=0;t<this.markers.length;t++)this.markers[t].getMap()!==this.activeMap&&this.markers[t].setMap(this.activeMap);for(t=0;t<this.clusters.length;t++)this.clusters[t].remove();this.clusters=[];for(t=0;t<this.listeners.length;t++)google.maps.event.removeListener(this.listeners[t]);this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.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]})},t.prototype.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)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(t){this.gridSize=t},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(t){this.minClusterSize=t},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(t){this.maxZoom=t},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(t){this.styles=t},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(t){this.title=t},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(t){this.zoomOnClick=t},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(t){this.averageCenter=t},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(t){this.ignoreHidden=t},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(t){this.enableRetinaIcons=t},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(t){this.imageExtension=t},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(t){this.imagePath=t},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(t){this.imageSizes=t},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(t){this.calculator=t},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(t){this.batchSizeIE=t},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(t){this.clusterClass=t},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(t,e){this.pushMarkerTo(t),e||this.redraw()},t.prototype.addMarkers=function(t,e){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&this.pushMarkerTo(t[i]);e||this.redraw()},t.prototype.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)},t.prototype.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)},t.prototype.removeMarker=function(t,e){var i=this.removeMarker_(t);return!e&&i&&this.repaint(),i},t.prototype.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},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.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)},t.prototype.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},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(t){for(var e=0;e<this.clusters.length;e++)this.clusters[e].remove();this.clusters=[];for(e=0;e<this.markers.length;e++){var i=this.markers[e];i.isAdded=!1,t&&i.setMap(null)}},t.prototype.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},t.prototype.isMarkerInBounds=function(t,e){var i=t.getPosition();return!!i&&e.contains(i)},t.prototype.addToClosestCluster=function(t){for(var i,s=4e4,r=null,o=0;o<this.clusters.length;o++){var n=(i=this.clusters[o]).getCenter(),a=t.getPosition();if(n&&a){var h=this.distanceBetweenPoints(n,a);h<s&&(s=h,r=i)}}r&&r.isMarkerInClusterBounds(t)?r.addMarker(t):((i=new e(this)).addMarker(t),this.clusters.push(i))},t.prototype.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),o=t;o<r;o++){var n=this.markers[o];!n.isAdded&&this.isMarkerInBounds(n,s)&&(!this.ignoreHidden||this.ignoreHidden&&n.getVisible())&&this.addToClosestCluster(n)}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(o=0;o<this.clusters.length;o++)this.clusters[o].updateIcon()}}},t.prototype.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;
|
|
2
2
|
//# sourceMappingURL=cjs.min.js.map
|