{"version":3,"sources":["webpack:///./src/components/system/GoogleMap.vue?b946","webpack:///./node_modules/@googlemaps/js-api-loader/dist/index.esm.js","webpack:///./node_modules/@googlemaps/markerclustererplus/dist/index.esm.js","webpack:///./src/components/system/GoogleMap.vue","webpack:///./src/components/system/GoogleMap.vue?1888","webpack:///./src/components/system/GoogleMap.vue?ab8a","webpack:///./src/components/system/GoogleMap.vue?0e89"],"names":["render","_vm","this","_h","$createElement","_self","_c","_m","staticRenderFns","attrs","_v","fastDeepEqual","equal","a","b","constructor","length","i","keys","Array","isArray","RegExp","source","flags","valueOf","Object","prototype","toString","hasOwnProperty","call","key","DEFAULT_ID","Loader","apiKey","channel","client","id","libraries","language","region","version","mapIds","nonce","retries","url","CALLBACK","callbacks","done","loading","errors","instance","options","Error","JSON","stringify","join","loadPromise","Promise","resolve","reject","loadCallback","err","fn","push","execute","document","getElementById","callback","createUrl","script","createElement","type","src","onerror","loadErrorCallback","bind","defer","async","head","appendChild","remove","deleteScript","onerrorEvent","failed","reset","e","delay","Math","pow","console","log","setTimeout","setScript","window","__googleMapsCallback","forEach","cb","resetIfRetryingFailed","google","maps","warn","setCallback","extendStatics","d","setPrototypeOf","__proto__","p","__extends","TypeError","String","__","create","__assign","assign","t","s","n","arguments","apply","extend","type1","type2","property","OverlayViewSafe","OverlayView","toCssText","styles","reduce","acc","coercePixels","pixels","undefined","ClusterIcon","_super","cluster_","styles_","_this","center_","div_","sums_","visible_","style","setMap","getMap","onAdd","cMouseDownInCluster","cDraggingMapByCluster","mc","getMarkerClusterer","_a","split","major","minor","gmVersion","parseInt","show","getPanes","overlayMouseTarget","boundsChangedListener_","event","addListener","addDomListener","stopPropagation","trigger","getZoomOnClick","mz_1","getMaxZoom","theBounds_1","getBounds","fitBounds","getZoom","setZoom","cancelBubble","onRemove","parentNode","hide","removeListener","clearInstanceListeners","removeChild","draw","pos","getPosFromLatLng_","top","y","left","x","display","className","className_","cssText","createCss_","innerHTML","getImageElementHtml","getLabelDivHtml","title","getTitle","ariaLabel","ariaLabelFn","text","divStyle","position","anchorText_","color","textColor","textSize","fontFamily","fontWeight","fontStyle","textDecoration","width","textLineHeight","bp","backgroundPosition","spriteH","replace","spriteV","dimensions","getEnableRetinaIcons","height","Y1","X1","Y2","X2","clip","overrideDimensionsDynamicIcon","useStyle","sums","index","max","min","anchorText","anchorIcon_","anchorIcon","floor","getClusterClass","setCenter","center","getZIndex","cursor","latlng","getProjection","fromLatLngToDivPixel","Cluster","markerClusterer_","map_","minClusterSize_","getMinimumClusterSize","averageCenter_","getAverageCenter","markers_","bounds_","clusterIcon_","getStyles","getSize","getMarkers","getCenter","bounds","LatLngBounds","markers","getPosition","addMarker","marker","isMarkerAlreadyAdded_","l","lat","lng","LatLng","calculateBounds_","isAdded","mCount","mz","isMarkerInClusterBounds","contains","getExtendedBounds","updateIcon","numStyles","getCalculator","indexOf","getOption","prop","def","MarkerClusterer","map","clusters_","listeners_","activeMap_","ready_","zIndex_","zIndex","Number","Marker","MAX_ZINDEX","gridSize_","gridSize","minimumClusterSize","maxZoom_","maxZoom","title_","zoomOnClick_","ignoreHidden_","enableRetinaIcons_","imagePath_","imagePath","IMAGE_PATH","imageExtension_","imageExtension","IMAGE_EXTENSION","imageSizes_","imageSizes","IMAGE_SIZES","calculator_","calculator","CALCULATOR","batchSize_","batchSize","BATCH_SIZE","batchSizeIE_","batchSizeIE","BATCH_SIZE_IE","clusterClass_","clusterClass","navigator","userAgent","toLowerCase","setupStyles_","addMarkers","repaint","prevZoom_","minZoom","mapTypes","getMapTypeId","zoom","resetViewport_","redraw_","size","withDefaultStyle","fitMapToMarkers","padding","getVisible","getIgnoreHidden","getGridSize","setGridSize","setMinimumClusterSize","setMaxZoom","setZIndex","setStyles","setTitle","setZoomOnClick","zoomOnClick","setAverageCenter","averageCenter","setIgnoreHidden","ignoreHidden","setEnableRetinaIcons","enableRetinaIcons","getImageExtension","setImageExtension","getImagePath","setImagePath","getImageSizes","setImageSizes","setCalculator","getBatchSizeIE","setBatchSizeIE","setClusterClass","getTotalMarkers","getClusters","getTotalClusters","nodraw","pushMarkerTo_","getDraggable","removeMarker","removed","removeMarker_","removeMarkers","r","splice","clearMarkers","oldClusters","slice","projection","tr","getNorthEast","bl","getSouthWest","trPix","blPix","ne","fromDivPixelToLatLng","sw","createClusters_","distanceBetweenPoints_","p1","p2","R","dLat","PI","dLon","sin","cos","c","atan2","sqrt","isMarkerInBounds_","addToClosestCluster_","distance","clusterToAddTo","cluster","iFirst","mapBounds","timerRefStatic","clearTimeout","iLast","count","dv","overrides","loader","newLocations","newLoc","markerClusterer","markersArray","load","then","Map","mapConfig","locations","clusterMarkers","catch","loc","description","infoWindow","InfoWindow","setContent","open","setMapOnAll","hideMarkers","default","mapTypeControl","streetViewControl","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAsBH,EAAII,MAAMC,GAAO,OAAOL,EAAIM,GAAG,IACnGC,EAAkB,CAAC,WAAa,IAAIP,EAAIC,KAASC,EAAGF,EAAIG,eAAmBE,EAAGL,EAAII,MAAMC,IAAIH,EAAG,OAAOG,EAAG,MAAM,CAACA,EAAG,MAAM,CAACG,MAAM,CAAC,GAAK,QAAQ,CAACR,EAAIS,GAAG,0B,kHCGtJC,EAAgB,SAASC,EAAMC,EAAGC,GACpC,GAAID,IAAMC,EAAG,OAAO,EAEpB,GAAID,GAAKC,GAAiB,iBAALD,GAA6B,iBAALC,EAAe,CAC1D,GAAID,EAAEE,cAAgBD,EAAEC,YAAa,OAAO,EAE5C,IAAIC,EAAQC,EAAGC,EACf,GAAIC,MAAMC,QAAQP,GAAI,CAEpB,GADAG,EAASH,EAAEG,OACPA,GAAUF,EAAEE,OAAQ,OAAO,EAC/B,IAAKC,EAAID,EAAgB,IAARC,KACf,IAAKL,EAAMC,EAAEI,GAAIH,EAAEG,IAAK,OAAO,EACjC,OAAO,EAKT,GAAIJ,EAAEE,cAAgBM,OAAQ,OAAOR,EAAES,SAAWR,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Content":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{attrs:{\"id\":\"map\"}},[_vm._v(\"Map did not load\")])])}]\n\nexport { render, staticRenderFns }","// do not edit .js files directly - edit src/index.jst\n\n\n\nvar fastDeepEqual = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at.\r\n *\r\n * Http://www.apache.org/licenses/LICENSE-2.0.\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst DEFAULT_ID = \"__googleMapsScriptId\";\r\n/**\r\n * [[Loader]] makes it easier to add Google Maps JavaScript API to your application\r\n * dynamically using\r\n * [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\r\n * It works by dynamically creating and appending a script node to the the\r\n * document head and wrapping the callback function so as to return a promise.\r\n *\r\n * ```\r\n * const loader = new Loader({\r\n * apiKey: \"\",\r\n * version: \"weekly\",\r\n * libraries: [\"places\"]\r\n * });\r\n *\r\n * loader.load().then(() => {\r\n * const map = new google.maps.Map(...)\r\n * })\r\n * ```\r\n */\r\nclass Loader {\r\n /**\r\n * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set\r\n * using this library, instead the defaults are set by the Google Maps\r\n * JavaScript API server.\r\n *\r\n * ```\r\n * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});\r\n * ```\r\n */\r\n constructor({ apiKey, channel, client, id = DEFAULT_ID, libraries = [], language, region, version, mapIds, nonce, retries = 3, url = \"https://maps.googleapis.com/maps/api/js\", }) {\r\n this.CALLBACK = \"__googleMapsCallback\";\r\n this.callbacks = [];\r\n this.done = false;\r\n this.loading = false;\r\n this.errors = [];\r\n this.version = version;\r\n this.apiKey = apiKey;\r\n this.channel = channel;\r\n this.client = client;\r\n this.id = id || DEFAULT_ID; // Do not allow empty string\r\n this.libraries = libraries;\r\n this.language = language;\r\n this.region = region;\r\n this.mapIds = mapIds;\r\n this.nonce = nonce;\r\n this.retries = retries;\r\n this.url = url;\r\n if (Loader.instance) {\r\n if (!fastDeepEqual(this.options, Loader.instance.options)) {\r\n throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Loader.instance.options)}`);\r\n }\r\n return Loader.instance;\r\n }\r\n Loader.instance = this;\r\n }\r\n get options() {\r\n return {\r\n version: this.version,\r\n apiKey: this.apiKey,\r\n channel: this.channel,\r\n client: this.client,\r\n id: this.id,\r\n libraries: this.libraries,\r\n language: this.language,\r\n region: this.region,\r\n mapIds: this.mapIds,\r\n nonce: this.nonce,\r\n url: this.url,\r\n };\r\n }\r\n get failed() {\r\n return this.done && !this.loading && this.errors.length >= this.retries + 1;\r\n }\r\n /**\r\n * CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]].\r\n *\r\n * @ignore\r\n */\r\n createUrl() {\r\n let url = this.url;\r\n url += `?callback=${this.CALLBACK}`;\r\n if (this.apiKey) {\r\n url += `&key=${this.apiKey}`;\r\n }\r\n if (this.channel) {\r\n url += `&channel=${this.channel}`;\r\n }\r\n if (this.client) {\r\n url += `&client=${this.client}`;\r\n }\r\n if (this.libraries.length > 0) {\r\n url += `&libraries=${this.libraries.join(\",\")}`;\r\n }\r\n if (this.language) {\r\n url += `&language=${this.language}`;\r\n }\r\n if (this.region) {\r\n url += `®ion=${this.region}`;\r\n }\r\n if (this.version) {\r\n url += `&v=${this.version}`;\r\n }\r\n if (this.mapIds) {\r\n url += `&map_ids=${this.mapIds.join(\",\")}`;\r\n }\r\n return url;\r\n }\r\n /**\r\n * Load the Google Maps JavaScript API script and return a Promise.\r\n */\r\n load() {\r\n return this.loadPromise();\r\n }\r\n /**\r\n * Load the Google Maps JavaScript API script and return a Promise.\r\n *\r\n * @ignore\r\n */\r\n loadPromise() {\r\n return new Promise((resolve, reject) => {\r\n this.loadCallback((err) => {\r\n if (!err) {\r\n resolve();\r\n }\r\n else {\r\n reject(err);\r\n }\r\n });\r\n });\r\n }\r\n /**\r\n * Load the Google Maps JavaScript API script with a callback.\r\n */\r\n loadCallback(fn) {\r\n this.callbacks.push(fn);\r\n this.execute();\r\n }\r\n /**\r\n * Set the script on document.\r\n */\r\n setScript() {\r\n if (document.getElementById(this.id)) {\r\n // TODO wrap onerror callback for cases where the script was loaded elsewhere\r\n this.callback();\r\n return;\r\n }\r\n const url = this.createUrl();\r\n const script = document.createElement(\"script\");\r\n script.id = this.id;\r\n script.type = \"text/javascript\";\r\n script.src = url;\r\n script.onerror = this.loadErrorCallback.bind(this);\r\n script.defer = true;\r\n script.async = true;\r\n if (this.nonce) {\r\n script.nonce = this.nonce;\r\n }\r\n document.head.appendChild(script);\r\n }\r\n deleteScript() {\r\n const script = document.getElementById(this.id);\r\n if (script) {\r\n script.remove();\r\n }\r\n }\r\n /**\r\n * Reset the loader state.\r\n */\r\n reset() {\r\n this.deleteScript();\r\n this.done = false;\r\n this.loading = false;\r\n this.errors = [];\r\n this.onerrorEvent = null;\r\n }\r\n resetIfRetryingFailed() {\r\n if (this.failed) {\r\n this.reset();\r\n }\r\n }\r\n loadErrorCallback(e) {\r\n this.errors.push(e);\r\n if (this.errors.length <= this.retries) {\r\n const delay = this.errors.length * Math.pow(2, this.errors.length);\r\n console.log(`Failed to load Google Maps script, retrying in ${delay} ms.`);\r\n setTimeout(() => {\r\n this.deleteScript();\r\n this.setScript();\r\n }, delay);\r\n }\r\n else {\r\n this.onerrorEvent = e;\r\n this.callback();\r\n }\r\n }\r\n setCallback() {\r\n window.__googleMapsCallback = this.callback.bind(this);\r\n }\r\n callback() {\r\n this.done = true;\r\n this.loading = false;\r\n this.callbacks.forEach((cb) => {\r\n cb(this.onerrorEvent);\r\n });\r\n this.callbacks = [];\r\n }\r\n execute() {\r\n this.resetIfRetryingFailed();\r\n if (this.done) {\r\n this.callback();\r\n }\r\n else {\r\n // short circuit and warn if google.maps is already loaded\r\n if (window.google && window.google.maps && window.google.maps.version) {\r\n console.warn(\"Google Maps already loaded outside @googlemaps/js-api-loader.\" +\r\n \"This may result in undesirable behavior as options and script parameters may not match.\");\r\n this.callback();\r\n return;\r\n }\r\n if (this.loading) ;\r\n else {\r\n this.loading = true;\r\n this.setCallback();\r\n this.setScript();\r\n }\r\n }\r\n }\r\n}\n\nexport { DEFAULT_ID, Loader };\n//# sourceMappingURL=index.esm.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\n\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Extends an object's prototype by another's.\r\n *\r\n * @param type1 The Type to be extended.\r\n * @param type2 The Type to extend with.\r\n * @ignore\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nfunction extend(type1, type2) {\r\n // eslint-disable-next-line prefer-const\r\n for (var property in type2.prototype) {\r\n type1.prototype[property] = type2.prototype[property];\r\n }\r\n}\r\n/**\r\n * @ignore\r\n */\r\nvar OverlayViewSafe = /** @class */ (function () {\r\n function OverlayViewSafe() {\r\n // MarkerClusterer implements google.maps.OverlayView interface. We use the\r\n // extend function to extend MarkerClusterer with google.maps.OverlayView\r\n // because it might not always be available when the code is defined so we\r\n // look for it at the last possible moment. If it doesn't exist now then\r\n // there is no point going ahead :)\r\n extend(OverlayViewSafe, google.maps.OverlayView);\r\n }\r\n return OverlayViewSafe;\r\n}());\n\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n *\r\n * @hidden\r\n */\r\nfunction toCssText(styles) {\r\n return Object.keys(styles)\r\n .reduce(function (acc, key) {\r\n if (styles[key]) {\r\n acc.push(key + \":\" + styles[key]);\r\n }\r\n return acc;\r\n }, [])\r\n .join(\";\");\r\n}\r\n/**\r\n *\r\n * @hidden\r\n */\r\nfunction coercePixels(pixels) {\r\n return pixels ? pixels + \"px\" : undefined;\r\n}\r\n/**\r\n * A cluster icon.\r\n */\r\nvar ClusterIcon = /** @class */ (function (_super) {\r\n __extends(ClusterIcon, _super);\r\n /**\r\n * @param cluster_ The cluster with which the icon is to be associated.\r\n * @param styles_ An array of {@link ClusterIconStyle} defining the cluster icons\r\n * to use for various cluster sizes.\r\n */\r\n function ClusterIcon(cluster_, styles_) {\r\n var _this = _super.call(this) || this;\r\n _this.cluster_ = cluster_;\r\n _this.styles_ = styles_;\r\n _this.center_ = null;\r\n _this.div_ = null;\r\n _this.sums_ = null;\r\n _this.visible_ = false;\r\n _this.style = null;\r\n _this.setMap(cluster_.getMap()); // Note: this causes onAdd to be called\r\n return _this;\r\n }\r\n /**\r\n * Adds the icon to the DOM.\r\n */\r\n ClusterIcon.prototype.onAdd = function () {\r\n var _this = this;\r\n var cMouseDownInCluster;\r\n var cDraggingMapByCluster;\r\n var mc = this.cluster_.getMarkerClusterer();\r\n var _a = google.maps.version.split(\".\"), major = _a[0], minor = _a[1];\r\n var gmVersion = parseInt(major, 10) * 100 + parseInt(minor, 10);\r\n this.div_ = document.createElement(\"div\");\r\n if (this.visible_) {\r\n this.show();\r\n }\r\n this.getPanes().overlayMouseTarget.appendChild(this.div_);\r\n // Fix for Issue 157\r\n this.boundsChangedListener_ = google.maps.event.addListener(this.getMap(), \"bounds_changed\", function () {\r\n cDraggingMapByCluster = cMouseDownInCluster;\r\n });\r\n google.maps.event.addDomListener(this.div_, \"mousedown\", function () {\r\n cMouseDownInCluster = true;\r\n cDraggingMapByCluster = false;\r\n });\r\n // March 1, 2018: Fix for this 3.32 exp bug, https://issuetracker.google.com/issues/73571522\r\n // But it doesn't work with earlier releases so do a version check.\r\n if (gmVersion >= 332) {\r\n // Ugly version-dependent code\r\n google.maps.event.addDomListener(this.div_, \"touchstart\", function (e) {\r\n e.stopPropagation();\r\n });\r\n }\r\n google.maps.event.addDomListener(this.div_, \"click\", function (e) {\r\n cMouseDownInCluster = false;\r\n if (!cDraggingMapByCluster) {\r\n /**\r\n * This event is fired when a cluster marker is clicked.\r\n * @name MarkerClusterer#click\r\n * @param {Cluster} c The cluster that was clicked.\r\n * @event\r\n */\r\n google.maps.event.trigger(mc, \"click\", _this.cluster_);\r\n google.maps.event.trigger(mc, \"clusterclick\", _this.cluster_); // deprecated name\r\n // The default click handler follows. Disable it by setting\r\n // the zoomOnClick property to false.\r\n if (mc.getZoomOnClick()) {\r\n // Zoom into the cluster.\r\n var mz_1 = mc.getMaxZoom();\r\n var theBounds_1 = _this.cluster_.getBounds();\r\n mc.getMap().fitBounds(theBounds_1);\r\n // There is a fix for Issue 170 here:\r\n setTimeout(function () {\r\n mc.getMap().fitBounds(theBounds_1);\r\n // Don't zoom beyond the max zoom level\r\n if (mz_1 !== null && mc.getMap().getZoom() > mz_1) {\r\n mc.getMap().setZoom(mz_1 + 1);\r\n }\r\n }, 100);\r\n }\r\n // Prevent event propagation to the map:\r\n e.cancelBubble = true;\r\n if (e.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n }\r\n });\r\n google.maps.event.addDomListener(this.div_, \"mouseover\", function () {\r\n /**\r\n * This event is fired when the mouse moves over a cluster marker.\r\n * @name MarkerClusterer#mouseover\r\n * @param {Cluster} c The cluster that the mouse moved over.\r\n * @event\r\n */\r\n google.maps.event.trigger(mc, \"mouseover\", _this.cluster_);\r\n });\r\n google.maps.event.addDomListener(this.div_, \"mouseout\", function () {\r\n /**\r\n * This event is fired when the mouse moves out of a cluster marker.\r\n * @name MarkerClusterer#mouseout\r\n * @param {Cluster} c The cluster that the mouse moved out of.\r\n * @event\r\n */\r\n google.maps.event.trigger(mc, \"mouseout\", _this.cluster_);\r\n });\r\n };\r\n /**\r\n * Removes the icon from the DOM.\r\n */\r\n ClusterIcon.prototype.onRemove = function () {\r\n if (this.div_ && this.div_.parentNode) {\r\n this.hide();\r\n google.maps.event.removeListener(this.boundsChangedListener_);\r\n google.maps.event.clearInstanceListeners(this.div_);\r\n this.div_.parentNode.removeChild(this.div_);\r\n this.div_ = null;\r\n }\r\n };\r\n /**\r\n * Draws the icon.\r\n */\r\n ClusterIcon.prototype.draw = function () {\r\n if (this.visible_) {\r\n var pos = this.getPosFromLatLng_(this.center_);\r\n this.div_.style.top = pos.y + \"px\";\r\n this.div_.style.left = pos.x + \"px\";\r\n }\r\n };\r\n /**\r\n * Hides the icon.\r\n */\r\n ClusterIcon.prototype.hide = function () {\r\n if (this.div_) {\r\n this.div_.style.display = \"none\";\r\n }\r\n this.visible_ = false;\r\n };\r\n /**\r\n * Positions and shows the icon.\r\n */\r\n ClusterIcon.prototype.show = function () {\r\n if (this.div_) {\r\n this.div_.className = this.className_;\r\n this.div_.style.cssText = this.createCss_(this.getPosFromLatLng_(this.center_));\r\n this.div_.innerHTML =\r\n (this.style.url ? this.getImageElementHtml() : \"\") +\r\n this.getLabelDivHtml();\r\n if (typeof this.sums_.title === \"undefined\" || this.sums_.title === \"\") {\r\n this.div_.title = this.cluster_.getMarkerClusterer().getTitle();\r\n }\r\n else {\r\n this.div_.title = this.sums_.title;\r\n }\r\n this.div_.style.display = \"\";\r\n }\r\n this.visible_ = true;\r\n };\r\n ClusterIcon.prototype.getLabelDivHtml = function () {\r\n var mc = this.cluster_.getMarkerClusterer();\r\n var ariaLabel = mc.ariaLabelFn(this.sums_.text);\r\n var divStyle = {\r\n position: \"absolute\",\r\n top: coercePixels(this.anchorText_[0]),\r\n left: coercePixels(this.anchorText_[1]),\r\n color: this.style.textColor,\r\n \"font-size\": coercePixels(this.style.textSize),\r\n \"font-family\": this.style.fontFamily,\r\n \"font-weight\": this.style.fontWeight,\r\n \"font-style\": this.style.fontStyle,\r\n \"text-decoration\": this.style.textDecoration,\r\n \"text-align\": \"center\",\r\n width: coercePixels(this.style.width),\r\n \"line-height\": coercePixels(this.style.textLineHeight),\r\n };\r\n return \"\\n
\\n \" + this.sums_.text + \"\\n
\\n\";\r\n };\r\n ClusterIcon.prototype.getImageElementHtml = function () {\r\n // NOTE: values must be specified in px units\r\n var bp = (this.style.backgroundPosition || \"0 0\").split(\" \");\r\n var spriteH = parseInt(bp[0].replace(/^\\s+|\\s+$/g, \"\"), 10);\r\n var spriteV = parseInt(bp[1].replace(/^\\s+|\\s+$/g, \"\"), 10);\r\n var dimensions = {};\r\n if (this.cluster_.getMarkerClusterer().getEnableRetinaIcons()) {\r\n dimensions = {\r\n width: coercePixels(this.style.width),\r\n height: coercePixels(this.style.height),\r\n };\r\n }\r\n else {\r\n var _a = [\r\n -1 * spriteV,\r\n -1 * spriteH + this.style.width,\r\n -1 * spriteV + this.style.height,\r\n -1 * spriteH,\r\n ], Y1 = _a[0], X1 = _a[1], Y2 = _a[2], X2 = _a[3];\r\n dimensions = {\r\n clip: \"rect(\" + Y1 + \"px, \" + X1 + \"px, \" + Y2 + \"px, \" + X2 + \"px)\",\r\n };\r\n }\r\n var overrideDimensionsDynamicIcon = this.sums_.url\r\n ? { width: \"100%\", height: \"100%\" }\r\n : {};\r\n var cssText = toCssText(__assign(__assign({ position: \"absolute\", top: coercePixels(spriteV), left: coercePixels(spriteH) }, dimensions), overrideDimensionsDynamicIcon));\r\n return \"\\\"\"\";\r\n };\r\n /**\r\n * Sets the icon styles to the appropriate element in the styles array.\r\n *\r\n * @ignore\r\n * @param sums The icon label text and styles index.\r\n */\r\n ClusterIcon.prototype.useStyle = function (sums) {\r\n this.sums_ = sums;\r\n var index = Math.max(0, sums.index - 1);\r\n index = Math.min(this.styles_.length - 1, index);\r\n this.style = this.sums_.url\r\n ? __assign(__assign({}, this.styles_[index]), { url: this.sums_.url }) : this.styles_[index];\r\n this.anchorText_ = this.style.anchorText || [0, 0];\r\n this.anchorIcon_ = this.style.anchorIcon || [\r\n Math.floor(this.style.height / 2),\r\n Math.floor(this.style.width / 2),\r\n ];\r\n this.className_ =\r\n this.cluster_.getMarkerClusterer().getClusterClass() +\r\n \" \" +\r\n (this.style.className || \"cluster-\" + index);\r\n };\r\n /**\r\n * Sets the position at which to center the icon.\r\n *\r\n * @param center The latlng to set as the center.\r\n */\r\n ClusterIcon.prototype.setCenter = function (center) {\r\n this.center_ = center;\r\n };\r\n /**\r\n * Creates the `cssText` style parameter based on the position of the icon.\r\n *\r\n * @param pos The position of the icon.\r\n * @return The CSS style text.\r\n */\r\n ClusterIcon.prototype.createCss_ = function (pos) {\r\n return toCssText({\r\n \"z-index\": \"\" + this.cluster_.getMarkerClusterer().getZIndex(),\r\n top: coercePixels(pos.y),\r\n left: coercePixels(pos.x),\r\n width: coercePixels(this.style.width),\r\n height: coercePixels(this.style.height),\r\n cursor: \"pointer\",\r\n position: \"absolute\",\r\n \"-webkit-user-select\": \"none\",\r\n \"-khtml-user-select\": \"none\",\r\n \"-moz-user-select\": \"none\",\r\n \"-o-user-select\": \"none\",\r\n \"user-select\": \"none\",\r\n });\r\n };\r\n /**\r\n * Returns the position at which to place the DIV depending on the latlng.\r\n *\r\n * @param latlng The position in latlng.\r\n * @return The position in pixels.\r\n */\r\n ClusterIcon.prototype.getPosFromLatLng_ = function (latlng) {\r\n var pos = this.getProjection().fromLatLngToDivPixel(latlng);\r\n pos.x = Math.floor(pos.x - this.anchorIcon_[1]);\r\n pos.y = Math.floor(pos.y - this.anchorIcon_[0]);\r\n return pos;\r\n };\r\n return ClusterIcon;\r\n}(OverlayViewSafe));\n\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Creates a single cluster that manages a group of proximate markers.\r\n * Used internally, do not call this constructor directly.\r\n */\r\nvar Cluster = /** @class */ (function () {\r\n /**\r\n *\r\n * @param markerClusterer_ The `MarkerClusterer` object with which this\r\n * cluster is associated.\r\n */\r\n function Cluster(markerClusterer_) {\r\n this.markerClusterer_ = markerClusterer_;\r\n this.map_ = this.markerClusterer_.getMap();\r\n this.minClusterSize_ = this.markerClusterer_.getMinimumClusterSize();\r\n this.averageCenter_ = this.markerClusterer_.getAverageCenter();\r\n this.markers_ = []; // TODO: type;\r\n this.center_ = null;\r\n this.bounds_ = null;\r\n this.clusterIcon_ = new ClusterIcon(this, this.markerClusterer_.getStyles());\r\n }\r\n /**\r\n * Returns the number of markers managed by the cluster. You can call this from\r\n * a `click`, `mouseover`, or `mouseout` event handler for the `MarkerClusterer` object.\r\n *\r\n * @return The number of markers in the cluster.\r\n */\r\n Cluster.prototype.getSize = function () {\r\n return this.markers_.length;\r\n };\r\n /**\r\n * Returns the array of markers managed by the cluster. You can call this from\r\n * a `click`, `mouseover`, or `mouseout` event handler for the `MarkerClusterer` object.\r\n *\r\n * @return The array of markers in the cluster.\r\n */\r\n Cluster.prototype.getMarkers = function () {\r\n return this.markers_;\r\n };\r\n /**\r\n * Returns the center of the cluster. You can call this from\r\n * a `click`, `mouseover`, or `mouseout` event handler\r\n * for the `MarkerClusterer` object.\r\n *\r\n * @return The center of the cluster.\r\n */\r\n Cluster.prototype.getCenter = function () {\r\n return this.center_;\r\n };\r\n /**\r\n * Returns the map with which the cluster is associated.\r\n *\r\n * @return The map.\r\n * @ignore\r\n */\r\n Cluster.prototype.getMap = function () {\r\n return this.map_;\r\n };\r\n /**\r\n * Returns the `MarkerClusterer` object with which the cluster is associated.\r\n *\r\n * @return The associated marker clusterer.\r\n * @ignore\r\n */\r\n Cluster.prototype.getMarkerClusterer = function () {\r\n return this.markerClusterer_;\r\n };\r\n /**\r\n * Returns the bounds of the cluster.\r\n *\r\n * @return the cluster bounds.\r\n * @ignore\r\n */\r\n Cluster.prototype.getBounds = function () {\r\n var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\r\n var markers = this.getMarkers();\r\n for (var i = 0; i < markers.length; i++) {\r\n bounds.extend(markers[i].getPosition());\r\n }\r\n return bounds;\r\n };\r\n /**\r\n * Removes the cluster from the map.\r\n *\r\n * @ignore\r\n */\r\n Cluster.prototype.remove = function () {\r\n this.clusterIcon_.setMap(null);\r\n this.markers_ = [];\r\n delete this.markers_;\r\n };\r\n /**\r\n * Adds a marker to the cluster.\r\n *\r\n * @param marker The marker to be added.\r\n * @return True if the marker was added.\r\n * @ignore\r\n */\r\n Cluster.prototype.addMarker = function (marker) {\r\n if (this.isMarkerAlreadyAdded_(marker)) {\r\n return false;\r\n }\r\n if (!this.center_) {\r\n this.center_ = marker.getPosition();\r\n this.calculateBounds_();\r\n }\r\n else {\r\n if (this.averageCenter_) {\r\n var l = this.markers_.length + 1;\r\n var lat = (this.center_.lat() * (l - 1) + marker.getPosition().lat()) / l;\r\n var lng = (this.center_.lng() * (l - 1) + marker.getPosition().lng()) / l;\r\n this.center_ = new google.maps.LatLng(lat, lng);\r\n this.calculateBounds_();\r\n }\r\n }\r\n marker.isAdded = true;\r\n this.markers_.push(marker);\r\n var mCount = this.markers_.length;\r\n var mz = this.markerClusterer_.getMaxZoom();\r\n if (mz !== null && this.map_.getZoom() > mz) {\r\n // Zoomed in past max zoom, so show the marker.\r\n if (marker.getMap() !== this.map_) {\r\n marker.setMap(this.map_);\r\n }\r\n }\r\n else if (mCount < this.minClusterSize_) {\r\n // Min cluster size not reached so show the marker.\r\n if (marker.getMap() !== this.map_) {\r\n marker.setMap(this.map_);\r\n }\r\n }\r\n else if (mCount === this.minClusterSize_) {\r\n // Hide the markers that were showing.\r\n for (var i = 0; i < mCount; i++) {\r\n this.markers_[i].setMap(null);\r\n }\r\n }\r\n else {\r\n marker.setMap(null);\r\n }\r\n return true;\r\n };\r\n /**\r\n * Determines if a marker lies within the cluster's bounds.\r\n *\r\n * @param marker The marker to check.\r\n * @return True if the marker lies in the bounds.\r\n * @ignore\r\n */\r\n Cluster.prototype.isMarkerInClusterBounds = function (marker) {\r\n return this.bounds_.contains(marker.getPosition());\r\n };\r\n /**\r\n * Calculates the extended bounds of the cluster with the grid.\r\n */\r\n Cluster.prototype.calculateBounds_ = function () {\r\n var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\r\n this.bounds_ = this.markerClusterer_.getExtendedBounds(bounds);\r\n };\r\n /**\r\n * Updates the cluster icon.\r\n */\r\n Cluster.prototype.updateIcon = function () {\r\n var mCount = this.markers_.length;\r\n var mz = this.markerClusterer_.getMaxZoom();\r\n if (mz !== null && this.map_.getZoom() > mz) {\r\n this.clusterIcon_.hide();\r\n return;\r\n }\r\n if (mCount < this.minClusterSize_) {\r\n // Min cluster size not yet reached.\r\n this.clusterIcon_.hide();\r\n return;\r\n }\r\n var numStyles = this.markerClusterer_.getStyles().length;\r\n var sums = this.markerClusterer_.getCalculator()(this.markers_, numStyles);\r\n this.clusterIcon_.setCenter(this.center_);\r\n this.clusterIcon_.useStyle(sums);\r\n this.clusterIcon_.show();\r\n };\r\n /**\r\n * Determines if a marker has already been added to the cluster.\r\n *\r\n * @param marker The marker to check.\r\n * @return True if the marker has already been added.\r\n */\r\n Cluster.prototype.isMarkerAlreadyAdded_ = function (marker) {\r\n if (this.markers_.indexOf) {\r\n return this.markers_.indexOf(marker) !== -1;\r\n }\r\n else {\r\n for (var i = 0; i < this.markers_.length; i++) {\r\n if (marker === this.markers_[i]) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n };\r\n return Cluster;\r\n}());\n\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * @ignore\r\n */\r\nvar getOption = function (options, prop, def) {\r\n if (options[prop] !== undefined) {\r\n return options[prop];\r\n }\r\n else {\r\n return def;\r\n }\r\n};\r\nvar MarkerClusterer = /** @class */ (function (_super) {\r\n __extends(MarkerClusterer, _super);\r\n /**\r\n * Creates a MarkerClusterer object with the options specified in {@link MarkerClustererOptions}.\r\n * @param map The Google map to attach to.\r\n * @param markers The markers to be added to the cluster.\r\n * @param options The optional parameters.\r\n */\r\n function MarkerClusterer(map, markers, options) {\r\n if (markers === void 0) { markers = []; }\r\n if (options === void 0) { options = {}; }\r\n var _this = _super.call(this) || this;\r\n _this.options = options;\r\n _this.markers_ = [];\r\n _this.clusters_ = [];\r\n _this.listeners_ = [];\r\n _this.activeMap_ = null;\r\n _this.ready_ = false;\r\n _this.ariaLabelFn = _this.options.ariaLabelFn || (function () { return \"\"; });\r\n _this.zIndex_ = _this.options.zIndex || Number(google.maps.Marker.MAX_ZINDEX) + 1;\r\n _this.gridSize_ = _this.options.gridSize || 60;\r\n _this.minClusterSize_ = _this.options.minimumClusterSize || 2;\r\n _this.maxZoom_ = _this.options.maxZoom || null;\r\n _this.styles_ = _this.options.styles || [];\r\n _this.title_ = _this.options.title || \"\";\r\n _this.zoomOnClick_ = getOption(_this.options, \"zoomOnClick\", true);\r\n _this.averageCenter_ = getOption(_this.options, \"averageCenter\", false);\r\n _this.ignoreHidden_ = getOption(_this.options, \"ignoreHidden\", false);\r\n _this.enableRetinaIcons_ = getOption(_this.options, \"enableRetinaIcons\", false);\r\n _this.imagePath_ = _this.options.imagePath || MarkerClusterer.IMAGE_PATH;\r\n _this.imageExtension_ = _this.options.imageExtension || MarkerClusterer.IMAGE_EXTENSION;\r\n _this.imageSizes_ = _this.options.imageSizes || MarkerClusterer.IMAGE_SIZES;\r\n _this.calculator_ = _this.options.calculator || MarkerClusterer.CALCULATOR;\r\n _this.batchSize_ = _this.options.batchSize || MarkerClusterer.BATCH_SIZE;\r\n _this.batchSizeIE_ = _this.options.batchSizeIE || MarkerClusterer.BATCH_SIZE_IE;\r\n _this.clusterClass_ = _this.options.clusterClass || \"cluster\";\r\n if (navigator.userAgent.toLowerCase().indexOf(\"msie\") !== -1) {\r\n // Try to avoid IE timeout when processing a huge number of markers:\r\n _this.batchSize_ = _this.batchSizeIE_;\r\n }\r\n _this.setupStyles_();\r\n _this.addMarkers(markers, true);\r\n _this.setMap(map); // Note: this causes onAdd to be called\r\n return _this;\r\n }\r\n /**\r\n * Implementation of the onAdd interface method.\r\n * @ignore\r\n */\r\n MarkerClusterer.prototype.onAdd = function () {\r\n var _this = this;\r\n this.activeMap_ = this.getMap();\r\n this.ready_ = true;\r\n this.repaint();\r\n this.prevZoom_ = this.getMap().getZoom();\r\n // Add the map event listeners\r\n this.listeners_ = [\r\n google.maps.event.addListener(this.getMap(), \"zoom_changed\", function () {\r\n var map = _this.getMap(); // eslint-disable-line @typescript-eslint/no-explicit-any\r\n // Fix for bug #407\r\n // Determines map type and prevents illegal zoom levels\r\n var minZoom = map.minZoom || 0;\r\n var maxZoom = Math.min(map.maxZoom || 100, map.mapTypes[map.getMapTypeId()].maxZoom);\r\n var zoom = Math.min(Math.max(_this.getMap().getZoom(), minZoom), maxZoom);\r\n if (_this.prevZoom_ != zoom) {\r\n _this.prevZoom_ = zoom;\r\n _this.resetViewport_(false);\r\n }\r\n }),\r\n google.maps.event.addListener(this.getMap(), \"idle\", function () {\r\n _this.redraw_();\r\n }),\r\n ];\r\n };\r\n /**\r\n * Implementation of the onRemove interface method.\r\n * Removes map event listeners and all cluster icons from the DOM.\r\n * All managed markers are also put back on the map.\r\n * @ignore\r\n */\r\n MarkerClusterer.prototype.onRemove = function () {\r\n // Put all the managed markers back on the map:\r\n for (var i = 0; i < this.markers_.length; i++) {\r\n if (this.markers_[i].getMap() !== this.activeMap_) {\r\n this.markers_[i].setMap(this.activeMap_);\r\n }\r\n }\r\n // Remove all clusters:\r\n for (var i = 0; i < this.clusters_.length; i++) {\r\n this.clusters_[i].remove();\r\n }\r\n this.clusters_ = [];\r\n // Remove map event listeners:\r\n for (var i = 0; i < this.listeners_.length; i++) {\r\n google.maps.event.removeListener(this.listeners_[i]);\r\n }\r\n this.listeners_ = [];\r\n this.activeMap_ = null;\r\n this.ready_ = false;\r\n };\r\n /**\r\n * Implementation of the draw interface method.\r\n * @ignore\r\n */\r\n MarkerClusterer.prototype.draw = function () { };\r\n /**\r\n * Sets up the styles object.\r\n */\r\n MarkerClusterer.prototype.setupStyles_ = function () {\r\n if (this.styles_.length > 0) {\r\n return;\r\n }\r\n for (var i = 0; i < this.imageSizes_.length; i++) {\r\n var size = this.imageSizes_[i];\r\n this.styles_.push(MarkerClusterer.withDefaultStyle({\r\n url: this.imagePath_ + (i + 1) + \".\" + this.imageExtension_,\r\n height: size,\r\n width: size,\r\n }));\r\n }\r\n };\r\n /**\r\n * Fits the map to the bounds of the markers managed by the clusterer.\r\n */\r\n MarkerClusterer.prototype.fitMapToMarkers = function (padding) {\r\n var markers = this.getMarkers();\r\n var bounds = new google.maps.LatLngBounds();\r\n for (var i = 0; i < markers.length; i++) {\r\n // March 3, 2018: Bug fix -- honor the ignoreHidden property\r\n if (markers[i].getVisible() || !this.getIgnoreHidden()) {\r\n bounds.extend(markers[i].getPosition());\r\n }\r\n }\r\n this.getMap().fitBounds(bounds, padding);\r\n };\r\n /**\r\n * Returns the value of the `gridSize` property.\r\n *\r\n * @return The grid size.\r\n */\r\n MarkerClusterer.prototype.getGridSize = function () {\r\n return this.gridSize_;\r\n };\r\n /**\r\n * Sets the value of the `gridSize` property.\r\n *\r\n * @param gridSize The grid size.\r\n */\r\n MarkerClusterer.prototype.setGridSize = function (gridSize) {\r\n this.gridSize_ = gridSize;\r\n };\r\n /**\r\n * Returns the value of the `minimumClusterSize` property.\r\n *\r\n * @return The minimum cluster size.\r\n */\r\n MarkerClusterer.prototype.getMinimumClusterSize = function () {\r\n return this.minClusterSize_;\r\n };\r\n /**\r\n * Sets the value of the `minimumClusterSize` property.\r\n *\r\n * @param minimumClusterSize The minimum cluster size.\r\n */\r\n MarkerClusterer.prototype.setMinimumClusterSize = function (minimumClusterSize) {\r\n this.minClusterSize_ = minimumClusterSize;\r\n };\r\n /**\r\n * Returns the value of the `maxZoom` property.\r\n *\r\n * @return The maximum zoom level.\r\n */\r\n MarkerClusterer.prototype.getMaxZoom = function () {\r\n return this.maxZoom_;\r\n };\r\n /**\r\n * Sets the value of the `maxZoom` property.\r\n *\r\n * @param maxZoom The maximum zoom level.\r\n */\r\n MarkerClusterer.prototype.setMaxZoom = function (maxZoom) {\r\n this.maxZoom_ = maxZoom;\r\n };\r\n MarkerClusterer.prototype.getZIndex = function () {\r\n return this.zIndex_;\r\n };\r\n MarkerClusterer.prototype.setZIndex = function (zIndex) {\r\n this.zIndex_ = zIndex;\r\n };\r\n /**\r\n * Returns the value of the `styles` property.\r\n *\r\n * @return The array of styles defining the cluster markers to be used.\r\n */\r\n MarkerClusterer.prototype.getStyles = function () {\r\n return this.styles_;\r\n };\r\n /**\r\n * Sets the value of the `styles` property.\r\n *\r\n * @param styles The array of styles to use.\r\n */\r\n MarkerClusterer.prototype.setStyles = function (styles) {\r\n this.styles_ = styles;\r\n };\r\n /**\r\n * Returns the value of the `title` property.\r\n *\r\n * @return The content of the title text.\r\n */\r\n MarkerClusterer.prototype.getTitle = function () {\r\n return this.title_;\r\n };\r\n /**\r\n * Sets the value of the `title` property.\r\n *\r\n * @param title The value of the title property.\r\n */\r\n MarkerClusterer.prototype.setTitle = function (title) {\r\n this.title_ = title;\r\n };\r\n /**\r\n * Returns the value of the `zoomOnClick` property.\r\n *\r\n * @return True if zoomOnClick property is set.\r\n */\r\n MarkerClusterer.prototype.getZoomOnClick = function () {\r\n return this.zoomOnClick_;\r\n };\r\n /**\r\n * Sets the value of the `zoomOnClick` property.\r\n *\r\n * @param zoomOnClick The value of the zoomOnClick property.\r\n */\r\n MarkerClusterer.prototype.setZoomOnClick = function (zoomOnClick) {\r\n this.zoomOnClick_ = zoomOnClick;\r\n };\r\n /**\r\n * Returns the value of the `averageCenter` property.\r\n *\r\n * @return True if averageCenter property is set.\r\n */\r\n MarkerClusterer.prototype.getAverageCenter = function () {\r\n return this.averageCenter_;\r\n };\r\n /**\r\n * Sets the value of the `averageCenter` property.\r\n *\r\n * @param averageCenter The value of the averageCenter property.\r\n */\r\n MarkerClusterer.prototype.setAverageCenter = function (averageCenter) {\r\n this.averageCenter_ = averageCenter;\r\n };\r\n /**\r\n * Returns the value of the `ignoreHidden` property.\r\n *\r\n * @return True if ignoreHidden property is set.\r\n */\r\n MarkerClusterer.prototype.getIgnoreHidden = function () {\r\n return this.ignoreHidden_;\r\n };\r\n /**\r\n * Sets the value of the `ignoreHidden` property.\r\n *\r\n * @param ignoreHidden The value of the ignoreHidden property.\r\n */\r\n MarkerClusterer.prototype.setIgnoreHidden = function (ignoreHidden) {\r\n this.ignoreHidden_ = ignoreHidden;\r\n };\r\n /**\r\n * Returns the value of the `enableRetinaIcons` property.\r\n *\r\n * @return True if enableRetinaIcons property is set.\r\n */\r\n MarkerClusterer.prototype.getEnableRetinaIcons = function () {\r\n return this.enableRetinaIcons_;\r\n };\r\n /**\r\n * Sets the value of the `enableRetinaIcons` property.\r\n *\r\n * @param enableRetinaIcons The value of the enableRetinaIcons property.\r\n */\r\n MarkerClusterer.prototype.setEnableRetinaIcons = function (enableRetinaIcons) {\r\n this.enableRetinaIcons_ = enableRetinaIcons;\r\n };\r\n /**\r\n * Returns the value of the `imageExtension` property.\r\n *\r\n * @return The value of the imageExtension property.\r\n */\r\n MarkerClusterer.prototype.getImageExtension = function () {\r\n return this.imageExtension_;\r\n };\r\n /**\r\n * Sets the value of the `imageExtension` property.\r\n *\r\n * @param imageExtension The value of the imageExtension property.\r\n */\r\n MarkerClusterer.prototype.setImageExtension = function (imageExtension) {\r\n this.imageExtension_ = imageExtension;\r\n };\r\n /**\r\n * Returns the value of the `imagePath` property.\r\n *\r\n * @return The value of the imagePath property.\r\n */\r\n MarkerClusterer.prototype.getImagePath = function () {\r\n return this.imagePath_;\r\n };\r\n /**\r\n * Sets the value of the `imagePath` property.\r\n *\r\n * @param imagePath The value of the imagePath property.\r\n */\r\n MarkerClusterer.prototype.setImagePath = function (imagePath) {\r\n this.imagePath_ = imagePath;\r\n };\r\n /**\r\n * Returns the value of the `imageSizes` property.\r\n *\r\n * @return The value of the imageSizes property.\r\n */\r\n MarkerClusterer.prototype.getImageSizes = function () {\r\n return this.imageSizes_;\r\n };\r\n /**\r\n * Sets the value of the `imageSizes` property.\r\n *\r\n * @param imageSizes The value of the imageSizes property.\r\n */\r\n MarkerClusterer.prototype.setImageSizes = function (imageSizes) {\r\n this.imageSizes_ = imageSizes;\r\n };\r\n /**\r\n * Returns the value of the `calculator` property.\r\n *\r\n * @return the value of the calculator property.\r\n */\r\n MarkerClusterer.prototype.getCalculator = function () {\r\n return this.calculator_;\r\n };\r\n /**\r\n * Sets the value of the `calculator` property.\r\n *\r\n * @param calculator The value of the calculator property.\r\n */\r\n MarkerClusterer.prototype.setCalculator = function (calculator) {\r\n this.calculator_ = calculator;\r\n };\r\n /**\r\n * Returns the value of the `batchSizeIE` property.\r\n *\r\n * @return the value of the batchSizeIE property.\r\n */\r\n MarkerClusterer.prototype.getBatchSizeIE = function () {\r\n return this.batchSizeIE_;\r\n };\r\n /**\r\n * Sets the value of the `batchSizeIE` property.\r\n *\r\n * @param batchSizeIE The value of the batchSizeIE property.\r\n */\r\n MarkerClusterer.prototype.setBatchSizeIE = function (batchSizeIE) {\r\n this.batchSizeIE_ = batchSizeIE;\r\n };\r\n /**\r\n * Returns the value of the `clusterClass` property.\r\n *\r\n * @return the value of the clusterClass property.\r\n */\r\n MarkerClusterer.prototype.getClusterClass = function () {\r\n return this.clusterClass_;\r\n };\r\n /**\r\n * Sets the value of the `clusterClass` property.\r\n *\r\n * @param clusterClass The value of the clusterClass property.\r\n */\r\n MarkerClusterer.prototype.setClusterClass = function (clusterClass) {\r\n this.clusterClass_ = clusterClass;\r\n };\r\n /**\r\n * Returns the array of markers managed by the clusterer.\r\n *\r\n * @return The array of markers managed by the clusterer.\r\n */\r\n MarkerClusterer.prototype.getMarkers = function () {\r\n return this.markers_;\r\n };\r\n /**\r\n * Returns the number of markers managed by the clusterer.\r\n *\r\n * @return The number of markers.\r\n */\r\n MarkerClusterer.prototype.getTotalMarkers = function () {\r\n return this.markers_.length;\r\n };\r\n /**\r\n * Returns the current array of clusters formed by the clusterer.\r\n *\r\n * @return The array of clusters formed by the clusterer.\r\n */\r\n MarkerClusterer.prototype.getClusters = function () {\r\n return this.clusters_;\r\n };\r\n /**\r\n * Returns the number of clusters formed by the clusterer.\r\n *\r\n * @return The number of clusters formed by the clusterer.\r\n */\r\n MarkerClusterer.prototype.getTotalClusters = function () {\r\n return this.clusters_.length;\r\n };\r\n /**\r\n * Adds a marker to the clusterer. The clusters are redrawn unless\r\n * `nodraw` is set to `true`.\r\n *\r\n * @param marker The marker to add.\r\n * @param nodraw Set to `true` to prevent redrawing.\r\n */\r\n MarkerClusterer.prototype.addMarker = function (marker, nodraw) {\r\n this.pushMarkerTo_(marker);\r\n if (!nodraw) {\r\n this.redraw_();\r\n }\r\n };\r\n /**\r\n * Adds an array of markers to the clusterer. The clusters are redrawn unless\r\n * `nodraw` is set to `true`.\r\n *\r\n * @param markers The markers to add.\r\n * @param nodraw Set to `true` to prevent redrawing.\r\n */\r\n MarkerClusterer.prototype.addMarkers = function (markers, nodraw) {\r\n for (var key in markers) {\r\n if (Object.prototype.hasOwnProperty.call(markers, key)) {\r\n this.pushMarkerTo_(markers[key]);\r\n }\r\n }\r\n if (!nodraw) {\r\n this.redraw_();\r\n }\r\n };\r\n /**\r\n * Pushes a marker to the clusterer.\r\n *\r\n * @param marker The marker to add.\r\n */\r\n MarkerClusterer.prototype.pushMarkerTo_ = function (marker) {\r\n var _this = this;\r\n // If the marker is draggable add a listener so we can update the clusters on the dragend:\r\n if (marker.getDraggable()) {\r\n google.maps.event.addListener(marker, \"dragend\", function () {\r\n if (_this.ready_) {\r\n marker.isAdded = false;\r\n _this.repaint();\r\n }\r\n });\r\n }\r\n marker.isAdded = false;\r\n this.markers_.push(marker);\r\n };\r\n /**\r\n * Removes a marker from the cluster. The clusters are redrawn unless\r\n * `nodraw` is set to `true`. Returns `true` if the\r\n * marker was removed from the clusterer.\r\n *\r\n * @param marker The marker to remove.\r\n * @param nodraw Set to `true` to prevent redrawing.\r\n * @return True if the marker was removed from the clusterer.\r\n */\r\n MarkerClusterer.prototype.removeMarker = function (marker, nodraw) {\r\n var removed = this.removeMarker_(marker);\r\n if (!nodraw && removed) {\r\n this.repaint();\r\n }\r\n return removed;\r\n };\r\n /**\r\n * Removes an array of markers from the cluster. The clusters are redrawn unless\r\n * `nodraw` is set to `true`. Returns `true` if markers were removed from the clusterer.\r\n *\r\n * @param markers The markers to remove.\r\n * @param nodraw Set to `true` to prevent redrawing.\r\n * @return True if markers were removed from the clusterer.\r\n */\r\n MarkerClusterer.prototype.removeMarkers = function (markers, nodraw) {\r\n var removed = false;\r\n for (var i = 0; i < markers.length; i++) {\r\n var r = this.removeMarker_(markers[i]);\r\n removed = removed || r;\r\n }\r\n if (!nodraw && removed) {\r\n this.repaint();\r\n }\r\n return removed;\r\n };\r\n /**\r\n * Removes a marker and returns true if removed, false if not.\r\n *\r\n * @param marker The marker to remove\r\n * @return Whether the marker was removed or not\r\n */\r\n MarkerClusterer.prototype.removeMarker_ = function (marker) {\r\n var index = -1;\r\n if (this.markers_.indexOf) {\r\n index = this.markers_.indexOf(marker);\r\n }\r\n else {\r\n for (var i = 0; i < this.markers_.length; i++) {\r\n if (marker === this.markers_[i]) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n }\r\n if (index === -1) {\r\n // Marker is not in our list of markers, so do nothing:\r\n return false;\r\n }\r\n marker.setMap(null);\r\n this.markers_.splice(index, 1); // Remove the marker from the list of managed markers\r\n return true;\r\n };\r\n /**\r\n * Removes all clusters and markers from the map and also removes all markers\r\n * managed by the clusterer.\r\n */\r\n MarkerClusterer.prototype.clearMarkers = function () {\r\n this.resetViewport_(true);\r\n this.markers_ = [];\r\n };\r\n /**\r\n * Recalculates and redraws all the marker clusters from scratch.\r\n * Call this after changing any properties.\r\n */\r\n MarkerClusterer.prototype.repaint = function () {\r\n var oldClusters = this.clusters_.slice();\r\n this.clusters_ = [];\r\n this.resetViewport_(false);\r\n this.redraw_();\r\n // Remove the old clusters.\r\n // Do it in a timeout to prevent blinking effect.\r\n setTimeout(function () {\r\n for (var i = 0; i < oldClusters.length; i++) {\r\n oldClusters[i].remove();\r\n }\r\n }, 0);\r\n };\r\n /**\r\n * Returns the current bounds extended by the grid size.\r\n *\r\n * @param bounds The bounds to extend.\r\n * @return The extended bounds.\r\n * @ignore\r\n */\r\n MarkerClusterer.prototype.getExtendedBounds = function (bounds) {\r\n var projection = this.getProjection();\r\n // Turn the bounds into latlng.\r\n var tr = new google.maps.LatLng(bounds.getNorthEast().lat(), bounds.getNorthEast().lng());\r\n var bl = new google.maps.LatLng(bounds.getSouthWest().lat(), bounds.getSouthWest().lng());\r\n // Convert the points to pixels and the extend out by the grid size.\r\n var trPix = projection.fromLatLngToDivPixel(tr);\r\n trPix.x += this.gridSize_;\r\n trPix.y -= this.gridSize_;\r\n var blPix = projection.fromLatLngToDivPixel(bl);\r\n blPix.x -= this.gridSize_;\r\n blPix.y += this.gridSize_;\r\n // Convert the pixel points back to LatLng\r\n var ne = projection.fromDivPixelToLatLng(trPix);\r\n var sw = projection.fromDivPixelToLatLng(blPix);\r\n // Extend the bounds to contain the new bounds.\r\n bounds.extend(ne);\r\n bounds.extend(sw);\r\n return bounds;\r\n };\r\n /**\r\n * Redraws all the clusters.\r\n */\r\n MarkerClusterer.prototype.redraw_ = function () {\r\n this.createClusters_(0);\r\n };\r\n /**\r\n * Removes all clusters from the map. The markers are also removed from the map\r\n * if `hide` is set to `true`.\r\n *\r\n * @param hide Set to `true` to also remove the markers from the map.\r\n */\r\n MarkerClusterer.prototype.resetViewport_ = function (hide) {\r\n // Remove all the clusters\r\n for (var i = 0; i < this.clusters_.length; i++) {\r\n this.clusters_[i].remove();\r\n }\r\n this.clusters_ = [];\r\n // Reset the markers to not be added and to be removed from the map.\r\n for (var i = 0; i < this.markers_.length; i++) {\r\n var marker = this.markers_[i];\r\n marker.isAdded = false;\r\n if (hide) {\r\n marker.setMap(null);\r\n }\r\n }\r\n };\r\n /**\r\n * Calculates the distance between two latlng locations in km.\r\n *\r\n * @param p1 The first lat lng point.\r\n * @param p2 The second lat lng point.\r\n * @return The distance between the two points in km.\r\n * @link http://www.movable-type.co.uk/scripts/latlong.html\r\n */\r\n MarkerClusterer.prototype.distanceBetweenPoints_ = function (p1, p2) {\r\n var R = 6371; // Radius of the Earth in km\r\n var dLat = ((p2.lat() - p1.lat()) * Math.PI) / 180;\r\n var dLon = ((p2.lng() - p1.lng()) * Math.PI) / 180;\r\n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\r\n Math.cos((p1.lat() * Math.PI) / 180) *\r\n Math.cos((p2.lat() * Math.PI) / 180) *\r\n Math.sin(dLon / 2) *\r\n Math.sin(dLon / 2);\r\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\r\n return R * c;\r\n };\r\n /**\r\n * Determines if a marker is contained in a bounds.\r\n *\r\n * @param marker The marker to check.\r\n * @param bounds The bounds to check against.\r\n * @return True if the marker is in the bounds.\r\n */\r\n MarkerClusterer.prototype.isMarkerInBounds_ = function (marker, bounds) {\r\n return bounds.contains(marker.getPosition());\r\n };\r\n /**\r\n * Adds a marker to a cluster, or creates a new cluster.\r\n *\r\n * @param marker The marker to add.\r\n */\r\n MarkerClusterer.prototype.addToClosestCluster_ = function (marker) {\r\n var distance = 40000; // Some large number\r\n var clusterToAddTo = null;\r\n for (var i = 0; i < this.clusters_.length; i++) {\r\n var cluster = this.clusters_[i];\r\n var center = cluster.getCenter();\r\n if (center) {\r\n var d = this.distanceBetweenPoints_(center, marker.getPosition());\r\n if (d < distance) {\r\n distance = d;\r\n clusterToAddTo = cluster;\r\n }\r\n }\r\n }\r\n if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\r\n clusterToAddTo.addMarker(marker);\r\n }\r\n else {\r\n var cluster = new Cluster(this);\r\n cluster.addMarker(marker);\r\n this.clusters_.push(cluster);\r\n }\r\n };\r\n /**\r\n * Creates the clusters. This is done in batches to avoid timeout errors\r\n * in some browsers when there is a huge number of markers.\r\n *\r\n * @param iFirst The index of the first marker in the batch of\r\n * markers to be added to clusters.\r\n */\r\n MarkerClusterer.prototype.createClusters_ = function (iFirst) {\r\n var _this = this;\r\n if (!this.ready_) {\r\n return;\r\n }\r\n // Cancel previous batch processing if we're working on the first batch:\r\n if (iFirst === 0) {\r\n google.maps.event.trigger(this, \"clusteringbegin\", this);\r\n if (typeof this.timerRefStatic !== \"undefined\") {\r\n clearTimeout(this.timerRefStatic);\r\n delete this.timerRefStatic;\r\n }\r\n }\r\n // Get our current map view bounds.\r\n // Create a new bounds object so we don't affect the map.\r\n //\r\n // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug:\r\n var mapBounds;\r\n if (this.getMap().getZoom() > 3) {\r\n mapBounds = new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(), this.getMap().getBounds().getNorthEast());\r\n }\r\n else {\r\n mapBounds = new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));\r\n }\r\n var bounds = this.getExtendedBounds(mapBounds);\r\n var iLast = Math.min(iFirst + this.batchSize_, this.markers_.length);\r\n for (var i = iFirst; i < iLast; i++) {\r\n var marker = this.markers_[i];\r\n if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) {\r\n if (!this.ignoreHidden_ ||\r\n (this.ignoreHidden_ && marker.getVisible())) {\r\n this.addToClosestCluster_(marker);\r\n }\r\n }\r\n }\r\n if (iLast < this.markers_.length) {\r\n this.timerRefStatic = window.setTimeout(function () {\r\n _this.createClusters_(iLast);\r\n }, 0);\r\n }\r\n else {\r\n delete this.timerRefStatic;\r\n google.maps.event.trigger(this, \"clusteringend\", this);\r\n for (var i = 0; i < this.clusters_.length; i++) {\r\n this.clusters_[i].updateIcon();\r\n }\r\n }\r\n };\r\n /**\r\n * The default function for determining the label text and style\r\n * for a cluster icon.\r\n *\r\n * @param markers The array of markers represented by the cluster.\r\n * @param numStyles The number of marker styles available.\r\n * @return The information resource for the cluster.\r\n */\r\n MarkerClusterer.CALCULATOR = function (markers, numStyles) {\r\n var index = 0;\r\n var count = markers.length;\r\n var dv = count;\r\n while (dv !== 0) {\r\n dv = Math.floor(dv / 10);\r\n index++;\r\n }\r\n index = Math.min(index, numStyles);\r\n return {\r\n text: count.toString(),\r\n index: index,\r\n title: \"\",\r\n };\r\n };\r\n /**\r\n * Generates default styles augmented with user passed values.\r\n * Useful when you want to override some default values but keep untouched\r\n *\r\n * @param overrides override default values\r\n */\r\n MarkerClusterer.withDefaultStyle = function (overrides) {\r\n return __assign({ textColor: \"black\", textSize: 11, textDecoration: \"none\", textLineHeight: overrides.height, fontWeight: \"bold\", fontStyle: \"normal\", fontFamily: \"Arial,sans-serif\", backgroundPosition: \"0 0\" }, overrides);\r\n };\r\n /**\r\n * The number of markers to process in one batch.\r\n */\r\n MarkerClusterer.BATCH_SIZE = 2000;\r\n /**\r\n * The number of markers to process in one batch (IE only).\r\n */\r\n MarkerClusterer.BATCH_SIZE_IE = 500;\r\n /**\r\n * The default root name for the marker cluster images.\r\n */\r\n MarkerClusterer.IMAGE_PATH = \"../images/m\";\r\n /**\r\n * The default extension name for the marker cluster images.\r\n */\r\n MarkerClusterer.IMAGE_EXTENSION = \"png\";\r\n /**\r\n * The default array of sizes for the marker cluster images.\r\n */\r\n MarkerClusterer.IMAGE_SIZES = [53, 56, 66, 78, 90];\r\n return MarkerClusterer;\r\n}(OverlayViewSafe));\n\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\nexport default MarkerClusterer;\n//# sourceMappingURL=index.esm.js.map\n","\n\n\n\n\n\n\n/* globals google */\nimport { Component, Prop, Watch, Vue } from 'vue-property-decorator';\nimport { Loader } from '@googlemaps/js-api-loader';\nimport MarkerClusterer from '@googlemaps/markerclustererplus';\nimport {} from 'google.maps';\nimport { Location } from '@/models/location.model';\n\n@Component\nexport default class GoogleMap extends Vue {\n //replace apiKey prop with a get function?\n @Prop() private apiKey!: string;\n @Prop({\n default() {\n return {\n center: { lat: 41.95766534107732, lng: -87.67357280901598 },\n zoom: 19,\n mapTypeControl: false,\n streetViewControl: false\n };\n }\n })\n private mapConfig!: {\n center: { lat: number; lng: number };\n zoom: number;\n };\n @Prop() private locations!: Location[];\n @Prop() private cluster!: boolean;\n\n private loader = new Loader({\n apiKey: this.apiKey,\n version: 'quarterly',\n libraries: ['places']\n });\n\n private map!: google.maps.Map;\n private bounds!: google.maps.LatLngBounds;\n private markersArray!: google.maps.Marker[];\n private markerClusterer!: MarkerClusterer;\n\n @Watch('locations')\n watcherFunction(newLocations: Location[]): void {\n const newLoc = newLocations[newLocations.length - 1];\n this.addMarker(newLoc);\n this.map.fitBounds(this.bounds);\n if (this.cluster) {\n this.markerClusterer.addMarker(\n this.markersArray[this.markersArray.length - 1]\n );\n }\n }\n\n mounted(): void {\n // Instantiate map, bounds, markersArray\n this.loader\n .load()\n .then(() => {\n this.map = new google.maps.Map(\n document.getElementById('map') as HTMLElement,\n this.mapConfig\n );\n this.bounds = new google.maps.LatLngBounds();\n this.markersArray = [];\n\n // Add a marker for each location in the array.\n this.locations.forEach(this.addMarker);\n\n if (this.cluster) {\n this.clusterMarkers();\n }\n\n if (this.locations.length === 1) {\n this.map.setCenter(\n this.locations[0].position as google.maps.LatLngLiteral\n );\n } else {\n // Use our bounds object to properly center and zoom our map.\n this.map.fitBounds(this.bounds);\n }\n })\n .catch((err) => {\n console.log(err);\n });\n }\n\n addMarker(loc: Location): void {\n // Instantiate a marker for a location\n const marker = new google.maps.Marker({\n position: loc.position as google.maps.LatLngLiteral,\n map: this.map,\n title: loc.title\n });\n\n // Instantiate an info window the marker.\n if (loc.description) {\n marker.addListener('click', () => {\n const infoWindow = new google.maps.InfoWindow();\n infoWindow.setContent(\n '
' +\n loc.description +\n '
'\n );\n infoWindow.open(this.map, marker);\n });\n }\n\n // Add marker to array\n this.markersArray.push(marker);\n\n // Add each location to our bounds object\n this.bounds.extend(loc.position as google.maps.LatLngLiteral);\n }\n\n clusterMarkers(): void {\n this.markerClusterer = new MarkerClusterer(this.map, this.markersArray, {\n imagePath:\n 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'\n });\n }\n\n setMapOnAll(map: google.maps.Map | null): void {\n this.markersArray.forEach((marker) => {\n marker.setMap(map);\n });\n }\n\n hideMarkers(): void {\n if (this.cluster) {\n this.markerClusterer.clearMarkers();\n } else {\n this.setMapOnAll(null);\n }\n }\n\n showMarkers(): void {\n if (this.cluster) {\n this.clusterMarkers();\n } else {\n this.setMapOnAll(this.map);\n }\n }\n\n deleteMarkers(): void {\n this.hideMarkers();\n this.markersArray = [];\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GoogleMap.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GoogleMap.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./GoogleMap.vue?vue&type=template&id=3446cf66&scoped=true&\"\nimport script from \"./GoogleMap.vue?vue&type=script&lang=ts&\"\nexport * from \"./GoogleMap.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./GoogleMap.vue?vue&type=style&index=0&id=3446cf66&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3446cf66\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GoogleMap.vue?vue&type=style&index=0&id=3446cf66&scoped=true&lang=css&\""],"sourceRoot":""}