{"version":3,"sources":["vendor/markerclusterer.js","components/googleMaps.js","components/googleMapsMarker.js"],"names":["MarkerClusterer","map","opt_markers","opt_options","this","extend","google","maps","OverlayView","map_","markers_","clusters_","sizes","styles_","ready_","options","gridSize_","minClusterSize_","maxZoom_","imagePath_","MARKER_CLUSTER_IMAGE_PATH_","imageExtension_","MARKER_CLUSTER_IMAGE_EXTENSION_","zoomOnClick_","undefined","averageCenter_","setupStyles_","setMap","prevZoom_","getZoom","that","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_","prototype","obj1","obj2","object","property","apply","onAdd","setReady_","draw","size","i","push","url","height","width","fitMapToMarkers","marker","markers","getMarkers","bounds","LatLngBounds","getPosition","fitBounds","setStyles","isZoomOnClick","getTotalMarkers","setMaxZoom","getMaxZoom","calculator_","numStyles","index","count","dv","parseInt","text","setCalculator","calculator","getCalculator","opt_nodraw","pushMarkerTo_","isAdded","repaint","addMarker","removeMarker_","indexOf","m","splice","removeMarker","removed","removeMarkers","markersCopy","slice","r","ready","createClusters_","getTotalClusters","setGridSize","setMinClusterSize","getExtendedBounds","projection","getProjection","tr","LatLng","getNorthEast","lat","lng","bl","getSouthWest","trPix","fromLatLngToDivPixel","x","y","blPix","ne","fromDivPixelToLatLng","sw","isMarkerInBounds_","contains","clearMarkers","opt_hide","remove","oldClusters","window","setTimeout","distanceBetweenPoints_","p1","p2","dLat","PI","dLon","a","sin","cos","atan2","sqrt","addToClosestCluster_","distance","clusterToAddTo","center","getCenter","d","isMarkerInClusterBounds","mapBounds","getBounds","isMarkerAlreadyAdded","l","calculateBounds_","len","updateIcon","getSize","mz","hide","sums","setCenter","setSums","show","triggerClusterClick","trigger","document","createElement","pos","getPosFromLatLng_","style","cssText","createCss","innerHTML","getPanes","overlayMouseTarget","appendChild","addDomListener","latlng","width_","height_","top","left","display","onRemove","parentNode","removeChild","text_","index_","useStyle","url_","textColor_","anchor_","textSize_","backgroundPosition_","backgroundPosition","txtColor","txtSize","join","o","result","name","hasOwnProperty","dmx","Component","initialData","maptype","latitude","longitude","attributes","type","String","Number","default","address","scrollwheel","Boolean","tilt","rotate-control","scale-control","fullscreen-control","zoom-control","streetview-control","maptype-control","enable-clusters","traffic-layer","transit-layer","bicycling-layer","Array","marker-id","marker-latitude","marker-longitude","marker-address","marker-label","marker-label-color","marker-title","marker-info","marker-type","marker-image","marker-animation","marker-draggable","methods","props","goToMarker","id","findMarker","position","panToMarker","panTo","bounceMarker","setAnimation","fitBoundsToMarkers","stopBounce","showInfo","infoWindow","open","removeAllMarkers","setMapType","setMapTypeId","setZoom","refresh","reload","update","events","Event","boundschanged","centerchanged","maptypechanged","zoomchanged","mapclick","render","node","$parse","geocodeCache","JSON","parse","localStorage","geocoder","Geocoder","InfoWindow","getMarkerTypes","Map","mapTypeId","scaleControl","zoomControl","panControl","streetViewControl","mapTypeControl","rotateControl","fullscreenControl","set","onMapClick","bind","debounce","onBoundsChanged","onCenterChanged","onMaptypeChanged","onZoomChanged","dispatchEvent","googleMapsTheme","setOptions","setTilt","imagePath","getImageFolder","geocode","trafficLayer","TrafficLayer","transitLayer","TransitLayer","bikeLayer","BicyclingLayer","stringify","repeatItems","isArray","forEach","scope","DataScope","label","labelColor","title","info","image","animation","draggable","e","latLng","toJSON","results","status","geometry","location","console","warn","openInfoWindow","content","setContent","script","querySelector","src","replace","getMarkerAnimation","toLowerCase","find","children","child","static","Marker","icon","markerTypes","setIcon","setLabel","color","setPosition","setVisible","filter","markerUrl","iconsUrl","black","grey","orange","white","yellow","purple","green","start","end","arrow","tree","lodging","bar","restaurant","horsebackriding","convienancestore","hiker","swimming","fishing","golfer","sportvenue","label-color","parent","setTitle","setDraggable"],"mappings":";;;;;;AAoEA,S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,QAIAhV,KAAAkQ,MAAAhC,MAAAgC,EAAAhC,MACAlO,KAAAgF,OAAA6R,QAAA7W,KAAA2Y,OAAA/B,YAAA5W,KAAAkQ,MAAAhC,OAGAlO,KAAAkQ,MAAA+E,OAAA/E,EAAA+E,OACAjV,KAAAgF,OAAA6R,QAAA7W,KAAAkQ,MAAA+E,OAGAjV,KAAAkQ,MAAAgF,WAAAhF,EAAAgF,WACAlV,KAAAgF,OAAA0L,aAAA1Q,KAAA2Y,OAAAvC,mBAAApW,KAAAkQ,MAAAgF,YAGAlV,KAAAkQ,MAAAiF,WAAAjF,EAAAiF,WACAnV,KAAAgF,OAAA6T,aAAA7Y,KAAAkQ,MAAAiF","file":"../dmxGoogleMaps/dmxGoogleMaps.js","sourcesContent":["// ==ClosureCompiler==\n// @compilation_level ADVANCED_OPTIMIZATIONS\n// @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/maps/google_maps_api_v3_3.js\n// ==/ClosureCompiler==\n\n/**\n * @name MarkerClusterer for Google Maps v3\n * @version version 1.0.1\n * @author Luke Mahe\n * @fileoverview\n * The library creates and manages per-zoom-level clusters for large amounts of\n * markers.\n *
\n * This is a v3 implementation of the\n * v2 MarkerClusterer.\n */\n\n/**\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * A Marker Clusterer that clusters markers.\n *\n * @param {google.maps.Map} map The Google map to attach to.\n * @param {Array.=} opt_markers Optional markers to add to\n * the cluster.\n * @param {Object=} opt_options support the following options:\n * 'gridSize': (number) The grid size of a cluster in pixels.\n * 'maxZoom': (number) The maximum zoom level that a marker can be part of a\n * cluster.\n * 'zoomOnClick': (boolean) Whether the default behaviour of clicking on a\n * cluster is to zoom into it.\n * 'imagePath': (string) The base URL where the images representing\n * clusters will be found. The full URL will be:\n * {imagePath}[1-5].{imageExtension}\n * Default: '../images/m'.\n * 'imageExtension': (string) The suffix for images URL representing\n * clusters will be found. See _imagePath_ for details.\n * Default: 'png'.\n * 'averageCenter': (boolean) Whether the center of each cluster should be\n * the average of all markers in the cluster.\n * 'minimumClusterSize': (number) The minimum number of markers to be in a\n * cluster before the markers are hidden and a count\n * is shown.\n * 'styles': (object) An object that has style properties:\n * 'url': (string) The image url.\n * 'height': (number) The image height.\n * 'width': (number) The image width.\n * 'anchor': (Array) The anchor position of the label text.\n * 'textColor': (string) The text color.\n * 'textSize': (number) The text size.\n * 'backgroundPosition': (string) The position of the backgound x, y.\n * @constructor\n * @extends google.maps.OverlayView\n */\nfunction MarkerClusterer(map, opt_markers, opt_options) {\n // MarkerClusterer implements google.maps.OverlayView interface. We use the\n // extend function to extend MarkerClusterer with google.maps.OverlayView\n // because it might not always be available when the code is defined so we\n // look for it at the last possible moment. If it doesn't exist now then\n // there is no point going ahead :)\n this.extend(MarkerClusterer, google.maps.OverlayView);\n this.map_ = map;\n\n /**\n * @type {Array.}\n * @private\n */\n this.markers_ = [];\n\n /**\n * @type {Array.}\n */\n this.clusters_ = [];\n\n this.sizes = [53, 56, 66, 78, 90];\n\n /**\n * @private\n */\n this.styles_ = [];\n\n /**\n * @type {boolean}\n * @private\n */\n this.ready_ = false;\n\n var options = opt_options || {};\n\n /**\n * @type {number}\n * @private\n */\n this.gridSize_ = options['gridSize'] || 60;\n\n /**\n * @private\n */\n this.minClusterSize_ = options['minimumClusterSize'] || 2;\n\n\n /**\n * @type {?number}\n * @private\n */\n this.maxZoom_ = options['maxZoom'] || null;\n\n this.styles_ = options['styles'] || [];\n\n /**\n * @type {string}\n * @private\n */\n this.imagePath_ = options['imagePath'] ||\n this.MARKER_CLUSTER_IMAGE_PATH_;\n\n /**\n * @type {string}\n * @private\n */\n this.imageExtension_ = options['imageExtension'] ||\n this.MARKER_CLUSTER_IMAGE_EXTENSION_;\n\n /**\n * @type {boolean}\n * @private\n */\n this.zoomOnClick_ = true;\n\n if (options['zoomOnClick'] != undefined) {\n this.zoomOnClick_ = options['zoomOnClick'];\n }\n\n /**\n * @type {boolean}\n * @private\n */\n this.averageCenter_ = false;\n\n if (options['averageCenter'] != undefined) {\n this.averageCenter_ = options['averageCenter'];\n }\n\n this.setupStyles_();\n\n this.setMap(map);\n\n /**\n * @type {number}\n * @private\n */\n this.prevZoom_ = this.map_.getZoom();\n\n // Add the map event listeners\n var that = this;\n google.maps.event.addListener(this.map_, 'zoom_changed', function() {\n // Determines map type and prevent illegal zoom levels\n var zoom = that.map_.getZoom();\n var minZoom = that.map_.minZoom || 0;\n var maxZoom = Math.min(that.map_.maxZoom || 100,\n that.map_.mapTypes[that.map_.getMapTypeId()].maxZoom);\n zoom = Math.min(Math.max(zoom,minZoom),maxZoom);\n\n if (that.prevZoom_ != zoom) {\n that.prevZoom_ = zoom;\n that.resetViewport();\n }\n });\n\n google.maps.event.addListener(this.map_, 'idle', function() {\n that.redraw();\n });\n\n // Finally, add the markers\n if (opt_markers && (opt_markers.length || Object.keys(opt_markers).length)) {\n this.addMarkers(opt_markers, false);\n }\n}\n\n\n/**\n * The marker cluster image path.\n *\n * @type {string}\n * @private\n */\nMarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ = '../images/m';\n\n\n/**\n * The marker cluster image path.\n *\n * @type {string}\n * @private\n */\nMarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_ = 'png';\n\n\n/**\n * Extends a objects prototype by anothers.\n *\n * @param {Object} obj1 The object to be extended.\n * @param {Object} obj2 The object to extend with.\n * @return {Object} The new extended object.\n * @ignore\n */\nMarkerClusterer.prototype.extend = function(obj1, obj2) {\n return (function(object) {\n for (var property in object.prototype) {\n this.prototype[property] = object.prototype[property];\n }\n return this;\n }).apply(obj1, [obj2]);\n};\n\n\n/**\n * Implementaion of the interface method.\n * @ignore\n */\nMarkerClusterer.prototype.onAdd = function() {\n this.setReady_(true);\n};\n\n/**\n * Implementaion of the interface method.\n * @ignore\n */\nMarkerClusterer.prototype.draw = function() {};\n\n/**\n * Sets up the styles object.\n *\n * @private\n */\nMarkerClusterer.prototype.setupStyles_ = function() {\n if (this.styles_.length) {\n return;\n }\n\n for (var i = 0, size; size = this.sizes[i]; i++) {\n this.styles_.push({\n url: this.imagePath_ + (i + 1) + '.' + this.imageExtension_,\n height: size,\n width: size\n });\n }\n};\n\n/**\n * Fit the map to the bounds of the markers in the clusterer.\n */\nMarkerClusterer.prototype.fitMapToMarkers = function() {\n var markers = this.getMarkers();\n var bounds = new google.maps.LatLngBounds();\n for (var i = 0, marker; marker = markers[i]; i++) {\n bounds.extend(marker.getPosition());\n }\n\n this.map_.fitBounds(bounds);\n};\n\n\n/**\n * Sets the styles.\n *\n * @param {Object} styles The style to set.\n */\nMarkerClusterer.prototype.setStyles = function(styles) {\n this.styles_ = styles;\n};\n\n\n/**\n * Gets the styles.\n *\n * @return {Object} The styles object.\n */\nMarkerClusterer.prototype.getStyles = function() {\n return this.styles_;\n};\n\n\n/**\n * Whether zoom on click is set.\n *\n * @return {boolean} True if zoomOnClick_ is set.\n */\nMarkerClusterer.prototype.isZoomOnClick = function() {\n return this.zoomOnClick_;\n};\n\n/**\n * Whether average center is set.\n *\n * @return {boolean} True if averageCenter_ is set.\n */\nMarkerClusterer.prototype.isAverageCenter = function() {\n return this.averageCenter_;\n};\n\n\n/**\n * Returns the array of markers in the clusterer.\n *\n * @return {Array.} The markers.\n */\nMarkerClusterer.prototype.getMarkers = function() {\n return this.markers_;\n};\n\n\n/**\n * Returns the number of markers in the clusterer\n *\n * @return {Number} The number of markers.\n */\nMarkerClusterer.prototype.getTotalMarkers = function() {\n return this.markers_.length;\n};\n\n\n/**\n * Sets the max zoom for the clusterer.\n *\n * @param {number} maxZoom The max zoom level.\n */\nMarkerClusterer.prototype.setMaxZoom = function(maxZoom) {\n this.maxZoom_ = maxZoom;\n};\n\n\n/**\n * Gets the max zoom for the clusterer.\n *\n * @return {number} The max zoom level.\n */\nMarkerClusterer.prototype.getMaxZoom = function() {\n return this.maxZoom_;\n};\n\n\n/**\n * The function for calculating the cluster icon image.\n *\n * @param {Array.} markers The markers in the clusterer.\n * @param {number} numStyles The number of styles available.\n * @return {Object} A object properties: 'text' (string) and 'index' (number).\n * @private\n */\nMarkerClusterer.prototype.calculator_ = function(markers, numStyles) {\n var index = 0;\n var count = markers.length;\n var dv = count;\n while (dv !== 0) {\n dv = parseInt(dv / 10, 10);\n index++;\n }\n\n index = Math.min(index, numStyles);\n return {\n text: count,\n index: index\n };\n};\n\n\n/**\n * Set the calculator function.\n *\n * @param {function(Array, number)} calculator The function to set as the\n * calculator. The function should return a object properties:\n * 'text' (string) and 'index' (number).\n *\n */\nMarkerClusterer.prototype.setCalculator = function(calculator) {\n this.calculator_ = calculator;\n};\n\n\n/**\n * Get the calculator function.\n *\n * @return {function(Array, number)} the calculator function.\n */\nMarkerClusterer.prototype.getCalculator = function() {\n return this.calculator_;\n};\n\n\n/**\n * Add an array of markers to the clusterer.\n *\n * @param {Array.} markers The markers to add.\n * @param {boolean=} opt_nodraw Whether to redraw the clusters.\n */\nMarkerClusterer.prototype.addMarkers = function(markers, opt_nodraw) {\n if (markers.length) {\n for (var i = 0, marker; marker = markers[i]; i++) {\n this.pushMarkerTo_(marker);\n }\n } else if (Object.keys(markers).length) {\n for (var marker in markers) {\n this.pushMarkerTo_(markers[marker]);\n }\n }\n if (!opt_nodraw) {\n this.redraw();\n }\n};\n\n\n/**\n * Pushes a marker to the clusterer.\n *\n * @param {google.maps.Marker} marker The marker to add.\n * @private\n */\nMarkerClusterer.prototype.pushMarkerTo_ = function(marker) {\n marker.isAdded = false;\n if (marker['draggable']) {\n // If the marker is draggable add a listener so we update the clusters on\n // the drag end.\n var that = this;\n google.maps.event.addListener(marker, 'dragend', function() {\n marker.isAdded = false;\n that.repaint();\n });\n }\n this.markers_.push(marker);\n};\n\n\n/**\n * Adds a marker to the clusterer and redraws if needed.\n *\n * @param {google.maps.Marker} marker The marker to add.\n * @param {boolean=} opt_nodraw Whether to redraw the clusters.\n */\nMarkerClusterer.prototype.addMarker = function(marker, opt_nodraw) {\n this.pushMarkerTo_(marker);\n if (!opt_nodraw) {\n this.redraw();\n }\n};\n\n\n/**\n * Removes a marker and returns true if removed, false if not\n *\n * @param {google.maps.Marker} marker The marker to remove\n * @return {boolean} Whether the marker was removed or not\n * @private\n */\nMarkerClusterer.prototype.removeMarker_ = function(marker) {\n var index = -1;\n if (this.markers_.indexOf) {\n index = this.markers_.indexOf(marker);\n } else {\n for (var i = 0, m; m = this.markers_[i]; i++) {\n if (m == marker) {\n index = i;\n break;\n }\n }\n }\n\n if (index == -1) {\n // Marker is not in our list of markers.\n return false;\n }\n\n marker.setMap(null);\n\n this.markers_.splice(index, 1);\n\n return true;\n};\n\n\n/**\n * Remove a marker from the cluster.\n *\n * @param {google.maps.Marker} marker The marker to remove.\n * @param {boolean=} opt_nodraw Optional boolean to force no redraw.\n * @return {boolean} True if the marker was removed.\n */\nMarkerClusterer.prototype.removeMarker = function(marker, opt_nodraw) {\n var removed = this.removeMarker_(marker);\n\n if (!opt_nodraw && removed) {\n this.resetViewport();\n this.redraw();\n return true;\n } else {\n return false;\n }\n};\n\n\n/**\n * Removes an array of markers from the cluster.\n *\n * @param {Array.} markers The markers to remove.\n * @param {boolean=} opt_nodraw Optional boolean to force no redraw.\n */\nMarkerClusterer.prototype.removeMarkers = function(markers, opt_nodraw) {\n // create a local copy of markers if required\n // (removeMarker_ modifies the getMarkers() array in place)\n var markersCopy = markers === this.getMarkers() ? markers.slice() : markers;\n var removed = false;\n\n for (var i = 0, marker; marker = markersCopy[i]; i++) {\n var r = this.removeMarker_(marker);\n removed = removed || r;\n }\n\n if (!opt_nodraw && removed) {\n this.resetViewport();\n this.redraw();\n return true;\n }\n};\n\n\n/**\n * Sets the clusterer's ready state.\n *\n * @param {boolean} ready The state.\n * @private\n */\nMarkerClusterer.prototype.setReady_ = function(ready) {\n if (!this.ready_) {\n this.ready_ = ready;\n this.createClusters_();\n }\n};\n\n\n/**\n * Returns the number of clusters in the clusterer.\n *\n * @return {number} The number of clusters.\n */\nMarkerClusterer.prototype.getTotalClusters = function() {\n return this.clusters_.length;\n};\n\n\n/**\n * Returns the google map that the clusterer is associated with.\n *\n * @return {google.maps.Map} The map.\n */\nMarkerClusterer.prototype.getMap = function() {\n return this.map_;\n};\n\n\n/**\n * Sets the google map that the clusterer is associated with.\n *\n * @param {google.maps.Map} map The map.\n */\nMarkerClusterer.prototype.setMap = function(map) {\n this.map_ = map;\n};\n\n\n/**\n * Returns the size of the grid.\n *\n * @return {number} The grid size.\n */\nMarkerClusterer.prototype.getGridSize = function() {\n return this.gridSize_;\n};\n\n\n/**\n * Sets the size of the grid.\n *\n * @param {number} size The grid size.\n */\nMarkerClusterer.prototype.setGridSize = function(size) {\n this.gridSize_ = size;\n};\n\n\n/**\n * Returns the min cluster size.\n *\n * @return {number} The grid size.\n */\nMarkerClusterer.prototype.getMinClusterSize = function() {\n return this.minClusterSize_;\n};\n\n/**\n * Sets the min cluster size.\n *\n * @param {number} size The grid size.\n */\nMarkerClusterer.prototype.setMinClusterSize = function(size) {\n this.minClusterSize_ = size;\n};\n\n\n/**\n * Extends a bounds object by the grid size.\n *\n * @param {google.maps.LatLngBounds} bounds The bounds to extend.\n * @return {google.maps.LatLngBounds} The extended bounds.\n */\nMarkerClusterer.prototype.getExtendedBounds = function(bounds) {\n var projection = this.getProjection();\n\n // Turn the bounds into latlng.\n var tr = new google.maps.LatLng(bounds.getNorthEast().lat(),\n bounds.getNorthEast().lng());\n var bl = new google.maps.LatLng(bounds.getSouthWest().lat(),\n bounds.getSouthWest().lng());\n\n // Convert the points to pixels and the extend out by the grid size.\n var trPix = projection.fromLatLngToDivPixel(tr);\n trPix.x += this.gridSize_;\n trPix.y -= this.gridSize_;\n\n var blPix = projection.fromLatLngToDivPixel(bl);\n blPix.x -= this.gridSize_;\n blPix.y += this.gridSize_;\n\n // Convert the pixel points back to LatLng\n var ne = projection.fromDivPixelToLatLng(trPix);\n var sw = projection.fromDivPixelToLatLng(blPix);\n\n // Extend the bounds to contain the new bounds.\n bounds.extend(ne);\n bounds.extend(sw);\n\n return bounds;\n};\n\n\n/**\n * Determins if a marker is contained in a bounds.\n *\n * @param {google.maps.Marker} marker The marker to check.\n * @param {google.maps.LatLngBounds} bounds The bounds to check against.\n * @return {boolean} True if the marker is in the bounds.\n * @private\n */\nMarkerClusterer.prototype.isMarkerInBounds_ = function(marker, bounds) {\n return bounds.contains(marker.getPosition());\n};\n\n\n/**\n * Clears all clusters and markers from the clusterer.\n */\nMarkerClusterer.prototype.clearMarkers = function() {\n this.resetViewport(true);\n\n // Set the markers a empty array.\n this.markers_ = [];\n};\n\n\n/**\n * Clears all existing clusters and recreates them.\n * @param {boolean} opt_hide To also hide the marker.\n */\nMarkerClusterer.prototype.resetViewport = function(opt_hide) {\n // Remove all the clusters\n for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {\n cluster.remove();\n }\n\n // Reset the markers to not be added and to be invisible.\n for (var i = 0, marker; marker = this.markers_[i]; i++) {\n marker.isAdded = false;\n if (opt_hide) {\n marker.setMap(null);\n }\n }\n\n this.clusters_ = [];\n};\n\n/**\n *\n */\nMarkerClusterer.prototype.repaint = function() {\n var oldClusters = this.clusters_.slice();\n this.clusters_.length = 0;\n this.resetViewport();\n this.redraw();\n\n // Remove the old clusters.\n // Do it in a timeout so the other clusters have been drawn first.\n window.setTimeout(function() {\n for (var i = 0, cluster; cluster = oldClusters[i]; i++) {\n cluster.remove();\n }\n }, 0);\n};\n\n\n/**\n * Redraws the clusters.\n */\nMarkerClusterer.prototype.redraw = function() {\n this.createClusters_();\n};\n\n\n/**\n * Calculates the distance between two latlng locations in km.\n * @see http://www.movable-type.co.uk/scripts/latlong.html\n *\n * @param {google.maps.LatLng} p1 The first lat lng point.\n * @param {google.maps.LatLng} p2 The second lat lng point.\n * @return {number} The distance between the two points in km.\n * @private\n*/\nMarkerClusterer.prototype.distanceBetweenPoints_ = function(p1, p2) {\n if (!p1 || !p2) {\n return 0;\n }\n\n var R = 6371; // Radius of the Earth in km\n var dLat = (p2.lat() - p1.lat()) * Math.PI / 180;\n var dLon = (p2.lng() - p1.lng()) * Math.PI / 180;\n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) *\n Math.sin(dLon / 2) * Math.sin(dLon / 2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n var d = R * c;\n return d;\n};\n\n\n/**\n * Add a marker to a cluster, or creates a new cluster.\n *\n * @param {google.maps.Marker} marker The marker to add.\n * @private\n */\nMarkerClusterer.prototype.addToClosestCluster_ = function(marker) {\n var distance = 40000; // Some large number\n var clusterToAddTo = null;\n var pos = marker.getPosition();\n for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {\n var center = cluster.getCenter();\n if (center) {\n var d = this.distanceBetweenPoints_(center, marker.getPosition());\n if (d < distance) {\n distance = d;\n clusterToAddTo = cluster;\n }\n }\n }\n\n if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\n clusterToAddTo.addMarker(marker);\n } else {\n var cluster = new Cluster(this);\n cluster.addMarker(marker);\n this.clusters_.push(cluster);\n }\n};\n\n\n/**\n * Creates the clusters.\n *\n * @private\n */\nMarkerClusterer.prototype.createClusters_ = function() {\n if (!this.ready_) {\n return;\n }\n\n // Get our current map view bounds.\n // Create a new bounds object so we don't affect the map.\n var mapBounds = new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),\n this.map_.getBounds().getNorthEast());\n var bounds = this.getExtendedBounds(mapBounds);\n\n for (var i = 0, marker; marker = this.markers_[i]; i++) {\n if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) {\n this.addToClosestCluster_(marker);\n }\n }\n};\n\n\n/**\n * A cluster that contains markers.\n *\n * @param {MarkerClusterer} markerClusterer The markerclusterer that this\n * cluster is associated with.\n * @constructor\n * @ignore\n */\nfunction Cluster(markerClusterer) {\n this.markerClusterer_ = markerClusterer;\n this.map_ = markerClusterer.getMap();\n this.gridSize_ = markerClusterer.getGridSize();\n this.minClusterSize_ = markerClusterer.getMinClusterSize();\n this.averageCenter_ = markerClusterer.isAverageCenter();\n this.center_ = null;\n this.markers_ = [];\n this.bounds_ = null;\n this.clusterIcon_ = new ClusterIcon(this, markerClusterer.getStyles(),\n markerClusterer.getGridSize());\n}\n\n/**\n * Determins if a marker is already added to the cluster.\n *\n * @param {google.maps.Marker} marker The marker to check.\n * @return {boolean} True if the marker is already added.\n */\nCluster.prototype.isMarkerAlreadyAdded = function(marker) {\n if (this.markers_.indexOf) {\n return this.markers_.indexOf(marker) != -1;\n } else {\n for (var i = 0, m; m = this.markers_[i]; i++) {\n if (m == marker) {\n return true;\n }\n }\n }\n return false;\n};\n\n\n/**\n * Add a marker the cluster.\n *\n * @param {google.maps.Marker} marker The marker to add.\n * @return {boolean} True if the marker was added.\n */\nCluster.prototype.addMarker = function(marker) {\n if (this.isMarkerAlreadyAdded(marker)) {\n return false;\n }\n\n if (!this.center_) {\n this.center_ = marker.getPosition();\n this.calculateBounds_();\n } else {\n if (this.averageCenter_) {\n var l = this.markers_.length + 1;\n var lat = (this.center_.lat() * (l-1) + marker.getPosition().lat()) / l;\n var lng = (this.center_.lng() * (l-1) + marker.getPosition().lng()) / l;\n this.center_ = new google.maps.LatLng(lat, lng);\n this.calculateBounds_();\n }\n }\n\n marker.isAdded = true;\n this.markers_.push(marker);\n\n var len = this.markers_.length;\n if (len < this.minClusterSize_ && marker.getMap() != this.map_) {\n // Min cluster size not reached so show the marker.\n marker.setMap(this.map_);\n }\n\n if (len == this.minClusterSize_) {\n // Hide the markers that were showing.\n for (var i = 0; i < len; i++) {\n this.markers_[i].setMap(null);\n }\n }\n\n if (len >= this.minClusterSize_) {\n marker.setMap(null);\n }\n\n this.updateIcon();\n return true;\n};\n\n\n/**\n * Returns the marker clusterer that the cluster is associated with.\n *\n * @return {MarkerClusterer} The associated marker clusterer.\n */\nCluster.prototype.getMarkerClusterer = function() {\n return this.markerClusterer_;\n};\n\n\n/**\n * Returns the bounds of the cluster.\n *\n * @return {google.maps.LatLngBounds} the cluster bounds.\n */\nCluster.prototype.getBounds = function() {\n var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\n var markers = this.getMarkers();\n for (var i = 0, marker; marker = markers[i]; i++) {\n bounds.extend(marker.getPosition());\n }\n return bounds;\n};\n\n\n/**\n * Removes the cluster\n */\nCluster.prototype.remove = function() {\n this.clusterIcon_.remove();\n this.markers_.length = 0;\n delete this.markers_;\n};\n\n\n/**\n * Returns the number of markers in the cluster.\n *\n * @return {number} The number of markers in the cluster.\n */\nCluster.prototype.getSize = function() {\n return this.markers_.length;\n};\n\n\n/**\n * Returns a list of the markers in the cluster.\n *\n * @return {Array.} The markers in the cluster.\n */\nCluster.prototype.getMarkers = function() {\n return this.markers_;\n};\n\n\n/**\n * Returns the center of the cluster.\n *\n * @return {google.maps.LatLng} The cluster center.\n */\nCluster.prototype.getCenter = function() {\n return this.center_;\n};\n\n\n/**\n * Calculated the extended bounds of the cluster with the grid.\n *\n * @private\n */\nCluster.prototype.calculateBounds_ = function() {\n var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\n this.bounds_ = this.markerClusterer_.getExtendedBounds(bounds);\n};\n\n\n/**\n * Determines if a marker lies in the clusters bounds.\n *\n * @param {google.maps.Marker} marker The marker to check.\n * @return {boolean} True if the marker lies in the bounds.\n */\nCluster.prototype.isMarkerInClusterBounds = function(marker) {\n return this.bounds_.contains(marker.getPosition());\n};\n\n\n/**\n * Returns the map that the cluster is associated with.\n *\n * @return {google.maps.Map} The map.\n */\nCluster.prototype.getMap = function() {\n return this.map_;\n};\n\n\n/**\n * Updates the cluster icon\n */\nCluster.prototype.updateIcon = function() {\n var zoom = this.map_.getZoom();\n var mz = this.markerClusterer_.getMaxZoom();\n\n if (mz && zoom > mz) {\n // The zoom is greater than our max zoom so show all the markers in cluster.\n for (var i = 0, marker; marker = this.markers_[i]; i++) {\n marker.setMap(this.map_);\n }\n return;\n }\n\n if (this.markers_.length < this.minClusterSize_) {\n // Min cluster size not yet reached.\n this.clusterIcon_.hide();\n return;\n }\n\n var numStyles = this.markerClusterer_.getStyles().length;\n var sums = this.markerClusterer_.getCalculator()(this.markers_, numStyles);\n this.clusterIcon_.setCenter(this.center_);\n this.clusterIcon_.setSums(sums);\n this.clusterIcon_.show();\n};\n\n\n/**\n * A cluster icon\n *\n * @param {Cluster} cluster The cluster to be associated with.\n * @param {Object} styles An object that has style properties:\n * 'url': (string) The image url.\n * 'height': (number) The image height.\n * 'width': (number) The image width.\n * 'anchor': (Array) The anchor position of the label text.\n * 'textColor': (string) The text color.\n * 'textSize': (number) The text size.\n * 'backgroundPosition: (string) The background postition x, y.\n * @param {number=} opt_padding Optional padding to apply to the cluster icon.\n * @constructor\n * @extends google.maps.OverlayView\n * @ignore\n */\nfunction ClusterIcon(cluster, styles, opt_padding) {\n cluster.getMarkerClusterer().extend(ClusterIcon, google.maps.OverlayView);\n\n this.styles_ = styles;\n this.padding_ = opt_padding || 0;\n this.cluster_ = cluster;\n this.center_ = null;\n this.map_ = cluster.getMap();\n this.div_ = null;\n this.sums_ = null;\n this.visible_ = false;\n\n this.setMap(this.map_);\n}\n\n\n/**\n * Triggers the clusterclick event and zoom's if the option is set.\n */\nClusterIcon.prototype.triggerClusterClick = function() {\n var markerClusterer = this.cluster_.getMarkerClusterer();\n\n // Trigger the clusterclick event.\n google.maps.event.trigger(markerClusterer.map_, 'clusterclick', this.cluster_);\n\n if (markerClusterer.isZoomOnClick()) {\n // Zoom into the cluster.\n this.map_.fitBounds(this.cluster_.getBounds());\n }\n};\n\n\n/**\n * Adding the cluster icon to the dom.\n * @ignore\n */\nClusterIcon.prototype.onAdd = function() {\n this.div_ = document.createElement('DIV');\n if (this.visible_) {\n var pos = this.getPosFromLatLng_(this.center_);\n this.div_.style.cssText = this.createCss(pos);\n this.div_.innerHTML = this.sums_.text;\n }\n\n var panes = this.getPanes();\n panes.overlayMouseTarget.appendChild(this.div_);\n\n var that = this;\n google.maps.event.addDomListener(this.div_, 'click', function() {\n that.triggerClusterClick();\n });\n};\n\n\n/**\n * Returns the position to place the div dending on the latlng.\n *\n * @param {google.maps.LatLng} latlng The position in latlng.\n * @return {google.maps.Point} The position in pixels.\n * @private\n */\nClusterIcon.prototype.getPosFromLatLng_ = function(latlng) {\n var pos = this.getProjection().fromLatLngToDivPixel(latlng);\n pos.x -= parseInt(this.width_ / 2, 10);\n pos.y -= parseInt(this.height_ / 2, 10);\n return pos;\n};\n\n\n/**\n * Draw the icon.\n * @ignore\n */\nClusterIcon.prototype.draw = function() {\n if (this.visible_) {\n var pos = this.getPosFromLatLng_(this.center_);\n this.div_.style.top = pos.y + 'px';\n this.div_.style.left = pos.x + 'px';\n }\n};\n\n\n/**\n * Hide the icon.\n */\nClusterIcon.prototype.hide = function() {\n if (this.div_) {\n this.div_.style.display = 'none';\n }\n this.visible_ = false;\n};\n\n\n/**\n * Position and show the icon.\n */\nClusterIcon.prototype.show = function() {\n if (this.div_) {\n var pos = this.getPosFromLatLng_(this.center_);\n this.div_.style.cssText = this.createCss(pos);\n this.div_.style.display = '';\n }\n this.visible_ = true;\n};\n\n\n/**\n * Remove the icon from the map\n */\nClusterIcon.prototype.remove = function() {\n this.setMap(null);\n};\n\n\n/**\n * Implementation of the onRemove interface.\n * @ignore\n */\nClusterIcon.prototype.onRemove = function() {\n if (this.div_ && this.div_.parentNode) {\n this.hide();\n this.div_.parentNode.removeChild(this.div_);\n this.div_ = null;\n }\n};\n\n\n/**\n * Set the sums of the icon.\n *\n * @param {Object} sums The sums containing:\n * 'text': (string) The text to display in the icon.\n * 'index': (number) The style index of the icon.\n */\nClusterIcon.prototype.setSums = function(sums) {\n this.sums_ = sums;\n this.text_ = sums.text;\n this.index_ = sums.index;\n if (this.div_) {\n this.div_.innerHTML = sums.text;\n }\n\n this.useStyle();\n};\n\n\n/**\n * Sets the icon to the the styles.\n */\nClusterIcon.prototype.useStyle = function() {\n var index = Math.max(0, this.sums_.index - 1);\n index = Math.min(this.styles_.length - 1, index);\n var style = this.styles_[index];\n this.url_ = style['url'];\n this.height_ = style['height'];\n this.width_ = style['width'];\n this.textColor_ = style['textColor'];\n this.anchor_ = style['anchor'];\n this.textSize_ = style['textSize'];\n this.backgroundPosition_ = style['backgroundPosition'];\n};\n\n\n/**\n * Sets the center of the icon.\n *\n * @param {google.maps.LatLng} center The latlng to set as the center.\n */\nClusterIcon.prototype.setCenter = function(center) {\n this.center_ = center;\n};\n\n\n/**\n * Create the css text based on the position of the icon.\n *\n * @param {google.maps.Point} pos The position.\n * @return {string} The css style text.\n */\nClusterIcon.prototype.createCss = function(pos) {\n var style = [];\n style.push('background-image:url(' + this.url_ + ');');\n var backgroundPosition = this.backgroundPosition_ ? this.backgroundPosition_ : '0 0';\n style.push('background-position:' + backgroundPosition + ';');\n\n if (typeof this.anchor_ === 'object') {\n if (typeof this.anchor_[0] === 'number' && this.anchor_[0] > 0 &&\n this.anchor_[0] < this.height_) {\n style.push('height:' + (this.height_ - this.anchor_[0]) +\n 'px; padding-top:' + this.anchor_[0] + 'px;');\n } else {\n style.push('height:' + this.height_ + 'px; line-height:' + this.height_ +\n 'px;');\n }\n if (typeof this.anchor_[1] === 'number' && this.anchor_[1] > 0 &&\n this.anchor_[1] < this.width_) {\n style.push('width:' + (this.width_ - this.anchor_[1]) +\n 'px; padding-left:' + this.anchor_[1] + 'px;');\n } else {\n style.push('width:' + this.width_ + 'px; text-align:center;');\n }\n } else {\n style.push('height:' + this.height_ + 'px; line-height:' +\n this.height_ + 'px; width:' + this.width_ + 'px; text-align:center;');\n }\n\n var txtColor = this.textColor_ ? this.textColor_ : 'black';\n var txtSize = this.textSize_ ? this.textSize_ : 11;\n\n style.push('cursor:pointer; top:' + pos.y + 'px; left:' +\n pos.x + 'px; color:' + txtColor + '; position:absolute; font-size:' +\n txtSize + 'px; font-family:Arial,sans-serif; font-weight:bold');\n return style.join('');\n};\n\n\n// Export Symbols for Closure\n// If you are not going to compile with closure then you can remove the\n// code below.\nwindow['MarkerClusterer'] = MarkerClusterer;\nMarkerClusterer.prototype['addMarker'] = MarkerClusterer.prototype.addMarker;\nMarkerClusterer.prototype['addMarkers'] = MarkerClusterer.prototype.addMarkers;\nMarkerClusterer.prototype['clearMarkers'] =\n MarkerClusterer.prototype.clearMarkers;\nMarkerClusterer.prototype['fitMapToMarkers'] =\n MarkerClusterer.prototype.fitMapToMarkers;\nMarkerClusterer.prototype['getCalculator'] =\n MarkerClusterer.prototype.getCalculator;\nMarkerClusterer.prototype['getGridSize'] =\n MarkerClusterer.prototype.getGridSize;\nMarkerClusterer.prototype['getExtendedBounds'] =\n MarkerClusterer.prototype.getExtendedBounds;\nMarkerClusterer.prototype['getMap'] = MarkerClusterer.prototype.getMap;\nMarkerClusterer.prototype['getMarkers'] = MarkerClusterer.prototype.getMarkers;\nMarkerClusterer.prototype['getMaxZoom'] = MarkerClusterer.prototype.getMaxZoom;\nMarkerClusterer.prototype['getStyles'] = MarkerClusterer.prototype.getStyles;\nMarkerClusterer.prototype['getTotalClusters'] =\n MarkerClusterer.prototype.getTotalClusters;\nMarkerClusterer.prototype['getTotalMarkers'] =\n MarkerClusterer.prototype.getTotalMarkers;\nMarkerClusterer.prototype['redraw'] = MarkerClusterer.prototype.redraw;\nMarkerClusterer.prototype['removeMarker'] =\n MarkerClusterer.prototype.removeMarker;\nMarkerClusterer.prototype['removeMarkers'] =\n MarkerClusterer.prototype.removeMarkers;\nMarkerClusterer.prototype['resetViewport'] =\n MarkerClusterer.prototype.resetViewport;\nMarkerClusterer.prototype['repaint'] =\n MarkerClusterer.prototype.repaint;\nMarkerClusterer.prototype['setCalculator'] =\n MarkerClusterer.prototype.setCalculator;\nMarkerClusterer.prototype['setGridSize'] =\n MarkerClusterer.prototype.setGridSize;\nMarkerClusterer.prototype['setMaxZoom'] =\n MarkerClusterer.prototype.setMaxZoom;\nMarkerClusterer.prototype['onAdd'] = MarkerClusterer.prototype.onAdd;\nMarkerClusterer.prototype['draw'] = MarkerClusterer.prototype.draw;\n\nCluster.prototype['getCenter'] = Cluster.prototype.getCenter;\nCluster.prototype['getSize'] = Cluster.prototype.getSize;\nCluster.prototype['getMarkers'] = Cluster.prototype.getMarkers;\n\nClusterIcon.prototype['onAdd'] = ClusterIcon.prototype.onAdd;\nClusterIcon.prototype['draw'] = ClusterIcon.prototype.draw;\nClusterIcon.prototype['onRemove'] = ClusterIcon.prototype.onRemove;\n\nObject.keys = Object.keys || function(o) { \n var result = []; \n for(var name in o) { \n if (o.hasOwnProperty(name)) \n result.push(name); \n } \n return result; \n};\n","dmx.Component('google-maps', {\r\n\r\n initialData: {\r\n zoom: 10,\r\n maptype: 'roadmap',\r\n latitude: null,\r\n longitude: null\r\n },\r\n\r\n attributes: {\r\n width: {\r\n type: [String, Number],\r\n default: '100%'\r\n },\r\n\r\n height: {\r\n type: [String, Number],\r\n default: 400\r\n },\r\n\r\n latitude: {\r\n type: Number,\r\n default: null\r\n },\r\n\r\n longitude: {\r\n type: Number,\r\n default: null\r\n },\r\n\r\n address: {\r\n type: String,\r\n default: null\r\n },\r\n\r\n /*\r\n Zoom Levels\r\n 1: World\r\n 5: Landmass/continent\r\n 10: City\r\n 15: Streets\r\n 20: Buildings\r\n */\r\n zoom: {\r\n type: Number,\r\n default: 10\r\n },\r\n\r\n maptype: {\r\n type: String,\r\n default: 'roadmap' // roadmap, satellite, hybrid, terrain\r\n },\r\n\r\n scrollwheel: {\r\n type: Boolean,\r\n default: false\r\n },\r\n\r\n tilt: {\r\n type: Boolean,\r\n default: false\r\n },\r\n\r\n 'rotate-control': {\r\n type: Boolean,\r\n default: false\r\n },\r\n\r\n 'scale-control': {\r\n type: Boolean,\r\n default: false\r\n },\r\n\r\n 'fullscreen-control': {\r\n type: Boolean,\r\n default: false\r\n },\r\n\r\n 'zoom-control': {\r\n type: Boolean,\r\n default: false\r\n },\r\n\r\n 'streetview-control': {\r\n type: Boolean,\r\n default: false\r\n },\r\n\r\n 'maptype-control': {\r\n type: Boolean,\r\n default: false\r\n },\r\n\r\n 'enable-clusters': {\r\n type: Boolean,\r\n default: false\r\n },\r\n\r\n 'traffic-layer': {\r\n type: Boolean,\r\n default: false\r\n },\r\n\r\n 'transit-layer': {\r\n type: Boolean,\r\n default: false\r\n },\r\n\r\n 'bicycling-layer': {\r\n type: Boolean,\r\n default: false\r\n },\r\n\r\n markers: {\r\n type: Array,\r\n default: null\r\n },\r\n\r\n 'marker-id': {\r\n type: String,\r\n default: 'id'\r\n },\r\n\r\n 'marker-latitude': {\r\n type: String,\r\n default: 'latitude'\r\n },\r\n\r\n 'marker-longitude': {\r\n type: String,\r\n default: 'longitude'\r\n },\r\n\r\n 'marker-address': {\r\n type: String,\r\n default: 'address'\r\n },\r\n\r\n 'marker-label': {\r\n type: String,\r\n default: 'label'\r\n },\r\n\r\n 'marker-label-color': {\r\n type: String,\r\n default: 'label'\r\n },\r\n\r\n 'marker-title': {\r\n type: String,\r\n default: 'title'\r\n },\r\n\r\n 'marker-info': {\r\n type: String,\r\n default: 'info'\r\n },\r\n\r\n 'marker-type': {\r\n type: String,\r\n default: 'type'\r\n },\r\n\r\n 'marker-image': {\r\n type: String,\r\n default: 'type'\r\n },\r\n\r\n 'marker-animation': {\r\n type: String,\r\n default: 'animation' // bounce and drop\r\n },\r\n\r\n 'marker-draggable': {\r\n type: String,\r\n default: 'draggable'\r\n }\r\n },\r\n\r\n methods: {\r\n addMarker: function(options) {\r\n var marker = this.addMarker(options);\r\n if (this.cluster && this.props['enable-clusters']) {\r\n this.cluster.addMarker(marker);\r\n } else {\r\n marker.setMap(this.map);\r\n }\r\n },\r\n\r\n goToMarker: function(id) {\r\n var marker = this.findMarker(id);\r\n if (marker) {\r\n this.map.setCenter(marker.position);\r\n }\r\n },\r\n\r\n panToMarker: function(id) {\r\n var marker = this.findMarker(id);\r\n if (marker) {\r\n this.map.panTo(marker.position);\r\n }\r\n },\r\n\r\n bounceMarker: function(id) {\r\n var marker = this.findMarker(id);\r\n if (marker) {\r\n marker.setAnimation(1);\r\n }\r\n },\r\n\r\n fitBoundsToMarkers: function() {\r\n if (this.markers.length) {\r\n var bounds = new google.maps.LatLngBounds();\r\n\r\n for (var i = 0; i < this.markers.length; i++) {\r\n bounds.extend(this.markers[i].getPosition());\r\n }\r\n\r\n this.map.fitBounds(bounds);\r\n }\r\n },\r\n\r\n stopBounce: function(id) {\r\n var marker = this.findMarker(id);\r\n if (marker) {\r\n marker.setAnimation(null);\r\n }\r\n },\r\n\r\n showInfo: function(id) {\r\n var marker = this.findMarker(id);\r\n if (marker && marker.infoWindow) {\r\n marker.infoWindow.open(this.map, marker);\r\n }\r\n },\r\n\r\n removeAllMarkers: function() {\r\n this.removeAllMarkers();\r\n },\r\n\r\n panTo: function(latitude, longitude) {\r\n this.map.panTo({ lat: +latitude, lng: +longitude });\r\n },\r\n\r\n setCenter: function(latitude, longitude) {\r\n this.map.setCenter({ lat: +latitude, lng: +longitude });\r\n },\r\n\r\n setMapType: function(maptype) {\r\n this.map.setMapTypeId(maptype);\r\n },\r\n\r\n setZoom: function(zoom) {\r\n this.map.setZoom(zoom);\r\n },\r\n\r\n refresh: function() {\r\n google.maps.event.trigger(this.map, 'resize');\r\n },\r\n\r\n reload: function() {\r\n this.update({});\r\n }\r\n },\r\n\r\n events: {\r\n ready: Event,\r\n boundschanged: Event,\r\n centerchanged: Event,\r\n maptypechanged: Event,\r\n zoomchanged: Event,\r\n mapclick: Event\r\n },\r\n\r\n render: function(node) {\r\n this.$parse();\r\n\r\n node.style.display = 'block';\r\n node.style.width = this.getSize(this.props.width);\r\n node.style.height = this.getSize(this.props.height);\r\n\r\n this.geocodeCache = JSON.parse(localStorage.geocodeCache || '{}');\r\n this.geocoder = new google.maps.Geocoder();\r\n this.infoWindow = new google.maps.InfoWindow();\r\n\r\n this.markers = [];\r\n this.getMarkerTypes();\r\n\r\n this.map = new google.maps.Map(node, {\r\n zoom: +this.props.zoom,\r\n center: { lat: +this.props.latitude, lng: +this.props.longitude },\r\n mapTypeId: this.props.maptype,\r\n scrollwheel: this.props.scrollwheel,\r\n scaleControl: this.props['scale-control'],\r\n zoomControl: this.props['zoom-control'],\r\n panControl: this.props['pan-control'],\r\n streetViewControl: this.props['streetview-control'],\r\n mapTypeControl: this.props['maptype-control'],\r\n rotateControl: this.props['rotate-control'],\r\n fullscreenControl: this.props['fullscreen-control']\r\n });\r\n\r\n this.set('latitude', +this.props.latitude);\r\n this.set('longitude', +this.props.longitude);\r\n this.set('maptype', this.map.getMapTypeId());\r\n this.set('zoom', this.map.getZoom());\r\n\r\n this.map.addListener('click', this.onMapClick.bind(this));\r\n this.map.addListener('bounds_changed', dmx.debounce(this.onBoundsChanged.bind(this), 100));\r\n this.map.addListener('center_changed', dmx.debounce(this.onCenterChanged.bind(this), 100));\r\n this.map.addListener('maptypeid_changed', dmx.debounce(this.onMaptypeChanged.bind(this), 100));\r\n this.map.addListener('zoom_changed', dmx.debounce(this.onZoomChanged.bind(this), 100));\r\n setTimeout(this.dispatchEvent.bind(this, 'ready'), 100);\r\n\r\n if (window.googleMapsTheme) {\r\n this.map.setOptions({ styles: window.googleMapsTheme });\r\n }\r\n\r\n if (this.props.tilt) {\r\n this.map.setTilt(45);\r\n }\r\n\r\n this.getMarkers();\r\n\r\n if (this.props['enable-clusters']) {\r\n this.cluster = new MarkerClusterer(this.map, this.markers, {\r\n imagePath: this.getImageFolder()\r\n });\r\n }\r\n\r\n if (!(this.props.latitude && this.props.longitude) && this.props.address) {\r\n this.geocode(this.props.address);\r\n }\r\n\r\n if (this.props['traffic-layer']) {\r\n this.trafficLayer = new google.maps.TrafficLayer();\r\n this.trafficLayer.setMap(this.map);\r\n }\r\n\r\n if (this.props['transit-layer']) {\r\n this.transitLayer = new google.maps.TransitLayer();\r\n this.transitLayer.setMap(this.map);\r\n }\r\n\r\n if (this.props['bicycling-layer']) {\r\n this.bikeLayer = new google.maps.BicyclingLayer();\r\n this.bikeLayer.setMap(this.map);\r\n }\r\n },\r\n\r\n update: function(props) {\r\n if (this.props.latitude != props.latitude || this.props.longitude != props.longitude) {\r\n this.map.setCenter({ lat: +this.props.latitude, lng: +this.props.longitude });\r\n }\r\n\r\n if (this.props.address && this.props.address != props.address) {\r\n this.geocode(this.props.address);\r\n }\r\n\r\n if (this.props.zoom != props.zoom) {\r\n this.map.setZoom(+this.props.zoom);\r\n }\r\n\r\n if (this.props.maptype != props.maptype) {\r\n this.map.setMapTypeId(this.props.maptype);\r\n }\r\n\r\n if (this.props.tilt != props.tilt) {\r\n this.map.setTilt(this.props.tilt ? 45 : 0);\r\n }\r\n\r\n if (JSON.stringify(this.props.markers) != JSON.stringify(props.markers)) {\r\n this.removeAllMarkers();\r\n\r\n var markers = dmx.repeatItems(this.props.markers);\r\n\r\n if (Array.isArray(markers)) {\r\n markers.forEach(function(marker) {\r\n var scope = new dmx.DataScope(marker);\r\n this.addMarker({\r\n id: dmx.parse(this.props['marker-id'], scope),\r\n latitude: +dmx.parse(this.props['marker-latitude'], scope),\r\n longitude: +dmx.parse(this.props['marker-longitude'], scope),\r\n address: dmx.parse(this.props['marker-address'], scope),\r\n label: dmx.parse(this.props['marker-label'], scope),\r\n labelColor: dmx.parse(this.props['marker-label-color'], scope),\r\n title: dmx.parse(this.props['marker-title'], scope),\r\n info: dmx.parse(this.props['marker-info'], scope),\r\n type: dmx.parse(this.props['marker-type'], scope),\r\n image: dmx.parse(this.props['marker-image'], scope),\r\n animation: dmx.parse(this.props['marker-animation'], scope),\r\n draggable: !!dmx.parse(this.props['marker-draggable'], scope)\r\n });\r\n }, this);\r\n\r\n if (this.props['enable-clusters']) {\r\n this.cluster = new MarkerClusterer(this.map, this.markers, {\r\n imagePath: this.getImageFolder()\r\n });\r\n }\r\n }\r\n }\r\n\r\n if (JSON.stringify(this.props) != JSON.stringify(props)) {\r\n this.map.setOptions({\r\n scrollwheel: this.props.scrollwheel,\r\n scaleControl: this.props['scale-control'],\r\n zoomControl: this.props['zoom-control'],\r\n panControl: this.props['pan-control'],\r\n streetViewControl: this.props['streetview-control'],\r\n mapTypeControl: this.props['maptype-control'],\r\n rotateControl: this.props['rotate-control'],\r\n fullscreenControl: this.props['fullscreen-control']\r\n });\r\n }\r\n\r\n if (this.props['traffic-layer'] != props['traffic-layer']) {\r\n this.trafficLayer = this.trafficLayer || new google.maps.TrafficLayer();\r\n this.trafficLayer.setMap(this.props['traffic-layer'] ? this.map : null);\r\n }\r\n\r\n if (this.props['transit-layer'] != props['transit-layer']) {\r\n this.transitLayer = this.transitLayer || new google.maps.TransitLayer();\r\n this.transitLayer.setMap(this.props['transit-layer'] ? this.map : null);\r\n }\r\n\r\n if (this.props['bicycling-layer'] != props['bicycling-layer']) {\r\n this.bikeLayer = this.bikeLayer || new google.maps.BicyclingLayer();\r\n this.bikeLayer.setMap(this.props['bicycling-layer'] ? this.map : null);\r\n }\r\n },\r\n\r\n onMapClick: function(e) {\r\n this.dispatchEvent('mapclick', null, { latitude: e.latLng.lat(), longitude: e.latLng.lng(), position: e.latLng.toJSON() });\r\n },\r\n\r\n onBoundsChanged: function() {\r\n this.dispatchEvent('boundschanged');\r\n },\r\n\r\n onCenterChanged: function() {\r\n var center = this.map.getCenter();\r\n this.set('latitude', center.lat());\r\n this.set('longitude', center.lng());\r\n this.dispatchEvent('centerchanged');\r\n },\r\n\r\n onMaptypeChanged: function() {\r\n this.set('maptype', this.map.getMapTypeId());\r\n this.dispatchEvent('maptypechanged');\r\n },\r\n\r\n onZoomChanged: function() {\r\n this.set('zoom', this.map.getZoom());\r\n this.dispatchEvent('zoomchanged');\r\n },\r\n\r\n geocode: function(address) {\r\n if (address) {\r\n if (this.geocodeCache[address]) {\r\n this.map.setCenter(this.geocodeCache[address]);\r\n } else {\r\n this.geocoder.geocode({ address: this.props.address }, function(results, status) {\r\n if (status == 'OK') {\r\n this.geocodeCache[address] = results[0].geometry.location;\r\n this.map.setCenter(this.geocodeCache[address]);\r\n localStorage.geocodeCache = JSON.stringify(this.geocodeCache);\r\n } else {\r\n console.warn('Geocode was not successful for the following reason: ' + status)\r\n }\r\n }.bind(this));\r\n }\r\n }\r\n },\r\n\r\n openInfoWindow: function(marker, content) {\r\n this.infoWindow.setContent(content);\r\n this.infoWindow.open(this.map, marker);\r\n },\r\n\r\n getSize: function(size) {\r\n if (typeof size == 'string' && size.slice(-1) == '%') {\r\n return size;\r\n } else {\r\n return parseInt(size, 10) + 'px';\r\n }\r\n },\r\n\r\n getImageFolder: function() {\r\n var script = document.querySelector('script[src$=\"dmxGoogleMaps.js\"]');\r\n if (script && script.src) {\r\n return script.src.replace(/dmxGoogleMaps.js$/, 'images/m');\r\n }\r\n return 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m';\r\n },\r\n\r\n getMarkerAnimation: function(animation) {\r\n switch (animation.toLowerCase()) {\r\n case 'bounce': return 1;\r\n case 'drop': return 2;\r\n }\r\n\r\n return null;\r\n },\r\n\r\n findMarker: function(id) {\r\n return this.markers.find(function(marker) {\r\n return marker.id == id;\r\n });\r\n },\r\n\r\n getMarkers: function(node) {\r\n for (var i = 0; i < this.children.length; i++) {\r\n var child = this.children[i];\r\n\r\n if (child instanceof dmx.Component('google-maps-marker')) {\r\n child.marker = this.addMarker({\r\n static: true,\r\n id: child.name,\r\n latitude: +child.props.latitude,\r\n longitude: +child.props.longitude,\r\n address: child.props.address,\r\n label: child.props.label,\r\n labelColor: child.props['label-color'],\r\n title: child.props.title,\r\n info: child.props.info,\r\n type: child.props.type,\r\n image: child.props.image,\r\n animation: child.props.animation,\r\n draggable: !!child.props.draggable\r\n });\r\n }\r\n }\r\n },\r\n\r\n addMarker: function(options) {\r\n var marker = new google.maps.Marker({\r\n static: options.static || false,\r\n position: { lat: +options.latitude, lng: +options.longitude },\r\n label: options.label,\r\n title: options.title,\r\n icon: this.markerTypes[options.type],\r\n draggable: options.draggable\r\n });\r\n\r\n if (options.id) {\r\n marker.id = options.id;\r\n }\r\n\r\n if (options.image) {\r\n marker.setIcon(options.image);\r\n }\r\n\r\n if (options.label && options.labelColor) {\r\n marker.setLabel({\r\n color: options.labelColor,\r\n text: options.label\r\n });\r\n }\r\n\r\n if (options.info) {\r\n marker.addListener('click', this.openInfoWindow.bind(this, marker, options.info));\r\n }\r\n\r\n if (options.animation) {\r\n marker.setAnimation(this.getMarkerAnimation(options.animation));\r\n }\r\n\r\n if (!(options.latitude && options.longitude)) {\r\n if (options.address) {\r\n if (this.geocodeCache[options.address]) {\r\n marker.setPosition(this.geocodeCache[options.address]);\r\n } else {\r\n this.geocoder.geocode({ address: options.address }, function(results, status) {\r\n if (status == 'OK') {\r\n this.geocodeCache[options.address] = results[0].geometry.location;\r\n marker.setPosition(this.geocodeCache[options.address]);\r\n marker.setVisible(true);\r\n localStorage.geocodeCache = JSON.stringify(this.geocodeCache);\r\n } else {\r\n console.warn('Geocode was not successful for the following reason: ' + status)\r\n }\r\n }.bind(this));\r\n }\r\n } else {\r\n // Do not add?\r\n //return marker;\r\n marker.setVisible(false);\r\n }\r\n }\r\n\r\n if (this.map && !this.props['enable-clusters']) {\r\n marker.setMap(this.map);\r\n }\r\n\r\n this.markers.push(marker);\r\n\r\n return marker;\r\n },\r\n\r\n removeAllMarkers: function() {\r\n if (this.cluster) {\r\n this.cluster.clearMarkers();\r\n }\r\n\r\n this.markers = this.markers.filter(function(marker) {\r\n if (!marker.static) {\r\n marker.setMap(null);\r\n return false;\r\n }\r\n\r\n return true;\r\n });\r\n },\r\n\r\n getMarkerTypes: function() {\r\n var markerUrl = 'https://maps.google.com/mapfiles/';\r\n var iconsUrl = 'https://maps.google.com/intl/en_us/mapfiles/ms/micons/';\r\n\r\n this.markerTypes = {\r\n black: markerUrl + 'marker_black.png',\r\n grey: markerUrl + 'marker_grey.png',\r\n orange: markerUrl + 'marker_orange.png',\r\n white: markerUrl + 'marker_white.png',\r\n yellow: markerUrl + 'marker_yellow.png',\r\n purple: markerUrl + 'marker_purple.png',\r\n green: markerUrl + 'marker_green.png',\r\n start: markerUrl + 'dd-start.png',\r\n end: markerUrl + 'dd-end.png',\r\n arrow: markerUrl + 'arrow.png',\r\n tree: iconsUrl + 'tree.png',\r\n lodging: iconsUrl + 'lodging.png',\r\n bar: iconsUrl + 'bar.png',\r\n restaurant: iconsUrl + 'restaurant.png',\r\n horsebackriding: iconsUrl + 'horsebackriding.png',\r\n convienancestore: iconsUrl + 'convienancestore.png',\r\n hiker: iconsUrl + 'hiker.png',\r\n swimming: iconsUrl + 'swimming.png',\r\n fishing: iconsUrl + 'fishing.png',\r\n golfer: iconsUrl + 'golfer.png',\r\n sportvenue: iconsUrl + 'sportvenue.png'\r\n }\r\n }\r\n\r\n});\r\n","dmx.Component('google-maps-marker', {\r\n\r\n attributes: {\r\n latitude: {\r\n type: Number,\r\n default: null\r\n },\r\n\r\n longitude: {\r\n type: Number,\r\n default: null\r\n },\r\n\r\n address: {\r\n type: String,\r\n default: null\r\n },\r\n\r\n label: {\r\n type: String,\r\n default: null\r\n },\r\n\r\n 'label-color': {\r\n type: String,\r\n default: null\r\n },\r\n\r\n title: {\r\n type: String,\r\n default: null\r\n },\r\n\r\n info: {\r\n type: String,\r\n default: null\r\n },\r\n\r\n type: {\r\n type: String,\r\n default: null\r\n },\r\n\r\n image: {\r\n type: String,\r\n default: null\r\n },\r\n\r\n animation: {\r\n type: String,\r\n default: null\r\n },\r\n\r\n draggable: {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n\r\n update: function(props) {\r\n if (this.props.latitude != props.latitude || this.props.longitude != props.longitude) {\r\n this.marker.setPosition({ lat: +this.props.latitude, lng: +this.props.longitude });\r\n this.marker.setVisible(true);\r\n }\r\n\r\n if (this.props.address != props.address) {\r\n if (this.parent.geocodeCache[this.props.address]) {\r\n this.marker.setPosition(this.parent.geocodeCache[this.props.address]);\r\n } else {\r\n this.parent.geocoder.geocode({ address: this.props.address }, function(results, status) {\r\n if (status == 'OK') {\r\n this.parent.geocodeCache[this.props.address] = results[0].geometry.location;\r\n this.marker.setPosition(this.parent.geocodeCache[this.props.address]);\r\n this.marker.setVisible(true);\r\n localStorage.geocodeCache = JSON.stringify(this.parent.geocodeCache);\r\n } else {\r\n console.warn('Geocode was not successful for the following reason: ' + status)\r\n }\r\n }.bind(this));\r\n }\r\n }\r\n\r\n if (this.props.label != props.label || this.props['label-color'] != props['label-color']) {\r\n this.marker.setLabel({\r\n color: this.props['label-color'],\r\n text: this.props.label\r\n });\r\n }\r\n\r\n if (this.props.title != props.title) {\r\n this.marker.setTitle(this.props.title);\r\n }\r\n\r\n if (this.props.info != props.info) {\r\n this.marker.infoWindow = new google.maps.infoWindow({\r\n content: this.props.info\r\n });\r\n }\r\n\r\n if (this.props.type != props.type) {\r\n this.marker.setIcon(this.parent.markerTypes[this.props.type]);\r\n }\r\n\r\n if (this.props.image != props.image) {\r\n this.marker.setIcon(this.props.image);\r\n }\r\n\r\n if (this.props.animation != props.animation) {\r\n this.marker.setAnimation(this.parent.getMarkerAnimation(this.props.animation));\r\n }\r\n\r\n if (this.props.draggable != props.draggable) {\r\n this.marker.setDraggable(this.props.draggable);\r\n }\r\n }\r\n\r\n});\r\n"]}