{"version":3,"file":"plugins.js","sources":["plugins.js"],"sourcesContent":["/**\r\n* @preserve Copyright 2012 Twitter, Inc.\r\n* @license http://www.apache.org/licenses/LICENSE-2.0.txt\r\n*/\r\nvar Hogan = {}; !function (t) { function n(t, n, e) { var i; return n && \"object\" == typeof n && (void 0 !== n[t] ? i = n[t] : e && n.get && \"function\" == typeof n.get && (i = n.get(t))), i } function e(t, n, e, i, r, s) { function a() { } function o() { } a.prototype = t, o.prototype = t.subs; var u, c = new a; c.subs = new o, c.subsText = {}, c.buf = \"\", i = i || {}, c.stackSubs = i, c.subsText = s; for (u in n) i[u] || (i[u] = n[u]); for (u in i) c.subs[u] = i[u]; r = r || {}, c.stackPartials = r; for (u in e) r[u] || (r[u] = e[u]); for (u in r) c.partials[u] = r[u]; return c } function i(t) { return String(null === t || void 0 === t ? \"\" : t) } function r(t) { return t = i(t), l.test(t) ? t.replace(s, \"&\").replace(a, \"<\").replace(o, \">\").replace(u, \"'\").replace(c, \""\") : t } t.Template = function (t, n, e, i) { t = t || {}, this.r = t.code || this.r, this.c = e, this.options = i || {}, this.text = n || \"\", this.partials = t.partials || {}, this.subs = t.subs || {}, this.buf = \"\" }, t.Template.prototype = { r: function () { return \"\" }, v: r, t: i, render: function (t, n, e) { return this.ri([t], n || {}, e) }, ri: function (t, n, e) { return this.r(t, n, e) }, ep: function (t, n) { var i = this.partials[t], r = n[i.name]; if (i.instance && i.base == r) return i.instance; if (\"string\" == typeof r) { if (!this.c) throw new Error(\"No compiler available.\"); r = this.c.compile(r, this.options) } if (!r) return null; if (this.partials[t].base = r, i.subs) { n.stackText || (n.stackText = {}); for (key in i.subs) n.stackText[key] || (n.stackText[key] = void 0 !== this.activeSub && n.stackText[this.activeSub] ? n.stackText[this.activeSub] : this.text); r = e(r, i.subs, i.partials, this.stackSubs, this.stackPartials, n.stackText) } return this.partials[t].instance = r, r }, rp: function (t, n, e, i) { var r = this.ep(t, e); return r ? r.ri(n, e, i) : \"\" }, rs: function (t, n, e) { var i = t[t.length - 1]; if (!f(i)) return void e(t, n, this); for (var r = 0; r < i.length; r++) t.push(i[r]), e(t, n, this), t.pop() }, s: function (t, n, e, i, r, s, a) { var o; return f(t) && 0 === t.length ? !1 : (\"function\" == typeof t && (t = this.ms(t, n, e, i, r, s, a)), o = !!t, !i && o && n && n.push(\"object\" == typeof t ? t : n[n.length - 1]), o) }, d: function (t, e, i, r) { var s, a = t.split(\".\"), o = this.f(a[0], e, i, r), u = this.options.modelGet, c = null; if (\".\" === t && f(e[e.length - 2])) o = e[e.length - 1]; else for (var l = 1; l < a.length; l++) s = n(a[l], o, u), void 0 !== s ? (c = o, o = s) : o = \"\"; return r && !o ? !1 : (r || \"function\" != typeof o || (e.push(c), o = this.mv(o, e, i), e.pop()), o) }, f: function (t, e, i, r) { for (var s = !1, a = null, o = !1, u = this.options.modelGet, c = e.length - 1; c >= 0; c--) if (a = e[c], s = n(t, a, u), void 0 !== s) { o = !0; break } return o ? (r || \"function\" != typeof s || (s = this.mv(s, e, i)), s) : r ? !1 : \"\" }, ls: function (t, n, e, r, s) { var a = this.options.delimiters; return this.options.delimiters = s, this.b(this.ct(i(t.call(n, r)), n, e)), this.options.delimiters = a, !1 }, ct: function (t, n, e) { if (this.options.disableLambda) throw new Error(\"Lambda features disabled.\"); return this.c.compile(t, this.options).render(n, e) }, b: function (t) { this.buf += t }, fl: function () { var t = this.buf; return this.buf = \"\", t }, ms: function (t, n, e, i, r, s, a) { var o, u = n[n.length - 1], c = t.call(u); return \"function\" == typeof c ? i ? !0 : (o = this.activeSub && this.subsText && this.subsText[this.activeSub] ? this.subsText[this.activeSub] : this.text, this.ls(c, u, e, o.substring(r, s), a)) : c }, mv: function (t, n, e) { var r = n[n.length - 1], s = t.call(r); return \"function\" == typeof s ? this.ct(i(s.call(r)), r, e) : s }, sub: function (t, n, e, i) { var r = this.subs[t]; r && (this.activeSub = t, r(n, e, this, i), this.activeSub = !1) } }; var s = /&/g, a = //g, u = /\\'/g, c = /\\\"/g, l = /[&<>\\\"\\']/, f = Array.isArray || function (t) { return \"[object Array]\" === Object.prototype.toString.call(t) } }(\"undefined\" != typeof exports ? exports : Hogan), function (t) { function n(t) { \"}\" === t.n.substr(t.n.length - 1) && (t.n = t.n.substring(0, t.n.length - 1)) } function e(t) { return t.trim ? t.trim() : t.replace(/^\\s*|\\s*$/g, \"\") } function i(t, n, e) { if (n.charAt(e) != t.charAt(0)) return !1; for (var i = 1, r = t.length; r > i; i++) if (n.charAt(e + i) != t.charAt(i)) return !1; return !0 } function r(n, e, i, o) { var u = [], c = null, l = null, f = null; for (l = i[i.length - 1]; n.length > 0;) { if (f = n.shift(), l && \"<\" == l.tag && !(f.tag in k)) throw new Error(\"Illegal content in < super tag.\"); if (t.tags[f.tag] <= t.tags.$ || s(f, o)) i.push(f), f.nodes = r(n, f.tag, i, o); else { if (\"/\" == f.tag) { if (0 === i.length) throw new Error(\"Closing tag without opener: /\" + f.n); if (c = i.pop(), f.n != c.n && !a(f.n, c.n, o)) throw new Error(\"Nesting error: \" + c.n + \" vs. \" + f.n); return c.end = f.i, u } \"\\n\" == f.tag && (f.last = 0 == n.length || \"\\n\" == n[0].tag) } u.push(f) } if (i.length > 0) throw new Error(\"missing closing tag: \" + i.pop().n); return u } function s(t, n) { for (var e = 0, i = n.length; i > e; e++) if (n[e].o == t.n) return t.tag = \"#\", !0 } function a(t, n, e) { for (var i = 0, r = e.length; r > i; i++) if (e[i].c == t && e[i].o == n) return !0 } function o(t) { var n = []; for (var e in t) n.push('\"' + c(e) + '\": function(c,p,t,i) {' + t[e] + \"}\"); return \"{ \" + n.join(\",\") + \" }\" } function u(t) { var n = []; for (var e in t.partials) n.push('\"' + c(e) + '\":{name:\"' + c(t.partials[e].name) + '\", ' + u(t.partials[e]) + \"}\"); return \"partials: {\" + n.join(\",\") + \"}, subs: \" + o(t.subs) } function c(t) { return t.replace(m, \"\\\\\\\\\").replace(v, '\\\\\"').replace(b, \"\\\\n\").replace(d, \"\\\\r\").replace(x, \"\\\\u2028\").replace(w, \"\\\\u2029\") } function l(t) { return ~t.indexOf(\".\") ? \"d\" : \"f\" } function f(t, n) { var e = \"<\" + (n.prefix || \"\"), i = e + t.n + y++; return n.partials[i] = { name: t.n, partials: {} }, n.code += 't.b(t.rp(\"' + c(i) + '\",c,p,\"' + (t.indent || \"\") + '\"));', i } function h(t, n) { n.code += \"t.b(t.t(t.\" + l(t.n) + '(\"' + c(t.n) + '\",c,p,0)));' } function p(t) { return \"t.b(\" + t + \");\" } var g = /\\S/, v = /\\\"/g, b = /\\n/g, d = /\\r/g, m = /\\\\/g, x = /\\u2028/, w = /\\u2029/; t.tags = { \"#\": 1, \"^\": 2, \"<\": 3, $: 4, \"/\": 5, \"!\": 6, \">\": 7, \"=\": 8, _v: 9, \"{\": 10, \"&\": 11, _t: 12 }, t.scan = function (r, s) { function a() { m.length > 0 && (x.push({ tag: \"_t\", text: new String(m) }), m = \"\") } function o() { for (var n = !0, e = y; e < x.length; e++) if (n = t.tags[x[e].tag] < t.tags._v || \"_t\" == x[e].tag && null === x[e].text.match(g), !n) return !1; return n } function u(t, n) { if (a(), t && o()) for (var e, i = y; i < x.length; i++) x[i].text && ((e = x[i + 1]) && \">\" == e.tag && (e.indent = x[i].text.toString()), x.splice(i, 1)); else n || x.push({ tag: \"\\n\" }); w = !1, y = x.length } function c(t, n) { var i = \"=\" + S, r = t.indexOf(i, n), s = e(t.substring(t.indexOf(\"=\", n) + 1, r)).split(\" \"); return T = s[0], S = s[s.length - 1], r + i.length - 1 } var l = r.length, f = 0, h = 1, p = 2, v = f, b = null, d = null, m = \"\", x = [], w = !1, k = 0, y = 0, T = \"{{\", S = \"}}\"; for (s && (s = s.split(\" \"), T = s[0], S = s[1]), k = 0; l > k; k++) v == f ? i(T, r, k) ? (--k, a(), v = h) : \"\\n\" == r.charAt(k) ? u(w) : m += r.charAt(k) : v == h ? (k += T.length - 1, d = t.tags[r.charAt(k + 1)], b = d ? r.charAt(k + 1) : \"_v\", \"=\" == b ? (k = c(r, k), v = f) : (d && k++, v = p), w = k) : i(S, r, k) ? (x.push({ tag: b, n: e(m), otag: T, ctag: S, i: \"/\" == b ? w - T.length : k + S.length }), m = \"\", k += S.length - 1, v = f, \"{\" == b && (\"}}\" == S ? k++ : n(x[x.length - 1]))) : m += r.charAt(k); return u(w, !0), x }; var k = { _t: !0, \"\\n\": !0, $: !0, \"/\": !0 }; t.stringify = function (n) { return \"{code: function (c,p,i) { \" + t.wrapMain(n.code) + \" },\" + u(n) + \"}\" }; var y = 0; t.generate = function (n, e, i) { y = 0; var r = { code: \"\", subs: {}, partials: {} }; return t.walk(n, r), i.asString ? this.stringify(r, e, i) : this.makeTemplate(r, e, i) }, t.wrapMain = function (t) { return 'var t=this;t.b(i=i||\"\");' + t + \"return t.fl();\" }, t.template = t.Template, t.makeTemplate = function (t, n, e) { var i = this.makePartials(t); return i.code = new Function(\"c\", \"p\", \"i\", this.wrapMain(t.code)), new this.template(i, n, this, e) }, t.makePartials = function (t) { var n, e = { subs: {}, partials: t.partials, name: t.name }; for (n in e.partials) e.partials[n] = this.makePartials(e.partials[n]); for (n in t.subs) e.subs[n] = new Function(\"c\", \"p\", \"t\", \"i\", t.subs[n]); return e }, t.codegen = { \"#\": function (n, e) { e.code += \"if(t.s(t.\" + l(n.n) + '(\"' + c(n.n) + '\",c,p,1),c,p,0,' + n.i + \",\" + n.end + ',\"' + n.otag + \" \" + n.ctag + '\")){t.rs(c,p,function(c,p,t){', t.walk(n.nodes, e), e.code += \"});c.pop();}\" }, \"^\": function (n, e) { e.code += \"if(!t.s(t.\" + l(n.n) + '(\"' + c(n.n) + '\",c,p,1),c,p,1,0,0,\"\")){', t.walk(n.nodes, e), e.code += \"};\" }, \">\": f, \"<\": function (n, e) { var i = { partials: {}, code: \"\", subs: {}, inPartial: !0 }; t.walk(n.nodes, i); var r = e.partials[f(n, e)]; r.subs = i.subs, r.partials = i.partials }, $: function (n, e) { var i = { subs: {}, code: \"\", partials: e.partials, prefix: n.n }; t.walk(n.nodes, i), e.subs[n.n] = i.code, e.inPartial || (e.code += 't.sub(\"' + c(n.n) + '\",c,p,i);') }, \"\\n\": function (t, n) { n.code += p('\"\\\\n\"' + (t.last ? \"\" : \" + i\")) }, _v: function (t, n) { n.code += \"t.b(t.v(t.\" + l(t.n) + '(\"' + c(t.n) + '\",c,p,0)));' }, _t: function (t, n) { n.code += p('\"' + c(t.text) + '\"') }, \"{\": h, \"&\": h }, t.walk = function (n, e) { for (var i, r = 0, s = n.length; s > r; r++) i = t.codegen[n[r].tag], i && i(n[r], e); return e }, t.parse = function (t, n, e) { return e = e || {}, r(t, \"\", [], e.sectionTags || []) }, t.cache = {}, t.cacheKey = function (t, n) { return [t, !!n.asString, !!n.disableLambda, n.delimiters, !!n.modelGet].join(\"||\") }, t.compile = function (n, e) { e = e || {}; var i = t.cacheKey(n, e), r = this.cache[i]; if (r) { var s = r.partials; for (var a in s) delete s[a].instance; return r } return r = this.generate(this.parse(this.scan(n, e.delimiters), n, e), n, e), this.cache[i] = r } }(\"undefined\" != typeof exports ? exports : Hogan);\n// ==ClosureCompiler==\r\n// @compilation_level ADVANCED_OPTIMIZATIONS\r\n// @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/maps/google_maps_api_v3_3.js\r\n// ==/ClosureCompiler==\r\n\r\n/**\r\n * @name MarkerClusterer for Google Maps v3\r\n * @version version 1.0.3\r\n * @author Luke Mahe\r\n * @fileoverview\r\n * The library creates and manages per-zoom-level clusters for large amounts of\r\n * markers.\r\n */\r\n\r\n/**\r\n * @license\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/**\r\n * A Marker Clusterer that clusters markers.\r\n *\r\n * @param {google.maps.Map} map The Google map to attach to.\r\n * @param {Array.=} opt_markers Optional markers to add to\r\n * the cluster.\r\n * @param {Object=} opt_options support the following options:\r\n * 'gridSize': (number) The grid size of a cluster in pixels.\r\n * 'maxZoom': (number) The maximum zoom level that a marker can be part of a\r\n * cluster.\r\n * 'zoomOnClick': (boolean) Whether the default behaviour of clicking on a\r\n * cluster is to zoom into it.\r\n * 'imagePath': (string) The base URL where the images representing\r\n * clusters will be found. The full URL will be:\r\n * {imagePath}[1-5].{imageExtension}\r\n * Default: '../images/m'.\r\n * 'imageExtension': (string) The suffix for images URL representing\r\n * clusters will be found. See _imagePath_ for details.\r\n * Default: 'png'.\r\n * 'averageCenter': (boolean) Whether the center of each cluster should be\r\n * the average of all markers in the cluster.\r\n * 'minimumClusterSize': (number) The minimum number of markers to be in a\r\n * cluster before the markers are hidden and a count\r\n * is shown.\r\n * 'styles': (object) An object that has style properties:\r\n * 'url': (string) The image url.\r\n * 'height': (number) The image height.\r\n * 'width': (number) The image width.\r\n * 'anchor': (Array) The anchor position of the label text.\r\n * 'textColor': (string) The text color.\r\n * 'textSize': (number) The text size.\r\n * 'backgroundPosition': (string) The position of the backgound x, y.\r\n * @constructor\r\n * @extends google.maps.OverlayView\r\n */\r\nfunction MarkerClusterer(map, opt_markers, opt_options) {\r\n\t// MarkerClusterer implements google.maps.OverlayView interface. We use the\r\n\t// extend function to extend MarkerClusterer with google.maps.OverlayView\r\n\t// because it might not always be available when the code is defined so we\r\n\t// look for it at the last possible moment. If it doesn't exist now then\r\n\t// there is no point going ahead :)\r\n\tthis.extend(MarkerClusterer, google.maps.OverlayView);\r\n\tthis.map_ = map;\r\n\r\n\t/**\r\n\t * @type {Array.}\r\n\t * @private\r\n\t */\r\n\tthis.markers_ = [];\r\n\r\n\t/**\r\n\t * @type {Array.}\r\n\t */\r\n\tthis.clusters_ = [];\r\n\r\n\tthis.sizes = [53, 56, 66, 78, 90];\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tthis.styles_ = [];\r\n\r\n\t/**\r\n\t * @type {boolean}\r\n\t * @private\r\n\t */\r\n\tthis.ready_ = false;\r\n\r\n\tvar options = opt_options || {};\r\n\r\n\t/**\r\n\t * @type {number}\r\n\t * @private\r\n\t */\r\n\tthis.gridSize_ = options['gridSize'] || 60;\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tthis.minClusterSize_ = options['minimumClusterSize'] || 2;\r\n\r\n\r\n\t/**\r\n\t * @type {?number}\r\n\t * @private\r\n\t */\r\n\tthis.maxZoom_ = options['maxZoom'] || null;\r\n\r\n\tthis.styles_ = options['styles'] || [];\r\n\r\n\t/**\r\n\t * @type {string}\r\n\t * @private\r\n\t */\r\n\tthis.imagePath_ = options['imagePath'] ||\r\n\t\tthis.MARKER_CLUSTER_IMAGE_PATH_;\r\n\r\n\t/**\r\n\t * @type {string}\r\n\t * @private\r\n\t */\r\n\tthis.imageExtension_ = options['imageExtension'] ||\r\n\t\tthis.MARKER_CLUSTER_IMAGE_EXTENSION_;\r\n\r\n\t/**\r\n\t * @type {boolean}\r\n\t * @private\r\n\t */\r\n\tthis.zoomOnClick_ = true;\r\n\r\n\tif (options['zoomOnClick'] != undefined) {\r\n\t\tthis.zoomOnClick_ = options['zoomOnClick'];\r\n\t}\r\n\r\n\t/**\r\n\t * @type {boolean}\r\n\t * @private\r\n\t */\r\n\tthis.averageCenter_ = false;\r\n\r\n\tif (options['averageCenter'] != undefined) {\r\n\t\tthis.averageCenter_ = options['averageCenter'];\r\n\t}\r\n\r\n\tthis.setupStyles_();\r\n\r\n\tthis.setMap(map);\r\n\r\n\t/**\r\n\t * @type {number}\r\n\t * @private\r\n\t */\r\n\tthis.prevZoom_ = this.map_.getZoom();\r\n\r\n\t// Add the map event listeners\r\n\tvar that = this;\r\n\tgoogle.maps.event.addListener(this.map_, 'zoom_changed', function() {\r\n\t\t// Determines map type and prevent illegal zoom levels\r\n\t\tvar zoom = that.map_.getZoom();\r\n\t\tvar minZoom = that.map_.minZoom || 0;\r\n\t\tvar maxZoom = Math.min(that.map_.maxZoom || 100,\r\n\t\t\tthat.map_.mapTypes[that.map_.getMapTypeId()].maxZoom);\r\n\t\tzoom = Math.min(Math.max(zoom, minZoom), maxZoom);\r\n\r\n\t\tif (that.prevZoom_ != zoom) {\r\n\t\t\tthat.prevZoom_ = zoom;\r\n\t\t\tthat.resetViewport();\r\n\t\t}\r\n\t});\r\n\r\n\tgoogle.maps.event.addListener(this.map_, 'idle', function() {\r\n\t\tthat.redraw();\r\n\t});\r\n\r\n\t// Finally, add the markers\r\n\tif (opt_markers && (opt_markers.length || Object.keys(opt_markers).length)) {\r\n\t\tthis.addMarkers(opt_markers, false);\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * The marker cluster image path.\r\n *\r\n * @type {string}\r\n * @private\r\n */\r\nMarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ = '../images/m';\r\n\r\n\r\n/**\r\n * The marker cluster image path.\r\n *\r\n * @type {string}\r\n * @private\r\n */\r\nMarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_ = 'png';\r\n\r\n\r\n/**\r\n * Extends a objects prototype by anothers.\r\n *\r\n * @param {Object} obj1 The object to be extended.\r\n * @param {Object} obj2 The object to extend with.\r\n * @return {Object} The new extended object.\r\n * @ignore\r\n */\r\nMarkerClusterer.prototype.extend = function(obj1, obj2) {\r\n\treturn (function(object) {\r\n\t\tfor (var property in object.prototype) {\r\n\t\t\tthis.prototype[property] = object.prototype[property];\r\n\t\t}\r\n\t\treturn this;\r\n\t}).apply(obj1, [obj2]);\r\n};\r\n\r\n\r\n/**\r\n * Implementaion of the interface method.\r\n * @ignore\r\n */\r\nMarkerClusterer.prototype.onAdd = function() {\r\n\tthis.setReady_(true);\r\n};\r\n\r\n/**\r\n * Implementaion of the interface method.\r\n * @ignore\r\n */\r\nMarkerClusterer.prototype.draw = function() { };\r\n\r\n/**\r\n * Sets up the styles object.\r\n *\r\n * @private\r\n */\r\nMarkerClusterer.prototype.setupStyles_ = function() {\r\n\tif (this.styles_.length) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tfor (var i = 0, size; size = this.sizes[i]; i++) {\r\n\t\tthis.styles_.push({\r\n\t\t\turl: this.imagePath_,\r\n\t\t\theight: size,\r\n\t\t\twidth: size\r\n\t\t});\r\n\t}\r\n};\r\n\r\n/**\r\n * Fit the map to the bounds of the markers in the clusterer.\r\n */\r\nMarkerClusterer.prototype.fitMapToMarkers = function() {\r\n\tvar markers = this.getMarkers();\r\n\tvar bounds = new google.maps.LatLngBounds();\r\n\tfor (var i = 0, marker; marker = markers[i]; i++) {\r\n\t\tbounds.extend(marker.getPosition());\r\n\t}\r\n\r\n\tthis.map_.fitBounds(bounds);\r\n};\r\n\r\n\r\n/**\r\n * Sets the styles.\r\n *\r\n * @param {Object} styles The style to set.\r\n */\r\nMarkerClusterer.prototype.setStyles = function(styles) {\r\n\tthis.styles_ = styles;\r\n};\r\n\r\n\r\n/**\r\n * Gets the styles.\r\n *\r\n * @return {Object} The styles object.\r\n */\r\nMarkerClusterer.prototype.getStyles = function() {\r\n\treturn this.styles_;\r\n};\r\n\r\n\r\n/**\r\n * Whether zoom on click is set.\r\n *\r\n * @return {boolean} True if zoomOnClick_ is set.\r\n */\r\nMarkerClusterer.prototype.isZoomOnClick = function() {\r\n\treturn this.zoomOnClick_;\r\n};\r\n\r\n/**\r\n * Whether average center is set.\r\n *\r\n * @return {boolean} True if averageCenter_ is set.\r\n */\r\nMarkerClusterer.prototype.isAverageCenter = function() {\r\n\treturn this.averageCenter_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the array of markers in the clusterer.\r\n *\r\n * @return {Array.} The markers.\r\n */\r\nMarkerClusterer.prototype.getMarkers = function() {\r\n\treturn this.markers_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the number of markers in the clusterer\r\n *\r\n * @return {Number} The number of markers.\r\n */\r\nMarkerClusterer.prototype.getTotalMarkers = function() {\r\n\treturn this.markers_.length;\r\n};\r\n\r\n\r\n/**\r\n * Sets the max zoom for the clusterer.\r\n *\r\n * @param {number} maxZoom The max zoom level.\r\n */\r\nMarkerClusterer.prototype.setMaxZoom = function(maxZoom) {\r\n\tthis.maxZoom_ = maxZoom;\r\n};\r\n\r\n\r\n/**\r\n * Gets the max zoom for the clusterer.\r\n *\r\n * @return {number} The max zoom level.\r\n */\r\nMarkerClusterer.prototype.getMaxZoom = function() {\r\n\treturn this.maxZoom_;\r\n};\r\n\r\n\r\n/**\r\n * The function for calculating the cluster icon image.\r\n *\r\n * @param {Array.} markers The markers in the clusterer.\r\n * @param {number} numStyles The number of styles available.\r\n * @return {Object} A object properties: 'text' (string) and 'index' (number).\r\n * @private\r\n */\r\nMarkerClusterer.prototype.calculator_ = function(markers, numStyles) {\r\n\tvar index = 0;\r\n\tvar count = markers.length;\r\n\tvar dv = count;\r\n\twhile (dv !== 0) {\r\n\t\tdv = parseInt(dv / 10, 10);\r\n\t\tindex++;\r\n\t}\r\n\r\n\tindex = Math.min(index, numStyles);\r\n\treturn {\r\n\t\ttext: count,\r\n\t\tindex: index\r\n\t};\r\n};\r\n\r\n\r\n/**\r\n * Set the calculator function.\r\n *\r\n * @param {function(Array, number)} calculator The function to set as the\r\n * calculator. The function should return a object properties:\r\n * 'text' (string) and 'index' (number).\r\n *\r\n */\r\nMarkerClusterer.prototype.setCalculator = function(calculator) {\r\n\tthis.calculator_ = calculator;\r\n};\r\n\r\n\r\n/**\r\n * Get the calculator function.\r\n *\r\n * @return {function(Array, number)} the calculator function.\r\n */\r\nMarkerClusterer.prototype.getCalculator = function() {\r\n\treturn this.calculator_;\r\n};\r\n\r\n\r\n/**\r\n * Add an array of markers to the clusterer.\r\n *\r\n * @param {Array.} markers The markers to add.\r\n * @param {boolean=} opt_nodraw Whether to redraw the clusters.\r\n */\r\nMarkerClusterer.prototype.addMarkers = function(markers, opt_nodraw) {\r\n\tif (markers.length) {\r\n\t\tfor (var i = 0, marker; marker = markers[i]; i++) {\r\n\t\t\tthis.pushMarkerTo_(marker);\r\n\t\t}\r\n\t} else if (Object.keys(markers).length) {\r\n\t\tfor (var marker in markers) {\r\n\t\t\tthis.pushMarkerTo_(markers[marker]);\r\n\t\t}\r\n\t}\r\n\tif (!opt_nodraw) {\r\n\t\tthis.redraw();\r\n\t}\r\n};\r\n\r\n\r\n/**\r\n * Pushes a marker to the clusterer.\r\n *\r\n * @param {google.maps.Marker} marker The marker to add.\r\n * @private\r\n */\r\nMarkerClusterer.prototype.pushMarkerTo_ = function(marker) {\r\n\tmarker.isAdded = false;\r\n\tif (marker['draggable']) {\r\n\t\t// If the marker is draggable add a listener so we update the clusters on\r\n\t\t// the drag end.\r\n\t\tvar that = this;\r\n\t\tgoogle.maps.event.addListener(marker, 'dragend', function() {\r\n\t\t\tmarker.isAdded = false;\r\n\t\t\tthat.repaint();\r\n\t\t});\r\n\t}\r\n\tthis.markers_.push(marker);\r\n};\r\n\r\n\r\n/**\r\n * Adds a marker to the clusterer and redraws if needed.\r\n *\r\n * @param {google.maps.Marker} marker The marker to add.\r\n * @param {boolean=} opt_nodraw Whether to redraw the clusters.\r\n */\r\nMarkerClusterer.prototype.addMarker = function(marker, opt_nodraw) {\r\n\tthis.pushMarkerTo_(marker);\r\n\tif (!opt_nodraw) {\r\n\t\tthis.redraw();\r\n\t}\r\n};\r\n\r\n\r\n/**\r\n * Removes a marker and returns true if removed, false if not\r\n *\r\n * @param {google.maps.Marker} marker The marker to remove\r\n * @return {boolean} Whether the marker was removed or not\r\n * @private\r\n */\r\nMarkerClusterer.prototype.removeMarker_ = function(marker) {\r\n\tvar index = -1;\r\n\tif (this.markers_.indexOf) {\r\n\t\tindex = this.markers_.indexOf(marker);\r\n\t} else {\r\n\t\tfor (var i = 0, m; m = this.markers_[i]; i++) {\r\n\t\t\tif (m == marker) {\r\n\t\t\t\tindex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (index == -1) {\r\n\t\t// Marker is not in our list of markers.\r\n\t\treturn false;\r\n\t}\r\n\r\n\tmarker.setMap(null);\r\n\r\n\tthis.markers_.splice(index, 1);\r\n\r\n\treturn true;\r\n};\r\n\r\n\r\n/**\r\n * Remove a marker from the cluster.\r\n *\r\n * @param {google.maps.Marker} marker The marker to remove.\r\n * @param {boolean=} opt_nodraw Optional boolean to force no redraw.\r\n * @return {boolean} True if the marker was removed.\r\n */\r\nMarkerClusterer.prototype.removeMarker = function(marker, opt_nodraw) {\r\n\tvar removed = this.removeMarker_(marker);\r\n\r\n\tif (!opt_nodraw && removed) {\r\n\t\tthis.resetViewport();\r\n\t\tthis.redraw();\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n};\r\n\r\n\r\n/**\r\n * Removes an array of markers from the cluster.\r\n *\r\n * @param {Array.} markers The markers to remove.\r\n * @param {boolean=} opt_nodraw Optional boolean to force no redraw.\r\n */\r\nMarkerClusterer.prototype.removeMarkers = function(markers, opt_nodraw) {\r\n\t// create a local copy of markers if required\r\n\t// (removeMarker_ modifies the getMarkers() array in place)\r\n\tvar markersCopy = markers === this.getMarkers() ? markers.slice() : markers;\r\n\tvar removed = false;\r\n\r\n\tfor (var i = 0, marker; marker = markersCopy[i]; i++) {\r\n\t\tvar r = this.removeMarker_(marker);\r\n\t\tremoved = removed || r;\r\n\t}\r\n\r\n\tif (!opt_nodraw && removed) {\r\n\t\tthis.resetViewport();\r\n\t\tthis.redraw();\r\n\t\treturn true;\r\n\t}\r\n};\r\n\r\n\r\n/**\r\n * Sets the clusterer's ready state.\r\n *\r\n * @param {boolean} ready The state.\r\n * @private\r\n */\r\nMarkerClusterer.prototype.setReady_ = function(ready) {\r\n\tif (!this.ready_) {\r\n\t\tthis.ready_ = ready;\r\n\t\tthis.createClusters_();\r\n\t}\r\n};\r\n\r\n\r\n/**\r\n * Returns the number of clusters in the clusterer.\r\n *\r\n * @return {number} The number of clusters.\r\n */\r\nMarkerClusterer.prototype.getTotalClusters = function() {\r\n\treturn this.clusters_.length;\r\n};\r\n\r\n\r\n/**\r\n * Returns the google map that the clusterer is associated with.\r\n *\r\n * @return {google.maps.Map} The map.\r\n */\r\nMarkerClusterer.prototype.getMap = function() {\r\n\treturn this.map_;\r\n};\r\n\r\n\r\n/**\r\n * Sets the google map that the clusterer is associated with.\r\n *\r\n * @param {google.maps.Map} map The map.\r\n */\r\nMarkerClusterer.prototype.setMap = function(map) {\r\n\tthis.map_ = map;\r\n};\r\n\r\n\r\n/**\r\n * Returns the size of the grid.\r\n *\r\n * @return {number} The grid size.\r\n */\r\nMarkerClusterer.prototype.getGridSize = function() {\r\n\treturn this.gridSize_;\r\n};\r\n\r\n\r\n/**\r\n * Sets the size of the grid.\r\n *\r\n * @param {number} size The grid size.\r\n */\r\nMarkerClusterer.prototype.setGridSize = function(size) {\r\n\tthis.gridSize_ = size;\r\n};\r\n\r\n\r\n/**\r\n * Returns the min cluster size.\r\n *\r\n * @return {number} The grid size.\r\n */\r\nMarkerClusterer.prototype.getMinClusterSize = function() {\r\n\treturn this.minClusterSize_;\r\n};\r\n\r\n/**\r\n * Sets the min cluster size.\r\n *\r\n * @param {number} size The grid size.\r\n */\r\nMarkerClusterer.prototype.setMinClusterSize = function(size) {\r\n\tthis.minClusterSize_ = size;\r\n};\r\n\r\n\r\n/**\r\n * Extends a bounds object by the grid size.\r\n *\r\n * @param {google.maps.LatLngBounds} bounds The bounds to extend.\r\n * @return {google.maps.LatLngBounds} The extended bounds.\r\n */\r\nMarkerClusterer.prototype.getExtendedBounds = function(bounds) {\r\n\tvar projection = this.getProjection();\r\n\r\n\t// Turn the bounds into latlng.\r\n\tvar tr = new google.maps.LatLng(bounds.getNorthEast().lat(),\r\n\t\tbounds.getNorthEast().lng());\r\n\tvar bl = new google.maps.LatLng(bounds.getSouthWest().lat(),\r\n\t\tbounds.getSouthWest().lng());\r\n\r\n\t// Convert the points to pixels and the extend out by the grid size.\r\n\tvar trPix = projection.fromLatLngToDivPixel(tr);\r\n\ttrPix.x += this.gridSize_;\r\n\ttrPix.y -= this.gridSize_;\r\n\r\n\tvar blPix = projection.fromLatLngToDivPixel(bl);\r\n\tblPix.x -= this.gridSize_;\r\n\tblPix.y += this.gridSize_;\r\n\r\n\t// Convert the pixel points back to LatLng\r\n\tvar ne = projection.fromDivPixelToLatLng(trPix);\r\n\tvar sw = projection.fromDivPixelToLatLng(blPix);\r\n\r\n\t// Extend the bounds to contain the new bounds.\r\n\tbounds.extend(ne);\r\n\tbounds.extend(sw);\r\n\r\n\treturn bounds;\r\n};\r\n\r\n\r\n/**\r\n * Determins if a marker is contained in a bounds.\r\n *\r\n * @param {google.maps.Marker} marker The marker to check.\r\n * @param {google.maps.LatLngBounds} bounds The bounds to check against.\r\n * @return {boolean} True if the marker is in the bounds.\r\n * @private\r\n */\r\nMarkerClusterer.prototype.isMarkerInBounds_ = function(marker, bounds) {\r\n\treturn bounds.contains(marker.getPosition());\r\n};\r\n\r\n\r\n/**\r\n * Clears all clusters and markers from the clusterer.\r\n */\r\nMarkerClusterer.prototype.clearMarkers = function() {\r\n\tthis.resetViewport(true);\r\n\r\n\t// Set the markers a empty array.\r\n\tthis.markers_ = [];\r\n};\r\n\r\n\r\n/**\r\n * Clears all existing clusters and recreates them.\r\n * @param {boolean} opt_hide To also hide the marker.\r\n */\r\nMarkerClusterer.prototype.resetViewport = function(opt_hide) {\r\n\t// Remove all the clusters\r\n\tfor (var i = 0, cluster; cluster = this.clusters_[i]; i++) {\r\n\t\tcluster.remove();\r\n\t}\r\n\r\n\t// Reset the markers to not be added and to be invisible.\r\n\tfor (var i = 0, marker; marker = this.markers_[i]; i++) {\r\n\t\tmarker.isAdded = false;\r\n\t\tif (opt_hide) {\r\n\t\t\tmarker.setMap(null);\r\n\t\t}\r\n\t}\r\n\r\n\tthis.clusters_ = [];\r\n};\r\n\r\n/**\r\n *\r\n */\r\nMarkerClusterer.prototype.repaint = function() {\r\n\tvar oldClusters = this.clusters_.slice();\r\n\tthis.clusters_.length = 0;\r\n\tthis.resetViewport();\r\n\tthis.redraw();\r\n\r\n\t// Remove the old clusters.\r\n\t// Do it in a timeout so the other clusters have been drawn first.\r\n\twindow.setTimeout(function() {\r\n\t\tfor (var i = 0, cluster; cluster = oldClusters[i]; i++) {\r\n\t\t\tcluster.remove();\r\n\t\t}\r\n\t}, 0);\r\n};\r\n\r\n\r\n/**\r\n * Redraws the clusters.\r\n */\r\nMarkerClusterer.prototype.redraw = function() {\r\n\tthis.createClusters_();\r\n};\r\n\r\n\r\n/**\r\n * Calculates the distance between two latlng locations in km.\r\n * @see http://www.movable-type.co.uk/scripts/latlong.html\r\n *\r\n * @param {google.maps.LatLng} p1 The first lat lng point.\r\n * @param {google.maps.LatLng} p2 The second lat lng point.\r\n * @return {number} The distance between the two points in km.\r\n * @private\r\n*/\r\nMarkerClusterer.prototype.distanceBetweenPoints_ = function(p1, p2) {\r\n\tif (!p1 || !p2) {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\tvar R = 6371; // Radius of the Earth in km\r\n\tvar dLat = (p2.lat() - p1.lat()) * Math.PI / 180;\r\n\tvar dLon = (p2.lng() - p1.lng()) * Math.PI / 180;\r\n\tvar a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\r\n\t\tMath.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) *\r\n\t\tMath.sin(dLon / 2) * Math.sin(dLon / 2);\r\n\tvar c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\r\n\tvar d = R * c;\r\n\treturn d;\r\n};\r\n\r\n\r\n/**\r\n * Add a marker to a cluster, or creates a new cluster.\r\n *\r\n * @param {google.maps.Marker} marker The marker to add.\r\n * @private\r\n */\r\nMarkerClusterer.prototype.addToClosestCluster_ = function(marker) {\r\n\tvar distance = 40000; // Some large number\r\n\tvar clusterToAddTo = null;\r\n\tvar pos = marker.getPosition();\r\n\tfor (var i = 0, cluster; cluster = this.clusters_[i]; i++) {\r\n\t\tvar center = cluster.getCenter();\r\n\t\tif (center) {\r\n\t\t\tvar d = this.distanceBetweenPoints_(center, marker.getPosition());\r\n\t\t\tif (d < distance) {\r\n\t\t\t\tdistance = d;\r\n\t\t\t\tclusterToAddTo = cluster;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\r\n\t\tclusterToAddTo.addMarker(marker);\r\n\t} else {\r\n\t\tvar cluster = new Cluster(this);\r\n\t\tcluster.addMarker(marker);\r\n\t\tthis.clusters_.push(cluster);\r\n\t}\r\n};\r\n\r\n\r\n/**\r\n * Creates the clusters.\r\n *\r\n * @private\r\n */\r\nMarkerClusterer.prototype.createClusters_ = function() {\r\n\tif (!this.ready_) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Get our current map view bounds.\r\n\t// Create a new bounds object so we don't affect the map.\r\n\tvar mapBounds = new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),\r\n\t\tthis.map_.getBounds().getNorthEast());\r\n\tvar bounds = this.getExtendedBounds(mapBounds);\r\n\r\n\tfor (var i = 0, marker; marker = this.markers_[i]; i++) {\r\n\t\tif (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) {\r\n\t\t\tthis.addToClosestCluster_(marker);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\n/**\r\n * A cluster that contains markers.\r\n *\r\n * @param {MarkerClusterer} markerClusterer The markerclusterer that this\r\n * cluster is associated with.\r\n * @constructor\r\n * @ignore\r\n */\r\nfunction Cluster(markerClusterer) {\r\n\tthis.markerClusterer_ = markerClusterer;\r\n\tthis.map_ = markerClusterer.getMap();\r\n\tthis.gridSize_ = markerClusterer.getGridSize();\r\n\tthis.minClusterSize_ = markerClusterer.getMinClusterSize();\r\n\tthis.averageCenter_ = markerClusterer.isAverageCenter();\r\n\tthis.center_ = null;\r\n\tthis.markers_ = [];\r\n\tthis.bounds_ = null;\r\n\tthis.clusterIcon_ = new ClusterIcon(this, markerClusterer.getStyles(),\r\n\t\tmarkerClusterer.getGridSize());\r\n}\r\n\r\n/**\r\n * Determins if a marker is already added to the cluster.\r\n *\r\n * @param {google.maps.Marker} marker The marker to check.\r\n * @return {boolean} True if the marker is already added.\r\n */\r\nCluster.prototype.isMarkerAlreadyAdded = function(marker) {\r\n\tif (this.markers_.indexOf) {\r\n\t\treturn this.markers_.indexOf(marker) != -1;\r\n\t} else {\r\n\t\tfor (var i = 0, m; m = this.markers_[i]; i++) {\r\n\t\t\tif (m == marker) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n};\r\n\r\n\r\n/**\r\n * Add a marker the cluster.\r\n *\r\n * @param {google.maps.Marker} marker The marker to add.\r\n * @return {boolean} True if the marker was added.\r\n */\r\nCluster.prototype.addMarker = function(marker) {\r\n\tif (this.isMarkerAlreadyAdded(marker)) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif (!this.center_) {\r\n\t\tthis.center_ = marker.getPosition();\r\n\t\tthis.calculateBounds_();\r\n\t} else {\r\n\t\tif (this.averageCenter_) {\r\n\t\t\tvar l = this.markers_.length + 1;\r\n\t\t\tvar lat = (this.center_.lat() * (l - 1) + marker.getPosition().lat()) / l;\r\n\t\t\tvar lng = (this.center_.lng() * (l - 1) + marker.getPosition().lng()) / l;\r\n\t\t\tthis.center_ = new google.maps.LatLng(lat, lng);\r\n\t\t\tthis.calculateBounds_();\r\n\t\t}\r\n\t}\r\n\r\n\tmarker.isAdded = true;\r\n\tthis.markers_.push(marker);\r\n\r\n\tvar len = this.markers_.length;\r\n\tif (len < this.minClusterSize_ && marker.getMap() != this.map_) {\r\n\t\t// Min cluster size not reached so show the marker.\r\n\t\tmarker.setMap(this.map_);\r\n\t}\r\n\r\n\tif (len == this.minClusterSize_) {\r\n\t\t// Hide the markers that were showing.\r\n\t\tfor (var i = 0; i < len; i++) {\r\n\t\t\tthis.markers_[i].setMap(null);\r\n\t\t}\r\n\t}\r\n\r\n\tif (len >= this.minClusterSize_) {\r\n\t\tmarker.setMap(null);\r\n\t}\r\n\r\n\tthis.updateIcon();\r\n\treturn true;\r\n};\r\n\r\n\r\n/**\r\n * Returns the marker clusterer that the cluster is associated with.\r\n *\r\n * @return {MarkerClusterer} The associated marker clusterer.\r\n */\r\nCluster.prototype.getMarkerClusterer = function() {\r\n\treturn this.markerClusterer_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the bounds of the cluster.\r\n *\r\n * @return {google.maps.LatLngBounds} the cluster bounds.\r\n */\r\nCluster.prototype.getBounds = function() {\r\n\tvar bounds = new google.maps.LatLngBounds(this.center_, this.center_);\r\n\tvar markers = this.getMarkers();\r\n\tfor (var i = 0, marker; marker = markers[i]; i++) {\r\n\t\tbounds.extend(marker.getPosition());\r\n\t}\r\n\treturn bounds;\r\n};\r\n\r\n\r\n/**\r\n * Removes the cluster\r\n */\r\nCluster.prototype.remove = function() {\r\n\tthis.clusterIcon_.remove();\r\n\tthis.markers_.length = 0;\r\n\tdelete this.markers_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the number of markers in the cluster.\r\n *\r\n * @return {number} The number of markers in the cluster.\r\n */\r\nCluster.prototype.getSize = function() {\r\n\treturn this.markers_.length;\r\n};\r\n\r\n\r\n/**\r\n * Returns a list of the markers in the cluster.\r\n *\r\n * @return {Array.} The markers in the cluster.\r\n */\r\nCluster.prototype.getMarkers = function() {\r\n\treturn this.markers_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the center of the cluster.\r\n *\r\n * @return {google.maps.LatLng} The cluster center.\r\n */\r\nCluster.prototype.getCenter = function() {\r\n\treturn this.center_;\r\n};\r\n\r\n\r\n/**\r\n * Calculated the extended bounds of the cluster with the grid.\r\n *\r\n * @private\r\n */\r\nCluster.prototype.calculateBounds_ = function() {\r\n\tvar bounds = new google.maps.LatLngBounds(this.center_, this.center_);\r\n\tthis.bounds_ = this.markerClusterer_.getExtendedBounds(bounds);\r\n};\r\n\r\n\r\n/**\r\n * Determines if a marker lies in the clusters bounds.\r\n *\r\n * @param {google.maps.Marker} marker The marker to check.\r\n * @return {boolean} True if the marker lies in the bounds.\r\n */\r\nCluster.prototype.isMarkerInClusterBounds = function(marker) {\r\n\treturn this.bounds_.contains(marker.getPosition());\r\n};\r\n\r\n\r\n/**\r\n * Returns the map that the cluster is associated with.\r\n *\r\n * @return {google.maps.Map} The map.\r\n */\r\nCluster.prototype.getMap = function() {\r\n\treturn this.map_;\r\n};\r\n\r\n\r\n/**\r\n * Updates the cluster icon\r\n */\r\nCluster.prototype.updateIcon = function() {\r\n\tvar zoom = this.map_.getZoom();\r\n\tvar mz = this.markerClusterer_.getMaxZoom();\r\n\r\n\tif (mz && zoom > mz) {\r\n\t\t// The zoom is greater than our max zoom so show all the markers in cluster.\r\n\t\tfor (var i = 0, marker; marker = this.markers_[i]; i++) {\r\n\t\t\tmarker.setMap(this.map_);\r\n\t\t}\r\n\t\treturn;\r\n\t}\r\n\r\n\tif (this.markers_.length < this.minClusterSize_) {\r\n\t\t// Min cluster size not yet reached.\r\n\t\tthis.clusterIcon_.hide();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar numStyles = this.markerClusterer_.getStyles().length;\r\n\tvar sums = this.markerClusterer_.getCalculator()(this.markers_, numStyles);\r\n\tthis.clusterIcon_.setCenter(this.center_);\r\n\tthis.clusterIcon_.setSums(sums);\r\n\tthis.clusterIcon_.show();\r\n};\r\n\r\n\r\n/**\r\n * A cluster icon\r\n *\r\n * @param {Cluster} cluster The cluster to be associated with.\r\n * @param {Object} styles An object that has style properties:\r\n * 'url': (string) The image url.\r\n * 'height': (number) The image height.\r\n * 'width': (number) The image width.\r\n * 'anchor': (Array) The anchor position of the label text.\r\n * 'textColor': (string) The text color.\r\n * 'textSize': (number) The text size.\r\n * 'backgroundPosition: (string) The background postition x, y.\r\n * @param {number=} opt_padding Optional padding to apply to the cluster icon.\r\n * @constructor\r\n * @extends google.maps.OverlayView\r\n * @ignore\r\n */\r\nfunction ClusterIcon(cluster, styles, opt_padding) {\r\n\tcluster.getMarkerClusterer().extend(ClusterIcon, google.maps.OverlayView);\r\n\r\n\tthis.styles_ = styles;\r\n\tthis.padding_ = opt_padding || 0;\r\n\tthis.cluster_ = cluster;\r\n\tthis.center_ = null;\r\n\tthis.map_ = cluster.getMap();\r\n\tthis.div_ = null;\r\n\tthis.sums_ = null;\r\n\tthis.visible_ = false;\r\n\r\n\tthis.setMap(this.map_);\r\n}\r\n\r\n\r\n/**\r\n * Triggers the clusterclick event and zoom's if the option is set.\r\n */\r\nClusterIcon.prototype.triggerClusterClick = function() {\r\n\tvar markerClusterer = this.cluster_.getMarkerClusterer();\r\n\r\n\t// Trigger the clusterclick event.\r\n\tgoogle.maps.event.trigger(markerClusterer.map_, 'clusterclick', this.cluster_);\r\n\r\n\tif (markerClusterer.isZoomOnClick()) {\r\n\t\t// Zoom into the cluster.\r\n\t\tthis.map_.fitBounds(this.cluster_.getBounds());\r\n\t}\r\n};\r\n\r\n\r\n/**\r\n * Adding the cluster icon to the dom.\r\n * @ignore\r\n */\r\nClusterIcon.prototype.onAdd = function() {\r\n\tthis.div_ = document.createElement('DIV');\r\n\tif (this.visible_) {\r\n\t\tvar pos = this.getPosFromLatLng_(this.center_);\r\n\t\tthis.div_.style.cssText = this.createCss(pos);\r\n\t\tthis.div_.innerHTML = this.sums_.text;\r\n\t}\r\n\r\n\tvar panes = this.getPanes();\r\n\tpanes.overlayMouseTarget.appendChild(this.div_);\r\n\r\n\tvar that = this;\r\n\tthis.div_.addEventListener('click', function() {\r\n\t\tthat.triggerClusterClick();\r\n\t});\r\n};\r\n\r\n\r\n/**\r\n * Returns the position to place the div dending on the latlng.\r\n *\r\n * @param {google.maps.LatLng} latlng The position in latlng.\r\n * @return {google.maps.Point} The position in pixels.\r\n * @private\r\n */\r\nClusterIcon.prototype.getPosFromLatLng_ = function(latlng) {\r\n\tvar pos = this.getProjection().fromLatLngToDivPixel(latlng);\r\n\tpos.x -= parseInt(this.width_ / 2, 10);\r\n\tpos.y -= parseInt(this.height_ / 2, 10);\r\n\treturn pos;\r\n};\r\n\r\n\r\n/**\r\n * Draw the icon.\r\n * @ignore\r\n */\r\nClusterIcon.prototype.draw = function() {\r\n\tif (this.visible_) {\r\n\t\tvar pos = this.getPosFromLatLng_(this.center_);\r\n\t\tthis.div_.style.top = pos.y + 'px';\r\n\t\tthis.div_.style.left = pos.x + 'px';\r\n\t\tthis.div_.style.zIndex = google.maps.Marker.MAX_ZINDEX + 1;\r\n\t}\r\n};\r\n\r\n\r\n/**\r\n * Hide the icon.\r\n */\r\nClusterIcon.prototype.hide = function() {\r\n\tif (this.div_) {\r\n\t\tthis.div_.style.display = 'none';\r\n\t}\r\n\tthis.visible_ = false;\r\n};\r\n\r\n\r\n/**\r\n * Position and show the icon.\r\n */\r\nClusterIcon.prototype.show = function() {\r\n\tif (this.div_) {\r\n\t\tvar pos = this.getPosFromLatLng_(this.center_);\r\n\t\tthis.div_.style.cssText = this.createCss(pos);\r\n\t\tthis.div_.style.display = '';\r\n\t}\r\n\tthis.visible_ = true;\r\n};\r\n\r\n\r\n/**\r\n * Remove the icon from the map\r\n */\r\nClusterIcon.prototype.remove = function() {\r\n\tthis.setMap(null);\r\n};\r\n\r\n\r\n/**\r\n * Implementation of the onRemove interface.\r\n * @ignore\r\n */\r\nClusterIcon.prototype.onRemove = function() {\r\n\tif (this.div_ && this.div_.parentNode) {\r\n\t\tthis.hide();\r\n\t\tthis.div_.parentNode.removeChild(this.div_);\r\n\t\tthis.div_ = null;\r\n\t}\r\n};\r\n\r\n\r\n/**\r\n * Set the sums of the icon.\r\n *\r\n * @param {Object} sums The sums containing:\r\n * 'text': (string) The text to display in the icon.\r\n * 'index': (number) The style index of the icon.\r\n */\r\nClusterIcon.prototype.setSums = function(sums) {\r\n\tthis.sums_ = sums;\r\n\tthis.text_ = sums.text;\r\n\tthis.index_ = sums.index;\r\n\tif (this.div_) {\r\n\t\tthis.div_.innerHTML = sums.text;\r\n\t}\r\n\r\n\tthis.useStyle();\r\n};\r\n\r\n\r\n/**\r\n * Sets the icon to the the styles.\r\n */\r\nClusterIcon.prototype.useStyle = function() {\r\n\tvar index = Math.max(0, this.sums_.index - 1);\r\n\tindex = Math.min(this.styles_.length - 1, index);\r\n\tvar style = this.styles_[index];\r\n\tthis.url_ = style['url'];\r\n\tthis.height_ = style['height'];\r\n\tthis.width_ = style['width'];\r\n\tthis.textColor_ = style['textColor'];\r\n\tthis.anchor_ = style['anchor'];\r\n\tthis.textSize_ = style['textSize'];\r\n\tthis.backgroundPosition_ = style['backgroundPosition'];\r\n};\r\n\r\n\r\n/**\r\n * Sets the center of the icon.\r\n *\r\n * @param {google.maps.LatLng} center The latlng to set as the center.\r\n */\r\nClusterIcon.prototype.setCenter = function(center) {\r\n\tthis.center_ = center;\r\n};\r\n\r\n\r\n/**\r\n * Create the css text based on the position of the icon.\r\n *\r\n * @param {google.maps.Point} pos The position.\r\n * @return {string} The css style text.\r\n */\r\nClusterIcon.prototype.createCss = function(pos) {\r\n\tvar style = [];\r\n\tstyle.push('background-image:url(' + this.url_ + ');');\r\n\tvar backgroundPosition = this.backgroundPosition_ ? this.backgroundPosition_ : '0 0';\r\n\tstyle.push('background-position:' + backgroundPosition + ';');\r\n\r\n\tif (typeof this.anchor_ === 'object') {\r\n\t\tif (typeof this.anchor_[0] === 'number' && this.anchor_[0] > 0 &&\r\n\t\t\tthis.anchor_[0] < this.height_) {\r\n\t\t\tstyle.push('height:' + (this.height_ - this.anchor_[0]) +\r\n\t\t\t\t'px; padding-top:' + this.anchor_[0] + 'px;');\r\n\t\t} else {\r\n\t\t\tstyle.push('height:' + this.height_ + 'px; line-height:' + this.height_ +\r\n\t\t\t\t'px;');\r\n\t\t}\r\n\t\tif (typeof this.anchor_[1] === 'number' && this.anchor_[1] > 0 &&\r\n\t\t\tthis.anchor_[1] < this.width_) {\r\n\t\t\tstyle.push('width:' + (this.width_ - this.anchor_[1]) +\r\n\t\t\t\t'px; padding-left:' + this.anchor_[1] + 'px;');\r\n\t\t} else {\r\n\t\t\tstyle.push('width:' + this.width_ + 'px; text-align:center;');\r\n\t\t}\r\n\t} else {\r\n\t\tstyle.push('height:' + this.height_ + 'px; line-height:' +\r\n\t\t\tthis.height_ + 'px; width:' + this.width_ + 'px; text-align:center;');\r\n\t}\r\n\r\n\tvar txtColor = this.textColor_ ? this.textColor_ : 'black';\r\n\tvar txtSize = this.textSize_ ? this.textSize_ : 11;\r\n\r\n\tstyle.push('cursor:pointer; top:' + pos.y + 'px; left:' +\r\n\t\tpos.x + 'px; color:' + txtColor + '; position:absolute; font-size:' +\r\n\t\ttxtSize + 'px; font-family:Arial,sans-serif; font-weight:bold');\r\n\treturn style.join('');\r\n};\r\n\r\n\r\n// Export Symbols for Closure\r\n// If you are not going to compile with closure then you can remove the\r\n// code below.\r\nvar window = window || {};\r\nwindow['MarkerClusterer'] = MarkerClusterer;\r\nMarkerClusterer.prototype['addMarker'] = MarkerClusterer.prototype.addMarker;\r\nMarkerClusterer.prototype['addMarkers'] = MarkerClusterer.prototype.addMarkers;\r\nMarkerClusterer.prototype['clearMarkers'] =\r\n\tMarkerClusterer.prototype.clearMarkers;\r\nMarkerClusterer.prototype['fitMapToMarkers'] =\r\n\tMarkerClusterer.prototype.fitMapToMarkers;\r\nMarkerClusterer.prototype['getCalculator'] =\r\n\tMarkerClusterer.prototype.getCalculator;\r\nMarkerClusterer.prototype['getGridSize'] =\r\n\tMarkerClusterer.prototype.getGridSize;\r\nMarkerClusterer.prototype['getExtendedBounds'] =\r\n\tMarkerClusterer.prototype.getExtendedBounds;\r\nMarkerClusterer.prototype['getMap'] = MarkerClusterer.prototype.getMap;\r\nMarkerClusterer.prototype['getMarkers'] = MarkerClusterer.prototype.getMarkers;\r\nMarkerClusterer.prototype['getMaxZoom'] = MarkerClusterer.prototype.getMaxZoom;\r\nMarkerClusterer.prototype['getStyles'] = MarkerClusterer.prototype.getStyles;\r\nMarkerClusterer.prototype['getTotalClusters'] =\r\n\tMarkerClusterer.prototype.getTotalClusters;\r\nMarkerClusterer.prototype['getTotalMarkers'] =\r\n\tMarkerClusterer.prototype.getTotalMarkers;\r\nMarkerClusterer.prototype['redraw'] = MarkerClusterer.prototype.redraw;\r\nMarkerClusterer.prototype['removeMarker'] =\r\n\tMarkerClusterer.prototype.removeMarker;\r\nMarkerClusterer.prototype['removeMarkers'] =\r\n\tMarkerClusterer.prototype.removeMarkers;\r\nMarkerClusterer.prototype['resetViewport'] =\r\n\tMarkerClusterer.prototype.resetViewport;\r\nMarkerClusterer.prototype['repaint'] =\r\n\tMarkerClusterer.prototype.repaint;\r\nMarkerClusterer.prototype['setCalculator'] =\r\n\tMarkerClusterer.prototype.setCalculator;\r\nMarkerClusterer.prototype['setGridSize'] =\r\n\tMarkerClusterer.prototype.setGridSize;\r\nMarkerClusterer.prototype['setMaxZoom'] =\r\n\tMarkerClusterer.prototype.setMaxZoom;\r\nMarkerClusterer.prototype['onAdd'] = MarkerClusterer.prototype.onAdd;\r\nMarkerClusterer.prototype['draw'] = MarkerClusterer.prototype.draw;\r\n\r\nCluster.prototype['getCenter'] = Cluster.prototype.getCenter;\r\nCluster.prototype['getSize'] = Cluster.prototype.getSize;\r\nCluster.prototype['getMarkers'] = Cluster.prototype.getMarkers;\r\n\r\nClusterIcon.prototype['onAdd'] = ClusterIcon.prototype.onAdd;\r\nClusterIcon.prototype['draw'] = ClusterIcon.prototype.draw;\r\nClusterIcon.prototype['onRemove'] = ClusterIcon.prototype.onRemove;\r\n\r\nObject.keys = Object.keys || function(o) {\r\n\tvar result = [];\r\n\tfor (var name in o) {\r\n\t\tif (o.hasOwnProperty(name))\r\n\t\t\tresult.push(name);\r\n\t}\r\n\treturn result;\r\n};\r\n\r\nif (typeof module == 'object') {\r\n\tmodule.exports = MarkerClusterer;\r\n}\r\n\r\n// Forked createCss method from markerclusterer \r\n// Sets icon background size to same size as icon width and height\r\n// Add this file after loading markerclusterer.js https://github.com/googlemaps/js-marker-clusterer\r\n\r\nClusterIcon.prototype.createCss = function(pos) {\r\n\tvar style = [];\r\n\r\n\tstyle.push('background-image:url(' + this.url_ + ');');\r\n\r\n\tvar backgroundPosition = this.backgroundPosition_ ? this.backgroundPosition_ : '0 0';\r\n\r\n\tstyle.push('background-position:' + backgroundPosition + ';');\r\n\tstyle.push('background-size: ' + this.width_ + 'px ' + this.height_ + 'px;'); //added to support retina\r\n\r\n\tif (Array.isArray(this.anchor_)) {\r\n\r\n\t\tif (typeof this.anchor_[0] === 'number' && this.anchor_[0] > 0 &&\r\n\t\t\tthis.anchor_[0] < this.height_) {\r\n\t\t\tstyle.push('height:' + (this.height_ - this.anchor_[0]) +\r\n\t\t\t\t'px; padding-top:' + this.anchor_[0] + 'px;');\r\n\t\t}\r\n\t\telse if (typeof this.anchor_[0] === 'number' && this.anchor_[0] < 0 &&\r\n\t\t\t-this.anchor_[0] < this.height_) {\r\n\r\n\t\t\tstyle.push('height:' + this.height_ + 'px; line-height:' + (this.height_ + this.anchor_[0] - this.height_ / 4) + //added the minus height divided by 4 to adjust text position on the markers\r\n\t\t\t\t'px;');\r\n\t\t} else {\r\n\t\t\tstyle.push('height:' + this.height_ + 'px; line-height:' + (this.height_ - this.height_ / 4) + //added the minus height divided by 4 to adjust text position on the markers\r\n\t\t\t\t'px;');\r\n\t\t}\r\n\t\tif (typeof this.anchor_[1] === 'number' && this.anchor_[1] > 0 &&\r\n\t\t\tthis.anchor_[1] < this.width_) {\r\n\t\t\tstyle.push('width:' + (this.width_ - this.anchor_[1]) +\r\n\t\t\t\t'px; padding-left:' + this.anchor_[1] + 'px;');\r\n\t\t} else {\r\n\t\t\tstyle.push('width:' + this.width_ + 'px; text-align:center;');\r\n\t\t}\r\n\t} else {\r\n\t\tstyle.push('height:' + this.height_ + 'px; line-height:' +\r\n\t\t\t(this.height_ - this.height_ / 4) + 'px; width:' + this.width_ + 'px; text-align:center;'); //added the minus height divided by 4 to adjust text position on the markers\r\n\t}\r\n\r\n\tvar txtColor = this.textColor_ ? this.textColor_ : 'black';\r\n\tvar txtSize = this.textSize_ ? this.textSize_ : 13; // Adjust text size\r\n\r\n\tstyle.push('cursor:pointer; top:' + (pos.y + this.height_) + 'px; left:' +\r\n\t\tpos.x + 'px; color:' + txtColor + '; position:absolute; font-size:' +\r\n\t\ttxtSize + 'px; font-family: FuturaBT-light,Helvetica,Arial,sans-serif; font-weight:bold'); //Simpson Travel font added here\r\n\treturn style.join('');\r\n};\r\n"],"names":["Hogan","MarkerClusterer","map","opt_markers","opt_options","this","extend","google","maps","OverlayView","map_","markers_","clusters_","sizes","styles_","ready_","options","that","gridSize_","minClusterSize_","maxZoom_","imagePath_","MARKER_CLUSTER_IMAGE_PATH_","imageExtension_","MARKER_CLUSTER_IMAGE_EXTENSION_","zoomOnClick_","undefined","averageCenter_","setupStyles_","setMap","prevZoom_","getZoom","event","addListener","zoom","minZoom","maxZoom","Math","min","mapTypes","getMapTypeId","max","resetViewport","redraw","length","Object","keys","addMarkers","Cluster","markerClusterer","markerClusterer_","getMap","getGridSize","getMinClusterSize","isAverageCenter","center_","bounds_","clusterIcon_","ClusterIcon","getStyles","cluster","styles","opt_padding","getMarkerClusterer","padding_","cluster_","div_","sums_","visible_","t","n","e","i","get","String","Template","r","code","c","text","partials","subs","buf","prototype","v","l","test","replace","s","a","o","u","render","ri","ep","name","instance","base","Error","compile","key","stackText","activeSub","subsText","stackSubs","stackPartials","rp","rs","f","push","pop","ms","d","split","modelGet","mv","ls","delimiters","b","ct","call","disableLambda","fl","substring","sub","Array","isArray","toString","exports","trim","charAt","shift","tag","k","tags","$","nodes","end","last","join","m","x","w","indexOf","prefix","y","indent","h","p","g","#","^","<","/","!",">","=","_v","{","&","_t","scan","match","splice","T","S","otag","ctag","substr","\n","stringify","wrapMain","generate","walk","asString","makeTemplate","template","makePartials","Function","codegen","inPartial","parse","sectionTags","cache","cacheKey","obj1","obj2","object","property","apply","onAdd","setReady_","draw","size","url","height","width","fitMapToMarkers","marker","markers","getMarkers","bounds","LatLngBounds","getPosition","fitBounds","setStyles","isZoomOnClick","getTotalMarkers","setMaxZoom","getMaxZoom","calculator_","numStyles","index","count","dv","parseInt","setCalculator","calculator","getCalculator","opt_nodraw","pushMarkerTo_","isAdded","repaint","addMarker","removeMarker_","removeMarker","removed","removeMarkers","markersCopy","slice","ready","createClusters_","getTotalClusters","setGridSize","setMinClusterSize","getExtendedBounds","projection","getProjection","tr","LatLng","getNorthEast","lat","lng","bl","getSouthWest","trPix","fromLatLngToDivPixel","blPix","ne","fromDivPixelToLatLng","sw","isMarkerInBounds_","contains","clearMarkers","opt_hide","remove","oldClusters","window","setTimeout","distanceBetweenPoints_","p1","p2","dLon","dLat","PI","sin","cos","atan2","sqrt","addToClosestCluster_","distance","clusterToAddTo","center","getCenter","isMarkerInClusterBounds","mapBounds","getBounds","isMarkerAlreadyAdded","calculateBounds_","len","updateIcon","getSize","mz","hide","sums","setCenter","setSums","show","triggerClusterClick","trigger","pos","document","createElement","getPosFromLatLng_","style","cssText","createCss","innerHTML","getPanes","overlayMouseTarget","appendChild","addEventListener","latlng","width_","height_","top","left","zIndex","Marker","MAX_ZINDEX","display","onRemove","parentNode","removeChild","text_","index_","useStyle","url_","textColor_","anchor_","textSize_","backgroundPosition_","backgroundPosition","txtColor","txtSize","result","hasOwnProperty","module"],"mappings":"AAIA,IAAIA,MAAQ,GAkEZ,SAASC,gBAAgBC,EAAKC,EAAaC,GAM1CC,KAAKC,OAAOL,gBAAiBM,OAAOC,KAAKC,WAAW,EACpDJ,KAAKK,KAAOR,EAMZG,KAAKM,SAAW,GAKhBN,KAAKO,UAAY,GAEjBP,KAAKQ,MAAQ,CAAC,GAAI,GAAI,GAAI,GAAI,IAK9BR,KAAKS,QAAU,GAMfT,KAAKU,OAAS,CAAA,EAEd,IAAIC,EAAUZ,GAAe,GAmEzBa,GA7DJZ,KAAKa,UAAYF,EAAkB,UAAK,GAKxCX,KAAKc,gBAAkBH,E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