{"version":3,"file":"markerclusterer.min.js","sources":["markerclusterer.min.js"],"sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\t// ==ClosureCompiler==\n\t// @compilation_level ADVANCED_OPTIMIZATIONS\n\t// @externs_url https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/maps/google_maps_api_v3.js\n\t// ==/ClosureCompiler==\n\n\t/**\r\n\t * @name Gmaps MarkerClusterer for Google Maps v3\r\n\t * @version version 1.2.0\r\n\t * @author Luke Mahe\r\n\t * @author Sebastian Hösl \r\n\t * @fileoverview\r\n\t * The library creates and manages per-zoom-level clusters for large amounts of\r\n\t * markers.\r\n\t * This is a v3 implementation of the v2 MarkerClusterer\r\n\t * {@link http://gmaps-utility-library-dev.googlecode.com/svn/tags/markerclusterer/}\r\n\t * >.\r\n\t */\n\n\t/**\r\n\t * @license\r\n\t *\r\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n\t * you may not use this file except in compliance with the License.\r\n\t * You may obtain a copy of the License at\r\n\t *\r\n\t * http://www.apache.org/licenses/LICENSE-2.0\r\n\t *\r\n\t * Unless required by applicable law or agreed to in writing, software\r\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n\t * See the License for the specific language governing permissions and\r\n\t * limitations under the License.\r\n\t */\n\n\t/**\r\n\t * A Marker Clusterer that clusters markers.\r\n\t *\r\n\t * @param {google.maps.Map} map The Google map to attach to.\r\n\t * @param {Array.=} opt_markers Optional markers to add to\r\n\t * the cluster.\r\n\t * @param {Object=} opt_options support the following options:\r\n\t * 'gridSize': (number) The grid size of a cluster in pixels.\r\n\t * 'maxZoom': (number) The maximum zoom level that a marker can be part of a\r\n\t * cluster.\r\n\t * 'zoomOnClick': (boolean) Whether the default behaviour of clicking on a\r\n\t * cluster is to zoom into it.\r\n\t * 'averageCenter': (boolean) Whether the center of each cluster should be\r\n\t * the average of all markers in the cluster.\r\n\t * 'minimumClusterSize': (number) The minimum number of markers to be in a\r\n\t * cluster before the markers are hidden and a count\r\n\t * is shown.\r\n\t * 'ignoreHiddenMarkers': (boolean) Whether to ignore markers that are not\r\n\t * visible or count and cluster them anyway\r\n\t * 'styles': (Array) An array of objects with these properties:\r\n\t * 'url': (string) The image url.\r\n\t * 'height': (number) The image height.\r\n\t * 'width': (number) The image width.\r\n\t * 'anchor': (Array) The anchor position of the label text.\r\n\t * 'textColor': (string) The text color.\r\n\t * 'textSize': (number) The text size.\r\n\t * 'backgroundPosition': (string) The position of the backgound x, y.\r\n\t * 'iconAnchor': (Array) The anchor position of the icon x, y.\r\n\t * 'cssClass': (string) One or more CSS class for styling this marker.\r\n\t * 'onMouseoverCluster': (function) The event handler used for onmouseover\r\n\t * each cluster\r\n\t * 'onMouseoutCluster': (function) The event handler used for onmouseout\r\n\t * each cluster\r\n\t * 'drawCluster': (function) Custom draw method for ClusterIcon\r\n\t * 'hideCluster': (function) Custom hide method for ClusterIcon\r\n\t * 'showCluster': (function) Custom hide method for ClusterIcon\r\n\t * 'onAddCluster': (function) Custom onAdd method for ClusterIcon\r\n\t * 'onRemoveCluster': (function) Custom onRemove method for ClusterIcon\r\n\t * @constructor\r\n\t * @extends google.maps.OverlayView\r\n\t */\n\tfunction MarkerClusterer(map, opt_markers, opt_options) {\n\t // MarkerClusterer implements google.maps.OverlayView interface. We use the\n\t // extend function to extend MarkerClusterer with google.maps.OverlayView\n\t // because it might not always be available when the code is defined so we\n\t // look for it at the last possible moment. If it doesn't exist now then\n\t // there is no point going ahead :)\n\t this.extend(MarkerClusterer, google.maps.OverlayView);\n\t this.map_ = map;\n\n\t /**\r\n\t * @type {Array.}\r\n\t * @private\r\n\t */\n\t this.markers_ = [];\n\n\t /**\r\n\t * @type {Array.}\r\n\t */\n\t this.clusters_ = [];\n\n\t /**\r\n\t * @type {Object} holding information about every markers cluster\r\n\t */\n\t this.markersCluster_ = {};\n\n\t /**\r\n\t * @type {Number} Unique markers ID\r\n\t */\n\t this.markersUniqueID = 1;\n\n\t this.sizes = [53, 56, 66, 78, 90];\n\n\t /**\r\n\t * @private\r\n\t */\n\t this.styles_ = [];\n\n\t /**\r\n\t * @private\r\n\t */\n\t this.cssClass_ = '';\n\n\t /**\r\n\t * @private\r\n\t * @type {string} Set a default Cluster Class\r\n\t */\n\t this.cssDefaultClass_ = 'cluster';\n\n\t /**\r\n\t * @private\r\n\t */\n\t this.setIndex_ = 0;\n\n\t /**\r\n\t * @type {boolean}\r\n\t * @private\r\n\t */\n\t this.ready_ = false;\n\n\t var options = opt_options || {};\n\n\t /**\r\n\t * @type {number}\r\n\t * @private\r\n\t */\n\t this.gridSize_ = options['gridSize'] !== undefined ? options['gridSize'] : 60;\n\n\t /**\r\n\t * @private\r\n\t */\n\t this.minClusterSize_ = options['minimumClusterSize'] || 2;\n\n\t /**\r\n\t * @type {boolean}\r\n\t * @private\r\n\t */\n\t this.ignoreHiddenMarkers_ = options['ignoreHiddenMarkers'] || false;\n\n\t /**\r\n\t * @type {?number}\r\n\t * @private\r\n\t */\n\t this.maxZoom_ = options['maxZoom'] || null;\n\n\t this.styles_ = options['styles'] || [];\n\n\t this.cssClass_ = options['cssClass'] || null;\n\n\t /**\r\n\t * @type {string}\r\n\t * @private\r\n\t */\n\t this.imagePath_ = options['imagePath'] || this.MARKER_CLUSTER_IMAGE_PATH_;\n\n\t /**\r\n\t * @type {string}\r\n\t * @private\r\n\t */\n\t this.imageExtension_ = options['imageExtension'] || this.MARKER_CLUSTER_IMAGE_EXTENSION_;\n\n\t /**\r\n\t * @type {boolean}\r\n\t * @private\r\n\t */\n\t this.zoomOnClick_ = true;\n\n\t if (options['zoomOnClick'] != undefined) {\n\t this.zoomOnClick_ = options['zoomOnClick'];\n\t }\n\n\t /**\r\n\t * @type {boolean}\r\n\t * @private\r\n\t */\n\t this.averageCenter_ = false;\n\n\t if (options['averageCenter'] != undefined) {\n\t this.averageCenter_ = options['averageCenter'];\n\t }\n\n\t /**\r\n\t * @type {function}\r\n\t * @private\r\n\t */\n\t this.onMouseoverCluster_ = options['onMouseoverCluster'];\n\n\t /**\r\n\t * @type {function}\r\n\t * @private\r\n\t */\n\t this.onMouseoutCluster_ = options['onMouseoutCluster'];\n\n\t /**\r\n\t * @type {function}\r\n\t * @private\r\n\t */\n\t this.drawCluster_ = options['drawCluster'];\n\n\t /**\r\n\t * @type {function}\r\n\t * @private\r\n\t */\n\t this.hideCluster_ = options['hideCluster'];\n\n\t /**\r\n\t * @type {function}\r\n\t * @private\r\n\t */\n\t this.showCluster_ = options['showCluster'];\n\n\t /**\r\n\t * @type {function}\r\n\t * @private\r\n\t */\n\t this.onAddCluster_ = options['onAddCluster'];\n\n\t /**\r\n\t * @type {function}\r\n\t * @private\r\n\t */\n\t this.onRemoveCluster_ = options['onRemoveCluster'];\n\n\t this.setupStyles_();\n\n\t this.setMap(map);\n\n\t /**\r\n\t * @type {number}\r\n\t * @private\r\n\t */\n\t this.prevZoom_ = this.map_.getZoom();\n\n\t // Add the map event listeners\n\t var that = this;\n\t google.maps.event.addListener(this.map_, 'zoom_changed', function () {\n\t var zoom = that.map_.getZoom();\n\n\t if (that.prevZoom_ != zoom) {\n\t that.prevZoom_ = zoom;\n\t that.resetViewport();\n\t }\n\t });\n\n\t google.maps.event.addListener(this.map_, 'idle', function () {\n\t that.redraw();\n\t });\n\n\t // Finally, add the markers\n\t if (opt_markers && opt_markers.length) {\n\t this.addMarkers(opt_markers, false);\n\t }\n\t}\n\n\t/**\r\n\t * The marker cluster image path.\r\n\t *\r\n\t * @type {string}\r\n\t * @private\r\n\t */\n\tMarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ = 'https://raw.githubusercontent.com/gmaps-marker-clusterer/gmaps-marker-clusterer/master/images/m';\n\n\t/**\r\n\t * The marker cluster image path.\r\n\t *\r\n\t * @type {string}\r\n\t * @private\r\n\t */\n\tMarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_ = 'png';\n\n\t/**\r\n\t * Extends a objects prototype by anothers.\r\n\t *\r\n\t * @param {Object} obj1 The object to be extended.\r\n\t * @param {Object} obj2 The object to extend with.\r\n\t * @return {Object} The new extended object.\r\n\t * @ignore\r\n\t */\n\tMarkerClusterer.prototype.extend = function (obj1, obj2) {\n\t return function (object) {\n\t for (var property in object.prototype) {\n\t this.prototype[property] = object.prototype[property];\n\t }\n\t return this;\n\t }.apply(obj1, [obj2]);\n\t};\n\n\t/**\r\n\t * Implementaion of the interface method.\r\n\t * @ignore\r\n\t */\n\tMarkerClusterer.prototype.onAdd = function () {\n\t this.setReady_(true);\n\t};\n\n\t/**\r\n\t * Implementaion of the interface method.\r\n\t * @ignore\r\n\t */\n\tMarkerClusterer.prototype.draw = function () {};\n\n\t/**\r\n\t * Sets up the styles object.\r\n\t *\r\n\t * @private\r\n\t */\n\tMarkerClusterer.prototype.setupStyles_ = function () {\n\t if (this.styles_.length) {\n\t return;\n\t }\n\n\t for (var i = 0, size; size = this.sizes[i]; i++) {\n\t var url = '';\n\t if (typeof this.imagePath_ === 'function') {\n\t url = this.imagePath_(i, size);\n\t } else {\n\t url = this.imagePath_ + (i + 1) + '.' + this.imageExtension_;\n\t }\n\t this.styles_.push({\n\t url: url,\n\t height: size,\n\t width: size\n\t });\n\t }\n\t};\n\n\t/**\r\n\t * Fit the map to the bounds of the markers in the clusterer.\r\n\t */\n\tMarkerClusterer.prototype.fitMapToMarkers = function () {\n\t var markers = this.getMarkers();\n\t var bounds = new google.maps.LatLngBounds();\n\t for (var i = 0, marker; marker = markers[i]; i++) {\n\t bounds.extend(marker.getPosition());\n\t }\n\n\t this.map_.fitBounds(bounds);\n\t};\n\n\t/**\r\n\t * Sets the styles.\r\n\t *\r\n\t * @param {Object} styles The style to set.\r\n\t */\n\tMarkerClusterer.prototype.setStyles = function (styles) {\n\t this.styles_ = styles;\n\t};\n\n\t/**\r\n\t * Gets the styles.\r\n\t *\r\n\t * @return {Object} The styles object.\r\n\t */\n\tMarkerClusterer.prototype.getStyles = function () {\n\t return this.styles_;\n\t};\n\n\t/**\r\n\t * Whether zoom on click is set.\r\n\t *\r\n\t * @return {boolean} True if zoomOnClick_ is set.\r\n\t */\n\tMarkerClusterer.prototype.isZoomOnClick = function () {\n\t return this.zoomOnClick_;\n\t};\n\n\t/**\r\n\t * Whether average center is set.\r\n\t *\r\n\t * @return {boolean} True if averageCenter_ is set.\r\n\t */\n\tMarkerClusterer.prototype.isAverageCenter = function () {\n\t return this.averageCenter_;\n\t};\n\n\t/**\r\n\t * Returns the array of markers in the clusterer.\r\n\t *\r\n\t * @return {Array.} The markers.\r\n\t */\n\tMarkerClusterer.prototype.getMarkers = function () {\n\t return this.markers_;\n\t};\n\n\t/**\r\n\t * Returns the number of markers in the clusterer\r\n\t *\r\n\t * @return {Number} The number of markers.\r\n\t */\n\tMarkerClusterer.prototype.getTotalMarkers = function () {\n\t return this.markers_.length;\n\t};\n\n\t/**\r\n\t * Sets the max zoom for the clusterer.\r\n\t *\r\n\t * @param {number} maxZoom The max zoom level.\r\n\t */\n\tMarkerClusterer.prototype.setMaxZoom = function (maxZoom) {\n\t this.maxZoom_ = maxZoom;\n\t};\n\n\t/**\r\n\t * Gets the max zoom for the clusterer.\r\n\t *\r\n\t * @return {number} The max zoom level.\r\n\t */\n\tMarkerClusterer.prototype.getMaxZoom = function () {\n\t return this.maxZoom_;\n\t};\n\n\t/**\r\n\t * Gets marker's cluster object based on given marker\r\n\t *\r\n\t * @param {google.maps.Marker} marker\r\n\t *\r\n\t * @return {Cluster}\r\n\t */\n\tMarkerClusterer.prototype.getMarkersCluster = function (marker) {\n\t return this.clusters_[this.markersCluster_[marker.uniqueID]];\n\t};\n\n\t/**\r\n\t * The function for calculating the cluster icon image.\r\n\t *\r\n\t * @param {Array.} markers The markers in the clusterer.\r\n\t * @param {number} numStyles The number of styles available.\r\n\t * @return {Object} A object properties: 'text' (string) and 'index' (number).\r\n\t * @private\r\n\t */\n\tMarkerClusterer.prototype.calculator_ = function (markers, numStyles) {\n\t var index = 0;\n\t var count = markers.length;\n\t var dv = count;\n\t while (dv !== 0) {\n\t dv = parseInt(dv / 10, 10);\n\t index++;\n\t }\n\n\t index = Math.min(index, numStyles);\n\n\t return {\n\t text: count,\n\t index: index\n\t };\n\t};\n\n\t/**\r\n\t * Set the calculator function.\r\n\t *\r\n\t * @param {function(Array, number)} calculator The function to set as the\r\n\t * calculator. The function should return a object properties:\r\n\t * 'text' (string) and 'index' (number).\r\n\t *\r\n\t */\n\tMarkerClusterer.prototype.setCalculator = function (calculator) {\n\t this.calculator_ = calculator;\n\t};\n\n\t/**\r\n\t * Get the calculator function.\r\n\t *\r\n\t * @return {function(Array, number)} the calculator function.\r\n\t */\n\tMarkerClusterer.prototype.getCalculator = function () {\n\t return this.calculator_;\n\t};\n\n\t/**\r\n\t * Add an array of markers to the clusterer.\r\n\t *\r\n\t * @param {Array.} markers The markers to add.\r\n\t * @param {boolean=} opt_nodraw Whether to redraw the clusters.\r\n\t */\n\tMarkerClusterer.prototype.addMarkers = function (markers, opt_nodraw) {\n\t for (var i = 0, marker; marker = markers[i]; i++) {\n\t this.pushMarkerTo_(marker);\n\t }\n\t if (!opt_nodraw) {\n\t this.redraw();\n\t }\n\t};\n\n\t/**\r\n\t * Pushes a marker to the clusterer.\r\n\t *\r\n\t * @param {google.maps.Marker} marker The marker to add.\r\n\t * @private\r\n\t */\n\tMarkerClusterer.prototype.pushMarkerTo_ = function (marker) {\n\t marker.isAdded = false;\n\t if (marker['draggable']) {\n\t // If the marker is draggable add a listener so we update the clusters on\n\t // the drag end.\n\t var that = this;\n\t google.maps.event.addListener(marker, 'dragend', function () {\n\t marker.isAdded = false;\n\t that.repaint();\n\t });\n\t }\n\t marker.uniqueID = this.markersUniqueID;\n\t this.markersUniqueID++;\n\t this.markers_.push(marker);\n\t};\n\n\t/**\r\n\t * Adds a marker to the clusterer and redraws if needed.\r\n\t *\r\n\t * @param {google.maps.Marker} marker The marker to add.\r\n\t * @param {boolean=} opt_nodraw Whether to redraw the clusters.\r\n\t */\n\tMarkerClusterer.prototype.addMarker = function (marker, opt_nodraw) {\n\t this.pushMarkerTo_(marker);\n\t if (!opt_nodraw) {\n\t this.redraw();\n\t }\n\t};\n\n\t/**\r\n\t * Removes a marker and returns true if removed, false if not\r\n\t *\r\n\t * @param {google.maps.Marker} marker The marker to remove\r\n\t * @return {boolean} Whether the marker was removed or not\r\n\t * @private\r\n\t */\n\tMarkerClusterer.prototype.removeMarker_ = function (marker) {\n\t var index = -1;\n\t if (this.markers_.indexOf) {\n\t index = this.markers_.indexOf(marker);\n\t } else {\n\t for (var i = 0, m; m = this.markers_[i]; i++) {\n\t if (m == marker) {\n\t index = i;\n\t break;\n\t }\n\t }\n\t }\n\n\t if (index == -1) {\n\t // Marker is not in our list of markers.\n\t return false;\n\t }\n\n\t marker.setMap(null);\n\n\t this.markers_.splice(index, 1);\n\t delete this.markersCluster_[marker.uniqueID];\n\n\t return true;\n\t};\n\n\t/**\r\n\t * Remove a marker from the cluster.\r\n\t *\r\n\t * @param {google.maps.Marker} marker The marker to remove.\r\n\t * @param {boolean=} opt_nodraw Optional boolean to force no redraw.\r\n\t * @return {boolean} True if the marker was removed.\r\n\t */\n\tMarkerClusterer.prototype.removeMarker = function (marker, opt_nodraw) {\n\t var removed = this.removeMarker_(marker);\n\n\t if (!opt_nodraw && removed) {\n\t this.resetViewport();\n\t this.redraw();\n\t return true;\n\t } else {\n\t return false;\n\t }\n\t};\n\n\t/**\r\n\t * Removes an array of markers from the cluster.\r\n\t *\r\n\t * @param {Array.} markers The markers to remove.\r\n\t * @param {boolean=} opt_nodraw Optional boolean to force no redraw.\r\n\t */\n\tMarkerClusterer.prototype.removeMarkers = function (markers, opt_nodraw) {\n\t var removed = false;\n\n\t for (var i = markers.length; i >= 0; i--) {\n\t var marker = markers[i];\n\t var r = this.removeMarker_(marker);\n\t removed = removed || r;\n\t }\n\n\t if (!opt_nodraw && removed) {\n\t this.resetViewport();\n\t this.redraw();\n\t return true;\n\t }\n\t};\n\n\t/**\r\n\t * Sets the clusterer's ready state.\r\n\t *\r\n\t * @param {boolean} ready The state.\r\n\t * @private\r\n\t */\n\tMarkerClusterer.prototype.setReady_ = function (ready) {\n\t if (!this.ready_) {\n\t this.ready_ = ready;\n\t this.createClusters_();\n\t }\n\t};\n\n\t/**\r\n\t * Returns the number of clusters in the clusterer.\r\n\t *\r\n\t * @return {number} The number of clusters.\r\n\t */\n\tMarkerClusterer.prototype.getTotalClusters = function () {\n\t return this.clusters_.length;\n\t};\n\n\t/**\r\n\t * Returns the list of clusters in the clusterer\r\n\t *\r\n\t * @return {Array.} The list of clusters.\r\n\t */\n\tMarkerClusterer.prototype.getClusters = function () {\n\t return this.clusters_;\n\t};\n\n\t/**\r\n\t * Returns the google map that the clusterer is associated with.\r\n\t *\r\n\t * @return {google.maps.Map} The map.\r\n\t */\n\tMarkerClusterer.prototype.getMap = function () {\n\t return this.map_;\n\t};\n\n\t/**\r\n\t * Sets the google map that the clusterer is associated with.\r\n\t *\r\n\t * @param {google.maps.Map} map The map.\r\n\t */\n\tMarkerClusterer.prototype.setMap = function (map) {\n\t this.map_ = map;\n\t};\n\n\t/**\r\n\t * Returns the size of the grid.\r\n\t *\r\n\t * @return {number} The grid size.\r\n\t */\n\tMarkerClusterer.prototype.getGridSize = function () {\n\t return this.gridSize_;\n\t};\n\n\t/**\r\n\t * Sets the size of the grid.\r\n\t *\r\n\t * @param {number} size The grid size.\r\n\t */\n\tMarkerClusterer.prototype.setGridSize = function (size) {\n\t this.gridSize_ = size;\n\t};\n\n\t/**\r\n\t * Returns the min cluster size.\r\n\t *\r\n\t * @return {number} The grid size.\r\n\t */\n\tMarkerClusterer.prototype.getMinClusterSize = function () {\n\t return this.minClusterSize_;\n\t};\n\n\t/**\r\n\t * Sets the min cluster size.\r\n\t *\r\n\t * @param {number} size The grid size.\r\n\t */\n\tMarkerClusterer.prototype.setMinClusterSize = function (size) {\n\t this.minClusterSize_ = size;\n\t};\n\n\t/**\r\n\t * Extends a bounds object by the grid size.\r\n\t *\r\n\t * @param {google.maps.LatLngBounds} bounds The bounds to extend.\r\n\t * @return {google.maps.LatLngBounds} The extended bounds.\r\n\t */\n\tMarkerClusterer.prototype.getExtendedBounds = function (bounds) {\n\t var projection = this.getProjection();\n\n\t // Turn the bounds into latlng.\n\t var tr = new google.maps.LatLng(bounds.getNorthEast().lat(), bounds.getNorthEast().lng());\n\t var bl = new google.maps.LatLng(bounds.getSouthWest().lat(), bounds.getSouthWest().lng());\n\n\t // Convert the points to pixels and the extend out by the grid size.\n\t var trPix = projection.fromLatLngToDivPixel(tr);\n\t trPix.x += this.gridSize_;\n\t trPix.y -= this.gridSize_;\n\n\t var blPix = projection.fromLatLngToDivPixel(bl);\n\t blPix.x -= this.gridSize_;\n\t blPix.y += this.gridSize_;\n\n\t // Convert the pixel points back to LatLng\n\t var ne = projection.fromDivPixelToLatLng(trPix);\n\t var sw = projection.fromDivPixelToLatLng(blPix);\n\n\t // Extend the bounds to contain the new bounds.\n\t bounds.extend(ne);\n\t bounds.extend(sw);\n\n\t return bounds;\n\t};\n\n\t/**\r\n\t * Determins if a marker is contained in a bounds.\r\n\t *\r\n\t * @param {google.maps.Marker} marker The marker to check.\r\n\t * @param {google.maps.LatLngBounds} bounds The bounds to check against.\r\n\t * @return {boolean} True if the marker is in the bounds.\r\n\t * @private\r\n\t */\n\tMarkerClusterer.prototype.isMarkerInBounds_ = function (marker, bounds) {\n\t return bounds.contains(marker.getPosition());\n\t};\n\n\t/**\r\n\t * Clears all clusters and markers from the clusterer.\r\n\t */\n\tMarkerClusterer.prototype.clearMarkers = function () {\n\t this.resetViewport(true);\n\n\t // Set the markers a empty array.\n\t this.markers_ = [];\n\t this.markersCluster_ = {};\n\t this.markersUniqueID = 1;\n\t};\n\n\t/**\r\n\t * Clears all existing clusters and recreates them.\r\n\t * @param {boolean} opt_hide To also hide the marker.\r\n\t */\n\tMarkerClusterer.prototype.resetViewport = function (opt_hide) {\n\t // Remove all the clusters\n\t for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {\n\t cluster.remove();\n\t }\n\n\t // Reset the markers to not be added and to be invisible.\n\t for (var i = 0, marker; marker = this.markers_[i]; i++) {\n\t marker.isAdded = false;\n\t if (opt_hide) {\n\t marker.setMap(null);\n\t }\n\t }\n\n\t this.clusters_ = [];\n\t this.markersCluster_ = {};\n\t this.markersUniqueID = 1;\n\t};\n\n\t/**\r\n\t *\r\n\t */\n\tMarkerClusterer.prototype.repaint = function () {\n\t var oldClusters = this.clusters_.slice();\n\t this.clusters_.length = 0;\n\t this.resetViewport();\n\t this.redraw();\n\n\t // Remove the old clusters.\n\t // Do it in a timeout so the other clusters have been drawn first.\n\t window.setTimeout(function () {\n\t for (var i = 0, cluster; cluster = oldClusters[i]; i++) {\n\t cluster.remove();\n\t }\n\t }, 0);\n\t};\n\n\t/**\r\n\t * Redraws the clusters.\r\n\t */\n\tMarkerClusterer.prototype.redraw = function () {\n\t this.createClusters_();\n\t};\n\n\t/**\r\n\t * Calculates the distance between two latlng locations in km.\r\n\t * @see http://www.movable-type.co.uk/scripts/latlong.html\r\n\t *\r\n\t * @param {google.maps.LatLng} p1 The first lat lng point.\r\n\t * @param {google.maps.LatLng} p2 The second lat lng point.\r\n\t * @return {number} The distance between the two points in km.\r\n\t * @private\r\n\t */\n\tMarkerClusterer.prototype.distanceBetweenPoints_ = function (p1, p2) {\n\t if (!p1 || !p2) {\n\t return 0;\n\t }\n\n\t var R = 6371; // Radius of the Earth in km\n\t var dLat = (p2.lat() - p1.lat()) * Math.PI / 180;\n\t var dLon = (p2.lng() - p1.lng()) * Math.PI / 180;\n\t var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) * Math.sin(dLon / 2) * Math.sin(dLon / 2);\n\t var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\t var d = R * c;\n\t return d;\n\t};\n\n\t/**\r\n\t * Add a marker to a cluster, or creates a new cluster.\r\n\t *\r\n\t * @param {google.maps.Marker} marker The marker to add.\r\n\t * @private\r\n\t */\n\tMarkerClusterer.prototype.addToClosestCluster_ = function (marker) {\n\t var distance = 40000; // Some large number\n\t var clusterToAddTo = null;\n\t var pos = marker.getPosition();\n\t var clusterIndex = null;\n\t for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {\n\t var center = cluster.getCenter();\n\t if (center) {\n\t var d = this.distanceBetweenPoints_(center, marker.getPosition());\n\t if (d < distance) {\n\t distance = d;\n\t clusterToAddTo = cluster;\n\t clusterIndex = i;\n\t }\n\t }\n\t }\n\n\t if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\n\t clusterToAddTo.addMarker(marker);\n\t } else {\n\t var cluster = new Cluster(this);\n\t cluster.addMarker(marker);\n\t this.clusters_.push(cluster);\n\t clusterIndex = this.clusters_.length - 1;\n\t }\n\n\t if (marker.isAdded) {\n\t this.markersCluster_[marker.uniqueID] = clusterIndex;\n\t }\n\t};\n\n\t/**\r\n\t * Creates the clusters.\r\n\t *\r\n\t * @private\r\n\t */\n\tMarkerClusterer.prototype.createClusters_ = function () {\n\t if (!this.ready_) {\n\t return;\n\t }\n\n\t // Get our current map view bounds.\n\t // Create a new bounds object so we don't affect the map.\n\t var mapBounds = new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(), this.map_.getBounds().getNorthEast());\n\t var bounds = this.getExtendedBounds(mapBounds);\n\n\t for (var i = 0, marker; marker = this.markers_[i]; i++) {\n\t if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds) && (!this.ignoreHiddenMarkers_ || marker.getVisible())) {\n\t this.addToClosestCluster_(marker);\n\t }\n\t }\n\t};\n\n\t/**\r\n\t * A cluster that contains markers.\r\n\t *\r\n\t * @param {MarkerClusterer} markerClusterer The markerclusterer that this\r\n\t * cluster is associated with.\r\n\t * @constructor\r\n\t * @ignore\r\n\t */\n\tfunction Cluster(markerClusterer) {\n\t this.markerClusterer_ = markerClusterer;\n\t this.map_ = markerClusterer.getMap();\n\t this.gridSize_ = markerClusterer.getGridSize();\n\t this.minClusterSize_ = markerClusterer.getMinClusterSize();\n\t this.averageCenter_ = markerClusterer.isAverageCenter();\n\t this.center_ = null;\n\t this.markers_ = [];\n\t this.bounds_ = null;\n\t this.clusterIcon_ = new ClusterIcon(this, markerClusterer.getStyles(), markerClusterer.getGridSize());\n\t}\n\n\t/**\r\n\t * Determins if a marker is already added to the cluster.\r\n\t *\r\n\t * @param {google.maps.Marker} marker The marker to check.\r\n\t * @return {boolean} True if the marker is already added.\r\n\t */\n\tCluster.prototype.isMarkerAlreadyAdded = function (marker) {\n\t if (this.markers_.indexOf) {\n\t return this.markers_.indexOf(marker) != -1;\n\t } else {\n\t for (var i = 0, m; m = this.markers_[i]; i++) {\n\t if (m == marker) {\n\t return true;\n\t }\n\t }\n\t }\n\t return false;\n\t};\n\n\t/**\r\n\t * Add a marker the cluster.\r\n\t *\r\n\t * @param {google.maps.Marker} marker The marker to add.\r\n\t * @return {boolean} True if the marker was added.\r\n\t */\n\tCluster.prototype.addMarker = function (marker) {\n\t if (this.isMarkerAlreadyAdded(marker)) {\n\t return false;\n\t }\n\n\t if (!this.center_) {\n\t this.center_ = marker.getPosition();\n\t this.calculateBounds_();\n\t } else {\n\t if (this.averageCenter_) {\n\t var l = this.markers_.length + 1;\n\t var lat = (this.center_.lat() * (l - 1) + marker.getPosition().lat()) / l;\n\t var lng = (this.center_.lng() * (l - 1) + marker.getPosition().lng()) / l;\n\t this.center_ = new google.maps.LatLng(lat, lng);\n\t this.calculateBounds_();\n\t }\n\t }\n\n\t marker.isAdded = true;\n\t this.markers_.push(marker);\n\n\t var len = this.markers_.length;\n\t if (len < this.minClusterSize_ && marker.getMap() != this.map_) {\n\t // Min cluster size not reached so show the marker.\n\t marker.setMap(this.map_);\n\t }\n\n\t if (len == this.minClusterSize_) {\n\t // Hide the markers that were showing.\n\t for (var i = 0; i < len; i++) {\n\t this.markers_[i].setMap(null);\n\t }\n\t }\n\n\t if (len >= this.minClusterSize_) {\n\t marker.setMap(null);\n\t }\n\n\t this.updateIcon();\n\t return true;\n\t};\n\n\t/**\r\n\t * Returns the marker clusterer that the cluster is associated with.\r\n\t *\r\n\t * @return {MarkerClusterer} The associated marker clusterer.\r\n\t */\n\tCluster.prototype.getMarkerClusterer = function () {\n\t return this.markerClusterer_;\n\t};\n\n\t/**\r\n\t * Returns the bounds of the cluster.\r\n\t *\r\n\t * @return {google.maps.LatLngBounds} the cluster bounds.\r\n\t */\n\tCluster.prototype.getBounds = function () {\n\t var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\n\t var markers = this.getMarkers();\n\t for (var i = 0, marker; marker = markers[i]; i++) {\n\t bounds.extend(marker.getPosition());\n\t }\n\t return bounds;\n\t};\n\n\t/**\r\n\t * Removes the cluster\r\n\t */\n\tCluster.prototype.remove = function () {\n\t this.clusterIcon_.remove();\n\t this.markers_.length = 0;\n\t delete this.markers_;\n\t};\n\n\t/**\r\n\t * Returns the center of the cluster.\r\n\t *\r\n\t * @return {number} The cluster center.\r\n\t */\n\tCluster.prototype.getSize = function () {\n\t return this.markers_.length;\n\t};\n\n\t/**\r\n\t * Returns the center of the cluster.\r\n\t *\r\n\t * @return {Array.} The cluster center.\r\n\t */\n\tCluster.prototype.getMarkers = function () {\n\t return this.markers_;\n\t};\n\n\t/**\r\n\t * Returns the center of the cluster.\r\n\t *\r\n\t * @return {google.maps.LatLng} The cluster center.\r\n\t */\n\tCluster.prototype.getCenter = function () {\n\t return this.center_;\n\t};\n\n\t/**\r\n\t * Calculated the extended bounds of the cluster with the grid.\r\n\t *\r\n\t * @private\r\n\t */\n\tCluster.prototype.calculateBounds_ = function () {\n\t var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\n\t this.bounds_ = this.markerClusterer_.getExtendedBounds(bounds);\n\t};\n\n\t/**\r\n\t * Determines if a marker lies in the clusters bounds.\r\n\t *\r\n\t * @param {google.maps.Marker} marker The marker to check.\r\n\t * @return {boolean} True if the marker lies in the bounds.\r\n\t */\n\tCluster.prototype.isMarkerInClusterBounds = function (marker) {\n\t return this.bounds_.contains(marker.getPosition());\n\t};\n\n\t/**\r\n\t * Returns the map that the cluster is associated with.\r\n\t *\r\n\t * @return {google.maps.Map} The map.\r\n\t */\n\tCluster.prototype.getMap = function () {\n\t return this.map_;\n\t};\n\n\t/**\r\n\t * Updates the cluster icon\r\n\t */\n\tCluster.prototype.updateIcon = function () {\n\t var zoom = this.map_.getZoom();\n\t var mz = this.markerClusterer_.getMaxZoom();\n\n\t if (mz && zoom > mz) {\n\t // The zoom is greater than our max zoom so show all the markers in cluster.\n\t for (var i = 0, marker; marker = this.markers_[i]; i++) {\n\t marker.setMap(this.map_);\n\t }\n\t return;\n\t }\n\n\t if (this.markers_.length < this.minClusterSize_) {\n\t // Min cluster size not yet reached.\n\t this.clusterIcon_.hide();\n\t return;\n\t }\n\n\t var numStyles = this.markerClusterer_.getStyles().length;\n\t var sums = this.markerClusterer_.getCalculator()(this.markers_, numStyles);\n\t this.clusterIcon_.setCenter(this.center_);\n\t this.clusterIcon_.setSums(sums);\n\t this.clusterIcon_.show();\n\t};\n\n\t/**\r\n\t * A cluster icon\r\n\t *\r\n\t * @param {Cluster} cluster The cluster to be associated with.\r\n\t * @param {Object} styles An object that has style properties:\r\n\t * 'url': (string) The image url.\r\n\t * 'height': (number) The image height.\r\n\t * 'width': (number) The image width.\r\n\t * 'anchor': (Array) The anchor position of the label text.\r\n\t * 'textColor': (string) The text color.\r\n\t * 'textSize': (number) The text size.\r\n\t * 'backgroundPosition: (string) The background postition x, y.\r\n\t * @param {number=} opt_padding Optional padding to apply to the cluster icon.\r\n\t * @constructor\r\n\t * @extends google.maps.OverlayView\r\n\t * @ignore\r\n\t */\n\tfunction ClusterIcon(cluster, styles, opt_padding) {\n\t cluster.getMarkerClusterer().extend(ClusterIcon, google.maps.OverlayView);\n\n\t this.styles_ = styles;\n\t this.padding_ = opt_padding || 0;\n\t this.cluster_ = cluster;\n\t this.center_ = null;\n\t this.map_ = cluster.getMap();\n\t this.div_ = null;\n\t this.sums_ = null;\n\t this.visible_ = false;\n\n\t this.setMap(this.map_);\n\t}\n\n\t/**\r\n\t * Triggers the clusterclick event and zoom's if the option is set.\r\n\t *\r\n\t * @param {google.maps.MouseEvent} event The event to propagate\r\n\t */\n\tClusterIcon.prototype.triggerClusterClick = function (event) {\n\t var markerClusterer = this.cluster_.getMarkerClusterer();\n\n\t // Trigger the clusterclick event.\n\t google.maps.event.trigger(markerClusterer, 'clusterclick', this.cluster_, event);\n\n\t if (markerClusterer.isZoomOnClick()) {\n\t // Zoom into the cluster.\n\t this.map_.fitBounds(this.cluster_.getBounds());\n\t }\n\t};\n\n\t/**\r\n\t * Triggers the clustermouseover event.\r\n\t * @param {google.maps.MouseEvent} event The event to propagate\r\n\t */\n\tClusterIcon.prototype.triggerClusterMouseover = function (event) {\n\t var markerClusterer = this.cluster_.getMarkerClusterer();\n\n\t // Trigger the clustermouseover event.\n\t google.maps.event.trigger(markerClusterer, 'clustermouseover', this.cluster_, event);\n\n\t if (typeof this.cluster_.markerClusterer_.onMouseoverCluster_ === 'function') {\n\t this.cluster_.markerClusterer_.onMouseoverCluster_(this, event);\n\t }\n\t};\n\n\t/**\r\n\t * Triggers the clustermouseout event.\r\n\t * @param {google.maps.MouseEvent} event The event to propagate\r\n\t */\n\tClusterIcon.prototype.triggerClusterMouseout = function (event) {\n\t var markerClusterer = this.cluster_.getMarkerClusterer();\n\n\t // Trigger the clustermouseout event.\n\t google.maps.event.trigger(markerClusterer, 'clustermouseout', this.cluster_, event);\n\n\t if (typeof this.cluster_.markerClusterer_.onMouseoutCluster_ === 'function') {\n\t this.cluster_.markerClusterer_.onMouseoutCluster_(this, event);\n\t }\n\t};\n\n\t/**\r\n\t * Adding the cluster icon to the dom.\r\n\t * @ignore\r\n\t */\n\tClusterIcon.prototype.onAdd = function () {\n\t if (typeof this.cluster_.markerClusterer_.onAddCluster_ === 'function') {\n\t this.cluster_.markerClusterer_.onAddCluster_(this);\n\t } else {\n\t defaultClusterOnAdd(this);\n\t }\n\t};\n\n\t/**\r\n\t * Default onAdd function\r\n\t * @ignore\r\n\t */\n\tfunction defaultClusterOnAdd(clusterIcon) {\n\t clusterIcon.div_ = document.createElement('DIV');\n\t if (clusterIcon.visible_) {\n\t var pos = clusterIcon.getPosFromLatLng_(clusterIcon.center_);\n\t clusterIcon.div_.style.cssText = clusterIcon.createCss(pos);\n\t clusterIcon.div_.innerHTML = clusterIcon.sums_.text;\n\t clusterIcon.addClass();\n\t }\n\n\t var panes = clusterIcon.getPanes();\n\n\t panes.overlayMouseTarget.appendChild(clusterIcon.div_);\n\n\t var isDragging = false;\n\t var isMouseDown = false;\n\n\t google.maps.event.addDomListener(clusterIcon.div_, 'click', function (event) {\n\t // Only perform click when not preceded by a drag\n\t if (!isDragging) {\n\t clusterIcon.triggerClusterClick(event);\n\t }\n\t });\n\n\t google.maps.event.addDomListener(clusterIcon.div_, 'mousedown', function () {\n\t isDragging = false;\n\t isMouseDown = true;\n\t });\n\n\t google.maps.event.addDomListener(clusterIcon.div_, 'mouseup', function () {\n\t isDragging = false;\n\t isMouseDown = false;\n\t });\n\n\t google.maps.event.addDomListener(clusterIcon.div_, 'mousemove', function () {\n\t if (isMouseDown) {\n\t isDragging = true;\n\t }\n\t });\n\n\t google.maps.event.addDomListener(clusterIcon.div_, 'mouseover', function (event) {\n\t clusterIcon.triggerClusterMouseover(event);\n\t });\n\n\t google.maps.event.addDomListener(clusterIcon.div_, 'mouseout', function (event) {\n\t clusterIcon.triggerClusterMouseout(event);\n\t });\n\t}\n\n\t/**\r\n\t * Returns the position to place the div dending on the latlng.\r\n\t *\r\n\t * @param {google.maps.LatLng} latlng The position in latlng.\r\n\t * @return {google.maps.Point} The position in pixels.\r\n\t * @private\r\n\t */\n\tClusterIcon.prototype.getPosFromLatLng_ = function (latlng) {\n\t var pos = this.getProjection().fromLatLngToDivPixel(latlng);\n\n\t if (_typeof(this.iconAnchor_) === 'object' && this.iconAnchor_.length === 2) {\n\t pos.x -= this.iconAnchor_[0];\n\t pos.y -= this.iconAnchor_[1];\n\t } else {\n\t pos.x -= parseInt(this.width_ / 2, 10);\n\t pos.y -= parseInt(this.height_ / 2, 10);\n\t }\n\t return pos;\n\t};\n\n\t/**\r\n\t * Draw the icon.\r\n\t * @ignore\r\n\t */\n\tClusterIcon.prototype.draw = function () {\n\t if (typeof this.cluster_.markerClusterer_.drawCluster_ === 'function') {\n\t this.cluster_.markerClusterer_.drawCluster_(this);\n\t } else {\n\t defaultClusterDraw(this);\n\t }\n\t};\n\n\t/**\r\n\t * Default draw function\r\n\t * @ignore\r\n\t */\n\tfunction defaultClusterDraw(clusterIcon) {\n\t if (clusterIcon.visible_) {\n\t var pos = clusterIcon.getPosFromLatLng_(clusterIcon.center_);\n\t clusterIcon.div_.style.top = pos.y + 'px';\n\t clusterIcon.div_.style.left = pos.x + 'px';\n\t }\n\t}\n\n\t/**\r\n\t * Hide the icon.\r\n\t */\n\tClusterIcon.prototype.hide = function () {\n\t if (typeof this.cluster_.markerClusterer_.hideCluster_ === 'function') {\n\t this.cluster_.markerClusterer_.hideCluster_(this);\n\t } else {\n\t defaultClusterHide(this);\n\t }\n\t};\n\n\t/**\r\n\t * Default hide function\r\n\t * @ignore\r\n\t */\n\tfunction defaultClusterHide(clusterIcon) {\n\t if (clusterIcon.div_) {\n\t clusterIcon.div_.style.display = 'none';\n\t clusterIcon.div_.className = '';\n\t }\n\t clusterIcon.visible_ = false;\n\t}\n\n\t/**\r\n\t * Position and show the icon.\r\n\t */\n\tClusterIcon.prototype.show = function () {\n\t if (typeof this.cluster_.markerClusterer_.showCluster_ === 'function') {\n\t this.cluster_.markerClusterer_.showCluster_(this);\n\t } else {\n\t defaultClusterShow(this);\n\t }\n\t};\n\n\t/**\r\n\t * Default show function\r\n\t * @ignore\r\n\t */\n\tfunction defaultClusterShow(clusterIcon) {\n\t if (clusterIcon.div_) {\n\t var pos = clusterIcon.getPosFromLatLng_(clusterIcon.center_);\n\t clusterIcon.div_.style.cssText = clusterIcon.createCss(pos);\n\t clusterIcon.div_.style.display = '';\n\t clusterIcon.addClass();\n\t }\n\t clusterIcon.visible_ = true;\n\t}\n\n\t/**\r\n\t * Remove the icon from the map\r\n\t */\n\tClusterIcon.prototype.remove = function () {\n\t this.setMap(null);\n\t};\n\n\t/**\r\n\t * Implementation of the onRemove interface.\r\n\t * @ignore\r\n\t */\n\tClusterIcon.prototype.onRemove = function () {\n\t if (typeof this.cluster_.markerClusterer_.onRemoveCluster_ === 'function') {\n\t this.cluster_.markerClusterer_.onRemoveCluster_(this);\n\t } else {\n\t defaultClusterOnRemove(this);\n\t }\n\t};\n\n\t/**\r\n\t * Default onRemove function\r\n\t * @ignore\r\n\t */\n\tfunction defaultClusterOnRemove(clusterIcon) {\n\t if (clusterIcon.div_ && clusterIcon.div_.parentNode) {\n\t clusterIcon.hide();\n\t clusterIcon.div_.parentNode.removeChild(clusterIcon.div_);\n\t clusterIcon.div_ = null;\n\t }\n\t}\n\n\t/**\r\n\t * Set the sums of the icon.\r\n\t *\r\n\t * @param {Object} sums The sums containing:\r\n\t * 'text': (string) The text to display in the icon.\r\n\t * 'index': (number) The style index of the icon.\r\n\t */\n\tClusterIcon.prototype.setSums = function (sums) {\n\t this.sums_ = sums;\n\t this.text_ = sums.text;\n\t this.index_ = sums.index;\n\t if (this.div_) {\n\t this.div_.innerHTML = sums.text;\n\t }\n\n\t this.useStyle();\n\t};\n\n\t/**\r\n\t * Sets the icon to the the styles.\r\n\t */\n\tClusterIcon.prototype.useStyle = function () {\n\t var index = Math.max(0, this.sums_.index - 1);\n\t index = Math.min(this.styles_.length - 1, index);\n\t var style = this.styles_[index];\n\t this.url_ = style['url'];\n\t this.height_ = style['height'];\n\t this.width_ = style['width'];\n\t this.textColor_ = style['textColor'];\n\t this.anchor_ = style['anchor'];\n\t this.textSize_ = style['textSize'];\n\t this.backgroundPosition_ = style['backgroundPosition'];\n\t this.iconAnchor_ = style['iconAnchor'];\n\t this.setIndex_ = index;\n\t};\n\n\t/**\r\n\t * Sets the center of the icon.\r\n\t *\r\n\t * @param {google.maps.LatLng} center The latlng to set as the center.\r\n\t */\n\tClusterIcon.prototype.setCenter = function (center) {\n\t this.center_ = center;\n\t};\n\n\t/**\r\n\t * Create the css text based on the position of the icon.\r\n\t *\r\n\t * @param {google.maps.Point} pos The position.\r\n\t * @return {string} The css style text.\r\n\t */\n\tClusterIcon.prototype.createCss = function (pos) {\n\t var style = [];\n\t var markerClusterer = this.cluster_.getMarkerClusterer();\n\n\t if (!markerClusterer.cssClass_) {\n\t style.push('background-image:url(' + this.url_ + ');');\n\t var backgroundPosition = this.backgroundPosition_ ? this.backgroundPosition_ : '0 0';\n\t style.push('background-position:' + backgroundPosition + ';');\n\n\t if (_typeof(this.anchor_) === 'object') {\n\t if (typeof this.anchor_[0] === 'number' && this.anchor_[0] > 0 && this.anchor_[0] < this.height_) {\n\t style.push('height:' + (this.height_ - this.anchor_[0]) + 'px; padding-top:' + this.anchor_[0] + 'px;');\n\t } else if (typeof this.anchor_[0] === 'number' && this.anchor_[0] < 0 && -this.anchor_[0] < this.height_) {\n\t style.push('height:' + this.height_ + 'px; line-height:' + (this.height_ + this.anchor_[0]) + 'px;');\n\t } else {\n\t style.push('height:' + this.height_ + 'px; line-height:' + this.height_ + 'px;');\n\t }\n\t if (typeof this.anchor_[1] === 'number' && this.anchor_[1] > 0 && this.anchor_[1] < this.width_) {\n\t style.push('width:' + (this.width_ - this.anchor_[1]) + 'px; padding-left:' + this.anchor_[1] + 'px;');\n\t } else {\n\t style.push('width:' + this.width_ + 'px; text-align:center;');\n\t }\n\t } else {\n\t style.push('height:' + this.height_ + 'px; line-height:' + this.height_ + 'px; width:' + this.width_ + 'px; text-align:center;');\n\t }\n\n\t var txtColor = this.textColor_ ? this.textColor_ : 'black';\n\t var txtSize = this.textSize_ ? this.textSize_ : 11;\n\n\t style.push('cursor:pointer; top:' + pos.y + 'px; left:' + pos.x + 'px; color:' + txtColor + '; position:absolute; font-size:' + txtSize + 'px; font-family:Arial,sans-serif; font-weight:bold');\n\t } else {\n\t style.push('top:' + pos.y + 'px; left:' + pos.x + 'px;');\n\t }\n\n\t return style.join('');\n\t};\n\n\t/**\r\n\t * Set the class for the cluster icon\r\n\t * @ignore\r\n\t */\n\tClusterIcon.prototype.addClass = function () {\n\t var markerClusterer = this.cluster_.getMarkerClusterer();\n\n\t if (markerClusterer.cssClass_) {\n\t this.div_.className = markerClusterer.cssClass_ + ' ' + markerClusterer.cssDefaultClass_ + this.setIndex_;\n\t } else {\n\t this.div_.className = markerClusterer.cssDefaultClass_ + this.setIndex_;\n\t }\n\t};\n\n\t// Export Symbols for Closure\n\t// If you are not going to compile with closure then you can remove the\n\t// code below.\n\twindow['MarkerClusterer'] = MarkerClusterer;\n\tMarkerClusterer.prototype['addMarker'] = MarkerClusterer.prototype.addMarker;\n\tMarkerClusterer.prototype['addMarkers'] = MarkerClusterer.prototype.addMarkers;\n\tMarkerClusterer.prototype['clearMarkers'] = MarkerClusterer.prototype.clearMarkers;\n\tMarkerClusterer.prototype['fitMapToMarkers'] = MarkerClusterer.prototype.fitMapToMarkers;\n\tMarkerClusterer.prototype['getCalculator'] = MarkerClusterer.prototype.getCalculator;\n\tMarkerClusterer.prototype['getGridSize'] = MarkerClusterer.prototype.getGridSize;\n\tMarkerClusterer.prototype['getExtendedBounds'] = MarkerClusterer.prototype.getExtendedBounds;\n\tMarkerClusterer.prototype['getMap'] = MarkerClusterer.prototype.getMap;\n\tMarkerClusterer.prototype['getMarkers'] = MarkerClusterer.prototype.getMarkers;\n\tMarkerClusterer.prototype['getMaxZoom'] = MarkerClusterer.prototype.getMaxZoom;\n\tMarkerClusterer.prototype['getMarkersCluster'] = MarkerClusterer.prototype.getMarkersCluster;\n\tMarkerClusterer.prototype['getStyles'] = MarkerClusterer.prototype.getStyles;\n\tMarkerClusterer.prototype['getTotalClusters'] = MarkerClusterer.prototype.getTotalClusters;\n\tMarkerClusterer.prototype['getTotalMarkers'] = MarkerClusterer.prototype.getTotalMarkers;\n\tMarkerClusterer.prototype['redraw'] = MarkerClusterer.prototype.redraw;\n\tMarkerClusterer.prototype['removeMarker'] = MarkerClusterer.prototype.removeMarker;\n\tMarkerClusterer.prototype['removeMarkers'] = MarkerClusterer.prototype.removeMarkers;\n\tMarkerClusterer.prototype['resetViewport'] = MarkerClusterer.prototype.resetViewport;\n\tMarkerClusterer.prototype['repaint'] = MarkerClusterer.prototype.repaint;\n\tMarkerClusterer.prototype['setCalculator'] = MarkerClusterer.prototype.setCalculator;\n\tMarkerClusterer.prototype['setGridSize'] = MarkerClusterer.prototype.setGridSize;\n\tMarkerClusterer.prototype['setMaxZoom'] = MarkerClusterer.prototype.setMaxZoom;\n\tMarkerClusterer.prototype['onAdd'] = MarkerClusterer.prototype.onAdd;\n\tMarkerClusterer.prototype['draw'] = MarkerClusterer.prototype.draw;\n\n\tCluster.prototype['getCenter'] = Cluster.prototype.getCenter;\n\tCluster.prototype['getSize'] = Cluster.prototype.getSize;\n\tCluster.prototype['getMarkers'] = Cluster.prototype.getMarkers;\n\n\tClusterIcon.prototype['onAdd'] = ClusterIcon.prototype.onAdd;\n\tClusterIcon.prototype['draw'] = ClusterIcon.prototype.draw;\n\tClusterIcon.prototype['onRemove'] = ClusterIcon.prototype.onRemove;\n\n/***/ })\n/******/ ]);"],"names":["modules","installedModules","__webpack_require__","moduleId","module","exports","id","loaded","call","m","c","p","_typeof","Symbol","iterator","obj","constructor","prototype","MarkerClusterer","map","opt_markers","opt_options","this","extend","google","maps","OverlayView","map_","markers_","clusters_","markersCluster_","markersUniqueID","sizes","styles_","cssClass_","cssDefaultClass_","setIndex_","ready_","options","that","gridSize_","undefined","minClusterSize_","ignoreHiddenMarkers_","maxZoom_","imagePath_","MARKER_CLUSTER_IMAGE_PATH_","imageExtension_","MARKER_CLUSTER_IMAGE_EXTENSION_","zoomOnClick_","averageCenter_","onMouseoverCluster_","onMouseoutCluster_","drawCluster_","hideCluster_","showCluster_","onAddCluster_","onRemoveCluster_","setupStyles_","setMap","prevZoom_","getZoom","event","addListener","zoom","resetViewport","redraw","length","addMarkers","Cluster","markerClusterer","markerClusterer_","getMap","getGridSize","getMinClusterSize","isAverageCenter","center_","bounds_","clusterIcon_","ClusterIcon","getStyles","cluster","styles","opt_padding","getMarkerClusterer","padding_","cluster_","div_","sums_","visible_","obj1","obj2","object","property","apply","onAdd","setReady_","draw","size","i","url","push","height","width","fitMapToMarkers","marker","markers","getMarkers","bounds","LatLngBounds","getPosition","fitBounds","setStyles","isZoomOnClick","getTotalMarkers","setMaxZoom","maxZoom","getMaxZoom","getMarkersCluster","uniqueID","calculator_","numStyles","index","count","dv","parseInt","text","Math","min","setCalculator","calculator","getCalculator","opt_nodraw","pushMarkerTo_","isAdded","repaint","addMarker","removeMarker_","indexOf","splice","removeMarker","removed","removeMarkers","r","ready","createClusters_","getTotalClusters","getClusters","setGridSize","setMinClusterSize","getExtendedBounds","projection","getProjection","tr","LatLng","getNorthEast","lat","lng","bl","getSouthWest","trPix","fromLatLngToDivPixel","blPix","x","y","ne","fromDivPixelToLatLng","sw","isMarkerInBounds_","contains","clearMarkers","opt_hide","remove","oldClusters","slice","window","setTimeout","distanceBetweenPoints_","p1","p2","dLon","a","dLat","PI","sin","cos","atan2","sqrt","addToClosestCluster_","distance","clusterToAddTo","clusterIndex","center","getCenter","d","isMarkerInClusterBounds","mapBounds","getBounds","getVisible","isMarkerAlreadyAdded","l","calculateBounds_","len","updateIcon","getSize","mz","hide","sums","setCenter","setSums","show","triggerClusterClick","trigger","triggerClusterMouseover","triggerClusterMouseout","clusterIcon","pos","isDragging","isMouseDown","document","createElement","getPosFromLatLng_","style","cssText","createCss","innerHTML","addClass","getPanes","overlayMouseTarget","appendChild","addDomListener","latlng","iconAnchor_","width_","height_","top","left","display","className","onRemove","parentNode","removeChild","text_","index_","useStyle","max","url_","textColor_","anchor_","textSize_","backgroundPosition_","txtColor","txtSize","backgroundPosition","join"],"mappings":"AAAS,CAAA,SAAUA,GAET,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,IAIIC,EAJJ,OAAGH,EAAiBE,KAIhBC,EAASH,EAAiBE,GAAY,CACzCE,QAAS,GACTC,GAAIH,EACJI,OAAQ,CAAA,CACT,EAGAP,EAAQG,GAAUK,KAAKJ,EAAOC,QAASD,EAAQA,EAAOC,QAASH,CAAmB,EAGlFE,EAAOG,OAAS,CAAA,EAGTH,IAhB4BC,OAiBp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