1jQuery(document).ready(function(){ 2 3 /*! 4 * GMAP3 Plugin for jQuery 5 * Version : 7.2 6 * Date : 2016/12/03 7 * Author : DEMONTE Jean-Baptiste 8 * Contact : [email protected] 9 * Web site : http://gmap3.net 10 * Licence : GPL-3.0+ 11 */ 12
vendor: 9,610 bytes, line 12
12!function(n,t,e){"use strict";function o(n){return S(!0,{},n||{})}function r(){var n=Array.prototype.slice,t=n.call(arguments,1);return n.apply(arguments[0],t)}function i(n){return"undefined"==typeof n}function u(t){return O.apply(n,t)}function a(n){return O().then(function(){return n})}function c(n,t){var e=Math,o=e.PI,r=o*n.lat()/180,i=o*n.lng()/180,u=o*t.lat()/180,a=o*t.lng()/180,c=e.cos,s=e.sin;return 6371e3*e.acos(e.min(c(r)*c(u)*c(i)*c(a)+c(r)*s(i)*c(u)*s(a)+s(r)*s(u),1))}function s(n){"loading"!=e.readyState?n():e.addEventListener("DOMContentLoaded",n)}function f(n){return v(n).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(n[t])}).join("&")}function p(n){return D[n]||(D[n]=l(n)),D[n]}function l(n){function t(n){return e.apply(this,n)}var e=E[n];return t.prototype=e.prototype,new t(r(arguments,1))}function g(n){var t=$();return"string"==typeof n&&(n={address:n}),p("Geocoder").geocode(n,function(n,e){e===E.GeocoderStatus.OK?t.resolve(n[0].geometry.location):t.reject(e)}),t}function d(n,t){h(n.split(" "),t)}function h(n,t){(R(n)?n:[n]).forEach(t)}function v(n){return Object.keys(n)}function y(n){return v(n).map(function(t){return n[t]})}function m(n,t){return n=o(n),n.bounds&&(n.bounds=P(n.bounds)),a(t(n))}function L(n,t,e){var r=$();return n=o(n),O().then(function(){var e=n.address;return e?(delete n.address,g(e).then(function(e){n[t]=e})):void(n[t]=x(n[t]))}).then(function(){r.resolve(e(n))}).fail(function(n){r.reject(n)}),r}function w(n,t,e){return n=o(n),n[t]=(n[t]||[]).map(x),a(e(n))}function x(n,t){return R(n)?new E.LatLng(n[0],n[1]):!t||!n||n instanceof E.LatLng?n:new E.LatLng(n.lat,n.lng)}function P(n,t){return R(n)?new E.LatLngBounds({lat:n[2],lng:n[3]},{lat:n[0],lng:n[1]}):t&&!n.getCenter?new E.LatLngBounds({lat:n.south,lng:n.west},{lat:n.north,lng:n.east}):n}function b(t,o){function r(){function n(n){return e.getProjection().fromLatLngToDivPixel(n)}var e=this,r=[];i.call(e),e.setMap(t),e.onAdd=function(){var n=e.getPanes();n.overlayMouseTarget.appendChild(u[0])},o.position?(e.getPosition=function(){return o.position},e.setPosition=function(n){o.position=n,e.draw()},e.draw=function(){var t=n(o.position);u.css({left:t.x+o.x+"px",top:t.y+o.y+"px"})}):(e.getBounds=function(){return o.bounds},e.setBounds=function(n){o.bounds=n,e.draw()},e.draw=function(){var t=n(o.bounds.getSouthWest()),e=n(o.bounds.getNorthEast());u.css({left:t.x+o.x+"px",top:e.y+o.y+"px",width:e.x-t.x+o.x+"px",height:t.y-e.y+o.y+"px"})}),e.onRemove=function(){r.map(function(n){E.event.removeListener(n)}),u.remove(),e.$=u=null},e.$=u}var i=E.OverlayView,u=n(e.createElement("div")).css({border:"none",borderWidth:0,position:"absolute"}).append(o.content);return o=S({x:0,y:0},o),o.position?o.position=x(o.position,!0):o.bounds&&(o.bounds=P(o.bounds,!0)),r.prototype=new i,new r}function M(n){function t(){var n=this;return n.onAdd=n.onRemove=n.draw=function(){},E.OverlayView.call(n)}t.prototype=new E.OverlayView;var e=new t;return e.setMap(n),e.getProjection()}function B(n,t,e,o){var r=this;r.cluster=n,r.markers=t,r.$=e.$,r.overlay=e,e.getBounds=function(){return l("LatLngBounds",o.getSouthWest(),o.getNorthEast())}}function C(n,t){function e(){var t=l("Circle",{center:n.getCenter(),radius:1.15*c(n.getCenter(),n.getBounds().getNorthEast())});return t.getBounds()}function i(n){var t=d.fromLatLngToDivPixel(n);return l("LatLngBounds",d.fromDivPixelToLatLng(l("Point",t.x-P,t.y+P)),d.fromDivPixelToLatLng(l("Point",t.x+P,t.y-P)))}function u(){var u,a,c,s,f,p,d=n.getZoom(),y={},x=[],P={};p=""+d,d>3&&(a=e(),h(w,function(n,t){a.contains(n.getPosition())||(p+="-"+t,P[t]=!0,n.getMap()&&n.setMap(null))})),m&&h(w,function(n,t){P[t]||m(n)||(p+="-"+t,P[t]=!0,n.getMap()&&n.setMap(null))}),p!==g&&(g=p,h(w,function(e,p){P[p]||(u=[p],a=i(e.getPosition()),C&&h(r(w,p+1),function(n,t){t+=p+1,!P[t]&&a.contains(n.getPosition())&&(u.push(t),P[t]=!0)}),s=u.join("-"),y[s]=!0,T[s]||(f=u.map(function(n){return w[n]}),c=t.cb(r(f)),c?(a=l("LatLngBounds"),h(f,function(n){a.extend(n.getPosition()),n.getMap()&&n.setMap(null)}),c=o(c),c.position=a.getCenter(),T[s]=new B(L,r(f),b(n,c),a),x.push(T[s])):h(f,function(t){t.getMap()||t.setMap(n)})))}),h(v(T),function(n){y[n]||(T[n].overlay.setMap(null),delete T[n])}),x.length&&h(k,function(n){n(x)}))}function a(){clearTimeout(f),f=setTimeout(u,100)}function s(){E.event.addListener(n,"zoom_changed",a),E.event.addListener(n,"bounds_changed",a),u()}var f,p,g,d,m,L=this,w=[],P=(t.size||200)>>1,C=!0,T={},k=[];t=t||{},t.markers=t.markers||[],L._b=function(n){n(y(T)),k.push(n)},L.markers=function(){return r(w)},L.groups=function(){return y(T)},L.enable=function(){C||(C=!0,g="",a())},L.disable=function(){C&&(C=!1,g="",a())},L.add=function(n){w.push(n),g="",a()},L.remove=function(n){w=w.filter(function(t){return t!==n}),g="",a()},L.filter=function(n){m!==n&&(m=n,g="",a())},t.markers.map(function(n){n.position=x(n.position),w.push(l("Marker",n))}),p=setInterval(function(){d=M(n),d&&(clearInterval(p),s())},10)}function T(n,t){var e=this;v(t[0]).forEach(function(n){e[n]=function(){var o=[],i=r(arguments);return t.forEach(function(t){o.push(t[n].apply(t,i))}),"get"===n?o.length>1?o:o[0]:e}}),e.$=n}function k(t,e){function c(){return{$:t,get:M.get}}function s(t,e,o,i){var u=arguments.length>3;u||(i=o),n.each(t,function(n,t){h(e,function(e){var a=e instanceof B,s=a||e instanceof E.OverlayView,f=s?e.$.get(0):e;E.event["add"+(s?"Dom":"")+"Listener"+(i?"Once":"")](f,n,function(n){h(t,function(t){if(A(t))if(a)t.call(c(),void 0,e,e.cluster,n);else if(u){var i=r(o);i.unshift(e),i.push(n),t.apply(c(),i)}else t.call(c(),e,n)})})})})}function f(n){return function(t){if(R(t)){var e=[],o=t.map(function(t){return n.call(M,t).then(function(n){e.push(n)})});return u(o).then(function(){return y.push(e),e})}return n.apply(M,arguments).then(function(n){return y.push(n),n})}}function g(n){return function(){var t=r(arguments);return P=P.then(function(e){return A(t[0])?O(t[0].call(c(),e)).then(function(e){return t[0]=e,n.apply(M,t)}):O(n.apply(M,t))})}}var v,y=[],P=O(),M=this;M.map=g(function(n){return v||L(n,"center",function(n){return v=l("Map",t.get(0),n),y.push(v),v})}),d("Marker:position Circle:center InfoWindow:position:0 Polyline:path Polygon:paths",function(n){n=n.split(":");var t=n[1]||"";M[n[0].toLowerCase()]=g(f(function(e){return(t.match(/^path/)?w:L)(e,t,function(t){return"0"!==n[2]&&(t.map=v),l(n[0],t)})}))}),d("TrafficLayer TransitLayer BicyclingLayer",function(n){M[n.toLowerCase()]=g(function(){var t=l(n);return y.push(t),t.setMap(v),t})}),M.kmllayer=g(f(function(n){return n=o(n),n.map=v,O(l("KmlLayer",n))})),M.rectangle=g(f(function(n){return m(n,function(n){return n.map=v,l("Rectangle",n)})})),M.overlay=g(f(function(n){function t(n){return b(v,n)}return n=o(n),n.bounds?m(n,t):L(n,"position",t)})),M.groundoverlay=g(function(n,t,e){return m({bounds:t},function(t){e=o(e),e.map=v;var r=l("GroundOverlay",n,t.bounds,e);return y.push(r),r})}),M.styledmaptype=g(function(n,t,e){var o=l("StyledMapType",t,e);return y.push(o),v.mapTypes.set(n,o),o}),M.streetviewpanorama=g(function(t,e){return L(e,"position",function(e){var o=l("StreetViewPanorama",n(t).get(0),e);return v.setStreetView(o),y.push(o),o})}),M.route=g(function(n){var t=$();return n=o(n),n.origin=x(n.origin),n.destination=x(n.destination),p("DirectionsService").route(n,function(n,e){y.push(n),t.resolve(e===E.DirectionsStatus.OK?n:!1)}),t}),M.cluster=g(function(n){var t=new C(v,o(n));return y.push(t),a(t)}),M.directionsrenderer=g(function(t){var e;return t&&(t=o(t),t.map=v,t.panel&&(t.panel=n(t.panel).get(0)),e=l("DirectionsRenderer",t)),y.push(e),e}),M.latlng=g(f(function(n){return L(n,"latlng",function(n){return y.push(n.latlng),n.latlng})})),M.fit=g(function(){var n=l("LatLngBounds");return h(y,function(t){t!==v&&h(t,function(t){t&&(t.getPosition&&t.getPosition()?n.extend(t.getPosition()):t.getBounds&&t.getBounds()?(n.extend(t.getBounds().getNorthEast()),n.extend(t.getBounds().getSouthWest())):t.getPaths&&t.getPaths()?h(t.getPaths().getArray(),function(t){h(t.getArray(),function(t){n.extend(t)})}):t.getPath&&t.getPath()?h(t.getPath().getArray(),function(t){n.extend(t)}):t.getCenter&&t.getCenter()&&n.extend(t.getCenter()))})}),n.isEmpty()||v.fitBounds(n),!0}),M.wait=function(n){P=P.then(function(t){var e=$();return setTimeout(function(){e.resolve(t)},n),e})},M.then=function(n){A(n)&&(P=P.then(function(t){return O(n.call(c(),t)).then(function(n){return i(n)?t:n})}))},M["catch"]=function(n){A(n)&&(P=P.then(null,function(t){return O(n.call(c(),t))}))},d("on once",function(n,t){M[n]=function(){var n=arguments[0];n&&("string"==typeof n&&(n={},n[arguments[0]]=r(arguments,1)),P.then(function(e){if(e){if(e instanceof C)return e._b(function(e){e&&e.length&&s(n,e,t)}),s(n,e.markers(),[void 0,e],t);s(n,e,t)}}))}}),M.get=function(n){return i(n)?y.map(function(n){return R(n)?n.slice():n}):(0>n&&(n=y.length+n),R(y[n])?y[n].slice():y[n])},e&&M.map(e)}var E,j,D={},O=n.when,S=n.extend,R=n.isArray,A=n.isFunction,$=n.Deferred;O(function(){var o,r=$(),i="__gmap3";return n.holdReady(!0),s(function(){t.google&&t.google.maps||j===!1?r.resolve():(t[i]=function(){delete t[i],r.resolve()},o=e.createElement("script"),o.type="text/javascript",o.src="https://maps.googleapis.com/maps/api/js?callback="+i+(j?"&"+("string"==typeof j?j:f(j)):""),n("head").append(o))}),r}()).then(function(){n.holdReady(!1)}),n.gmap3=function(n){j=n},n.fn.gmap3=function(e){var o=[];return E=t.google.maps,this.each(function(){var t=n(this),r=t.data("gmap3");r||(r=new k(t,e),t.data("gmap3",r)),o.push(r)}),new T(this,o)}}(jQuery,window,document);
12 13 14 /** 15 * @name MarkerClusterer for Google Maps v3 16 * @version version 1.0 17 * @author Luke Mahe 18 * @fileoverview 19 * The library creates and manages per-zoom-level clusters for large amounts of 20 * markers. 21 * <br/> 22 * This is a v3 implementation of the 23 * <a href="http://gmaps-utility-library-dev.googlecode.com/svn/tags/markerclusterer/" 24 * >v2 MarkerClusterer</a>. 25 */ 26 27 function MarkerClusterer(t,e,r){this.extend(MarkerClusterer,google.maps.OverlayView),this.map_=t,this.markers_=[],this.clusters_=[],this.sizes=[53,56,66,78,90],this.styles_=[],this.ready_=!1;var s=r||{};this.gridSize_=s.gridSize||60,this.minClusterSize_=s.minimumClusterSize||2,this.maxZoom_=s.maxZoom||null,this.styles_=s.styles||[],this.imagePath_=s.imagePath||this.MARKER_CLUSTER_IMAGE_PATH_,this.imageExtension_=s.imageExtension||this.MARKER_CLUSTER_IMAGE_EXTENSION_,this.zoomOnClick_=!0,null!=s.zoomOnClick&&(this.zoomOnClick_=s.zoomOnClick),this.averageCenter_=!1,null!=s.averageCenter&&(this.averageCenter_=s.averageCenter),this.setupStyles_(),this.setMap(t),this.prevZoom_=this.map_.getZoom();var o=this;google.maps.event.addListener(this.map_,"zoom_changed",function(){var t=o.map_.getZoom();o.prevZoom_!=t&&(o.prevZoom_=t,o.resetViewport())}),google.maps.event.addListener(this.map_,"idle",function(){o.redraw()}),e&&e.length&&this.addMarkers(e,!1)}function Cluster(t){this.markerClusterer_=t,this.map_=t.getMap(),this.gridSize_=t.getGridSize(),this.minClusterSize_=t.getMinClusterSize(),this.averageCenter_=t.isAverageCenter(),this.center_=null,this.markers_=[],this.bounds_=null,this.clusterIcon_=new ClusterIcon(this,t.getStyles(),t.getGridSize())}function ClusterIcon(t,e,r){t.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView),this.styles_=e,this.padding_=r||0,this.cluster_=t,this.center_=null,this.map_=t.getMap(),this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(this.map_)}MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_="../images/m",MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_="png",MarkerClusterer.prototype.extend=function(t,e){return function(t){for(var e in t.prototype)this.prototype[e]=t.prototype[e];return this}.apply(t,[e])},MarkerClusterer.prototype.onAdd=function(){this.setReady_(!0)},MarkerClusterer.prototype.draw=function(){},MarkerClusterer.prototype.setupStyles_=function(){if(!this.styles_.length)for(var t,e=0;t=this.sizes[e];e++)this.styles_.push({url:this.imagePath_+(e+1)+"."+this.imageExtension_,height:t,width:t})},MarkerClusterer.prototype.fitMapToMarkers=function(){for(var t,e=this.getMarkers(),r=new google.maps.LatLngBounds,s=0;t=e[s];s++)r.extend(t.getPosition());this.map_.fitBounds(r)},MarkerClusterer.prototype.setStyles=function(t){this.styles_=t},MarkerClusterer.prototype.getStyles=function(){return this.styles_},MarkerClusterer.prototype.isZoomOnClick=function(){return this.zoomOnClick_},MarkerClusterer.prototype.isAverageCenter=function(){return this.averageCenter_},MarkerClusterer.prototype.getMarkers=function(){return this.markers_},MarkerClusterer.prototype.getTotalMarkers=function(){return this.markers_.length},MarkerClusterer.prototype.setMaxZoom=function(t){this.maxZoom_=t},MarkerClusterer.prototype.getMaxZoom=function(){return this.maxZoom_},MarkerClusterer.prototype.calculator_=function(t,e){for(var r=0,s=t.length,o=s;0!==o;)o=parseInt(o/10,10),r++;return{text:s,index:r=Math.min(r,e)}},MarkerClusterer.prototype.setCalculator=function(t){this.calculator_=t},MarkerClusterer.prototype.getCalculator=function(){return this.calculator_},MarkerClusterer.prototype.addMarkers=function(t,e){for(var r,s=0;r=t[s];s++)this.pushMarkerTo_(r);e||this.redraw()},MarkerClusterer.prototype.pushMarkerTo_=function(t){if(t.isAdded=!1,t.draggable){var e=this;google.maps.event.addListener(t,"dragend",function(){t.isAdded=!1,e.repaint()})}this.markers_.push(t)},MarkerClusterer.prototype.addMarker=function(t,e){this.pushMarkerTo_(t),e||this.redraw()},MarkerClusterer.prototype.removeMarker_=function(t){var e=-1;if(this.markers_.indexOf)e=this.markers_.indexOf(t);else for(var r,s=0;r=this.markers_[s];s++)if(r==t){e=s;break}return-1!=e&&(t.setMap(null),this.markers_.splice(e,1),!0)},MarkerClusterer.prototype.removeMarker=function(t,e){var r=this.removeMarker_(t);return!(e||!r)&&(this.resetViewport(),this.redraw(),!0)},MarkerClusterer.prototype.removeMarkers=function(t,e){for(var r,s=!1,o=0;r=t[o];o++){var i=this.removeMarker_(r);s=s||i}if(!e&&s)return this.resetViewport(),this.redraw(),!0},MarkerClusterer.prototype.setReady_=function(t){this.ready_||(this.ready_=t,this.createCluster
27s_())},MarkerClusterer.prototype.getTotalClusters=function(){return this.clusters_.length},MarkerClusterer.prototype.getMap=function(){return this.map_},MarkerClusterer.prototype.setMap=function(t){this.map_=t},MarkerClusterer.prototype.getGridSize=function(){return this.gridSize_},MarkerClusterer.prototype.setGridSize=function(t){this.gridSize_=t},MarkerClusterer.prototype.getMinClusterSize=function(){return this.minClusterSize_},MarkerClusterer.prototype.setMinClusterSize=function(t){this.minClusterSize_=t},MarkerClusterer.prototype.getExtendedBounds=function(t){var e=this.getProjection(),r=new google.maps.LatLng(t.getNorthEast().lat(),t.getNorthEast().lng()),s=new google.maps.LatLng(t.getSouthWest().lat(),t.getSouthWest().lng()),o=e.fromLatLngToDivPixel(r);o.x+=this.gridSize_,o.y-=this.gridSize_;var i=e.fromLatLngToDivPixel(s);i.x-=this.gridSize_,i.y+=this.gridSize_;var n=e.fromDivPixelToLatLng(o),a=e.fromDivPixelToLatLng(i);return t.extend(n),t.extend(a),t},MarkerClusterer.prototype.isMarkerInBounds_=function(t,e){return e.contains(t.getPosition())},MarkerClusterer.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers_=[]},MarkerClusterer.prototype.resetViewport=function(t){for(var e,r=0;
27e=this.clusters_[r];r++)e.remove();var s;for(r=0;s=this.markers_[r];r++)s.isAdded=!1,t&&s.setMap(null);this.clusters_=[]},MarkerClusterer.prototype.repaint=function(){var t=this.clusters_.slice();this.clusters_.length=0,this.resetViewport(),this.redraw(),window.setTimeout(function(){for(var e,r=0;e=t[r];r++)e.remove()},0)},MarkerClusterer.prototype.redraw=function(){this.createClusters_()},MarkerClusterer.prototype.distanceBetweenPoints_=function(t,e){if(!t||!e)return 0;var r=(e.lat()-t.lat())*Math.PI/180,s=(e.lng()-t.lng())*Math.PI/180,o=Math.sin(r/2)*Math.sin(r/2)+Math.cos(t.lat()*Math.PI/180)*Math.cos(e.lat()*Math.PI/180)*Math.sin(s/2)*Math.sin(s/2);return 6371*(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)))},MarkerClusterer.prototype.addToClosestCluster_=function(t){for(var e,r=4e4,s=null,o=(t.getPosition(),0);e=this.clusters_[o];o++){var i=e.getCenter();if(i){var n=this.distanceBetweenPoints_(i,t.getPosition());n<r&&(r=n,s=e)}}s&&s.isMarkerInClusterBounds(t)?s.addMarker(t):((e=new Cluster(this)).addMarker(t),this.clusters_.push(e))},MarkerClusterer.prototype.createClusters_=function(){if(this.ready_)for(var t,e=new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest
27(),this.map_.getBounds().getNorthEast()),r=this.getExtendedBounds(e),s=0;t=this.markers_[s];s++)!t.isAdded&&this.isMarkerInBounds_(t,r)&&this.addToClosestCluster_(t)},Cluster.prototype.isMarkerAlreadyAdded=function(t){if(this.markers_.indexOf)return-1!=this.markers_.indexOf(t);for(var e,r=0;e=this.markers_[r];r++)if(e==t)return!0;return!1},Cluster.prototype.addMarker=function(t){if(this.isMarkerAlreadyAdded(t))return!1;if(this.center_){if(this.averageCenter_){var e=this.markers_.length+1,r=(this.center_.lat()*(e-1)+t.getPosition().lat())/e,s=(this.center_.lng()*(e-1)+t.getPosition().lng())/e;this.center_=new google.maps.LatLng(r,s),this.calculateBounds_()}}else this.center_=t.getPosition(),this.calculateBounds_();t.isAdded=!0,this.markers_.push(t);var o=this.markers_.length;if(o<this.minClusterSize_&&t.getMap()!=this.map_&&t.setMap(this.map_),o==this.minClusterSize_)for(var i=0;i<o;i++)this.markers_[i].setMap(null);return o>=this.minClusterSize_&&t.setMap(null),this.updateIcon(),!0},Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_},Cluster.prototype.getBounds=function(){for(var t,e=new google.maps.LatLngBounds(this.center_,this.center_),r=this.getMarkers(),s=0;t=r[s];s++)e.extend(t.getPosition());return e},Cluster.prototype.remove=function(){this.clusterIcon_.remove(),this.markers_.length=0,delete this.markers_},Cluster.prototype.getSize=function(){return this.markers_.length},Cluster.prototype.getMarkers=function(){return this.markers_},Cluster.prototype.getCenter=function(){return this.center_},Cluster.prototype.calculateBounds_=function(){var t=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(t)},Cluster.prototype.isMarkerInClusterBounds=function(t){return this.bounds_.contains(t.getPosition())},Cluster.prototype.getMap=function(){return this.map_},Cluster.prototype.updateIcon=function(){var t=this.map_.getZoom(),e=this.markerClusterer_.getMaxZoom();if(e&&t>e)for(var r,s=0;r=this.markers_[s];s++)r.setMap(this.map_);else if(this.markers_.length<this.minClusterSize_)this.clusterIcon_.hide();else{var o=this.markerClusterer_.getStyles().length,i=this.markerClusterer_.getCalculator()(this.markers_,o);this.clusterIcon_.setCenter(this.center_),this.clusterIcon_.setSums(i),this.clusterIcon_.show()}},ClusterIcon.prototype.triggerClusterClick=function(t){var e=this.cluster_.getMarkerClusterer();google.maps.event.trigger(e,"clusterclick",this.cluster_,t),e.isZoomOnClick()&&this.map_.fitBounds(this.cluster_.getBounds())},ClusterIcon.prototype.onAdd=function(){if(this.div_=document.createElement("DIV"),this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(t),this.div_.innerHTML=this.sums_.text}this.getPanes().overlayMouseTarget.appendChild(this.div_);var e=this,r=!1;google.maps.event.addDomListener(this.div_,"click",function(t){r||e.triggerClusterClick(t)}),google.maps.event.addDomListener(this.div_,"mousedown",function(){r=!1}),google.maps.event.addDomListener(this.div_,"mousemove",function(){r=!0})},ClusterIcon.prototype.getPosFromLatLng_=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return"object"==typeof this.iconAnchor_&&2===this.iconAnchor_.length?(e.x-=this.iconAnchor_[0],e.y-=this.iconAnchor_[1]):(e.x-=parseInt(this.width_/2,10),e.y-=parseInt(this.height_/2,10)),e},ClusterIcon.prototype.draw=function(){if(this.visible_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.top=t.y+"px",this.div_.style.left=t.x+"px"}},ClusterIcon.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},ClusterIcon.prototype.show=function(){if(this.div_){var t=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(t),this.div_.style.display=""}this.visible_=!0},ClusterIcon.prototype.remove=function(){this.setMap(null)},ClusterIcon.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),this.div_.parentNode.removeChild(this.div_),this.div_=null)},ClusterIcon.prototype.setSums=function(t){this.sums_=t,this.text_=t.text,this.index_=t.index,this.div_&&(this.div_.innerHTML=t.text),this.useStyle()},ClusterIcon.prototype.useStyle=function(){var t=Math.max(0,this.sums_.index-1);t=Math.min(this.styles_.length-1,t);var e=this.styles_[t];this.url_=e.url,this.height_=e.height,this.width_=e.width,this.textColor_=e.textColor,this.anchor_=e.anchor,this.textSize_=e.textSize,this.backgroundPosition_=e.backgroundPosition,this.iconAnchor_=e.iconAnchor},ClusterIcon.prototype.setCenter=function(t){this.center_=t},ClusterIcon.prototype.createCss=function(t){var e=[];e.push("background-image:url("+this.url_+");");var r=this.backgroundPosition_?this.backgroundPosition_:"0 0";e.push("background-position:"+r+";"),"object"==typeof this.anchor_?("number"==typeof this.anchor_[0]&&this.anchor_[0]>0&&this.anchor_[0]<this.height_?e.push("height:"+(this.height_-this.anchor_[0])+"px; padding-top:"+this.anchor_[0]+"px;"):"number"==typeof this.anchor_[0]&&this.anchor_[0]<0&&-this.anchor_[0]<this.height_?e.push("height:"+this.height_+"px; line-height:"+(this.height_+this.anchor_[0])+"px;"):e.push("height:"+this.height_+"px; line-height:"+this.height_+"px;"),"number"==typeof this.anchor_[1]&&this.anchor_[1]>0&&this.anchor_[1]<this.width_?e.push("width:"+(this.width_-this.anchor_[1])+"px; padding-left:"+this.anchor_[1]+"px;"):e.push("width:"+this.width_+"px; text-align:center;")):e.push("height:"+this.height_+"px; line-height:"+this.height_+"px; width:"+this.width_+"px; text-align:center;");var s=this.textColor_?this.textColor_:"black",o=this.textSize_?this.textSize_:11;return e.push("cursor:pointer; top:"+t.y+"px; left:"+t.x+"px; color:"+s+"; position:absolute;
27 font-size:"+o+"px; font-family:Arial,sans-serif; font-weight:bold"),e.join("")},window.MarkerClusterer=MarkerClusterer,MarkerClusterer.prototype.addMarker=MarkerClusterer.prototype.addMarker,MarkerClusterer.prototype.addMarkers=MarkerClusterer.prototype.addMarkers,MarkerClusterer.prototype.clearMarkers=MarkerClusterer.prototype.clearMarkers,MarkerClusterer.prototype.fitMapToMarkers=MarkerClusterer.prototype.fitMapToMarkers,MarkerClusterer.prototype.getCalculator=MarkerClusterer.prototype.getCalculator,MarkerClusterer.prototype.getGridSize=MarkerClusterer.prototype.getGridSize,MarkerClusterer.prototype.getExtendedBounds=MarkerClusterer.prototype.getExtendedBounds,MarkerClusterer.prototype.getMap=MarkerClusterer.prototype.getMap,MarkerClusterer.prototype.getMarkers=MarkerClusterer.prototype.getMarkers,MarkerClusterer.prototype.getMaxZoom=MarkerClusterer.prototype.getMaxZoom,MarkerClusterer.prototype.getStyles=MarkerClusterer.prototype.getStyles,MarkerClusterer.prototype.getTotalClusters=MarkerClusterer.prototype.getTotalClusters,MarkerClusterer.prototype.getTotalMarkers=MarkerClusterer.prototype.getTotalMarkers,MarkerClusterer.prototype.redraw=MarkerClusterer.prototype.redraw,MarkerClusterer.prototype.removeMarker=MarkerClusterer.prototype.removeMarker,MarkerClusterer.prototype.removeMarkers=MarkerClusterer.prototype.removeMarkers,MarkerClusterer.prototype.resetViewport=MarkerClusterer.prototype.resetViewport,MarkerClusterer.prototype.repaint=MarkerClusterer.prototype.repaint,MarkerClusterer.prototype.setCalculator=MarkerClusterer.prototype.setCalculator,MarkerClusterer.prototype.setGridSize=MarkerClusterer.prototype.setGridSize,MarkerClusterer.prototype.setMaxZoom=MarkerClusterer.prototype.setMaxZoom,MarkerClusterer.prototype.onAdd=MarkerClusterer.prototype.onAdd,MarkerClusterer.prototype.draw=MarkerClusterer.prototype.draw,Cluster.prototype.getCenter=Cluster.prototype.getCenter,Cluster.prototype.getSize=Cluster.prototype.getSize,Cluster.prototype.getMarkers=Cluster.prototype.getMarkers,ClusterIcon.prototype.onAdd=ClusterIcon.prototype.onAdd,ClusterIcon.prototype.draw=ClusterIcon.prototype.draw,ClusterIcon.prototype.onRemove=ClusterIcon.prototype.onRemove; 28 29}); 30 31/** 32* Display Google Map 33*/ 34 35function eb_get_google_map( rand , attributes ){ 36 37 var ID = 'eb_map_' + rand; 38 var lat = attributes.latitude; 39 var lng = attributes.longitude; 40 var zoom = attributes.zoom; 41 var description = attributes.description; 42 var scrollWheelZoom = attributes.scrollWheelZoom; 43 var mapStyle = attributes.mapStyle; 44 var streetViewControl = attributes.streetViewControl; 45 var mapTypeControl = attributes.mapTypeControl; 46 var draggable = attributes.draggable; 47 var fullscreenControl = attributes.fullscreenControl; 48 var zoomControl = attributes.zoomControl; 49 var customMarker = attributes.marker; 50 var defaultMarker = attributes.defaultMarker; 51 var autoOpenInfoWindow = attributes.autoOpenInfoWindow; 52 var centerMarker = attributes.centerMarker; 53 var moreMarkers = ( attributes.moreMarkers == '' ? '' : JSON.parse( attributes.moreMarkers ) ); 54 55 // MarkerClusterer Settings 56 var markerClustererStatus = attributes.markerClustererStatus; 57 var maxZoom = attributes.maxZoom; 58 var minimumClusterSize = attributes.minimumClusterSize; 59 60 // Create Map 61 var mapoptions = { 62 zoom: parseInt( zoom ), 63 center: new google.maps.LatLng( lat,lng ), 64 scrollwheel: scrollWheelZoom, 65 styles: eb_google_map_styles( mapStyle ), 66 streetViewControl: streetViewControl, 67 mapTypeControl: mapTypeControl, 68 draggable: draggable, 69 fullscreenControl: fullscreenControl, 70 zoomControl: zoomControl 71 }; 72 73 setTimeout(function(){ 74 75 map = new google.maps.Map( document.getElementById( ID ), mapoptions ); 76 77 // For centering Map 78 var mapID = 'eb_map_' + rand; 79 window.mapID = map; 80 81 var locations = []; 82 locations[0] = [ description , lat , lng , customMarker , defaultMarker ]; 83 84 if( Array.isArray( moreMarkers ) ){ 85 86 jQuery.each( moreMarkers, function( key, value ) { 87 var index = key + 1; 88 locations[index] = [ 89 value[0].description, 90 value[0].lat, 91 value[0].lng, 92 value[0].marker, 93 value[0].default_marker 94 ]; 95 }); 96 97 } 98 99 var mapMarkers = 'eb_marker_' + rand; 100 window.mapMarkers = []; 101 var infowindow = new google.maps.InfoWindow(); 102 for (i = 0; i < locations.length; i++) { 103 104 // Create Marker 105 var myLatLng = new google.maps.LatLng( locations[i][1], locations[i][2] ); 106 var marker = new google.maps.Marker({ 107 position: myLatLng, 108 map: map, 109 animation: google.maps.Animation.DROP, 110 icon: ( locations[i][4] ? '' : locations[i][3] ) 111 }); 112 113 if( locations[i][0] != '' ){ 114 115 // Info Window 116 infowindow = new google.maps.InfoWindow({ 117 content: locations[i][0] 118 }); 119 120 google.maps.event.addListener(marker, 'click', (function(marker, i) { 121 return function() { 122 infowindow.setContent(locations[i][0]); 123 infowindow.open(map, marker); 124 125 // Auto center map on marker click 126 if( centerMarker ){ 127 map.panTo(marker.getPosition()); 128 } 129 } 130 })(marker, i)); 131 132 if( autoOpenInfoWindow ){ 133 infowindow.open(map,marker); 134 } 135 136 } 137 138 window.mapMarkers[i] = marker; 139 140 } 141 142 // For Marker Cluster 143 if( markerClustererStatus == true ){ 144 var options = { 145 imagePath: mb_backend_object.ELEGANTBLOCKS_PLUGIN_URL + '/src/images/cluster/m', 146 maxZoom: maxZoom, 147 minimumClusterSize: minimumClusterSize 148 }; 149 var markerCluster = new MarkerClusterer( map, window.mapMarkers, options ); 150 } 151 152 }, 1000 ); 153 154} 155 156jQuery(document).on( 157 'click', 158 '.more_lat,.more_lng,.place_description_marker,.first_latitude input,.first_longitude input,.first_lat_lng_description textarea', 159 function(){ 160 161 if( jQuery(this).hasClass( 'components-text-control__input' ) || jQuery(this).hasClass( 'components-textarea-control__input' ) ){ 162 var lat = jQuery(this).closest('.components-panel').find('.first_latitude input').val().trim(); 163 var lng = jQuery(this).closest('.components-panel').find('.first_longitude input').val().trim(); 164 } else { 165 var lat = jQuery(this).closest('.hidden').find('.more_lat').val().trim(); 166 var lng = jQuery(this).closest('.hidden').find('.more_lng').val().trim(); 167 } 168 169 for ( var i = 0; i < window.mapMarkers.length; i++ ) { 170 var markerLat = window.mapMarkers[i].position.lat(); 171 var markerLng = window.mapMarkers[i].position.lng(); 172 173 if( Number(Number(lat).toFixed(6)) === Number(Number(markerLat).toFixed(6)) && 174 Number(Number(lng).toFixed(6)) === Number(Number(markerLng).toFixed(6)) && 175 lat != '' && 176 lng != '' ){ 177 //console.log( 'm in' ); 178 window.mapID.panTo( window.mapMarkers[i].getPosition() ); 179 window.mapMarkers[i].setMap( null ); 180 window.mapMarkers[i].setAnimation(google.maps.Animation.DROP); 181 window.mapMarkers[i].setMap( window.mapID ); 182 } 183 } 184 185}); 186 187function eb_google_map_styles( mapStyle ){ 188 189 switch( mapStyle ){ 190 191 case '2': 192 return eb_google_map_style_2(); 193 break; 194 case '3': 195 return eb_google_map_style_3(); 196 break; 197 case '4': 198 return eb_google_map_style_4(); 199 break; 200 case '5': 201 return eb_google_map_style_5(); 202 break; 203 case '6': 204 return eb_google_map_style_6(); 205 break; 206 case '7': 207 return eb_google_map_style_7(); 208 break; 209 case '8': 210 return eb_google_map_style_8(); 211 break; 212 case '9': 213 return eb_google_map_style_9(); 214 break; 215 case '10': 216 return eb_google_map_style_10(); 217 break; 218 case '11': 219 return eb_google_map_style_11(); 220 break; 221 case '12': 222 return eb_google_map_style_12(); 223 break; 224 case '13': 225 return eb_google_map_style_13(); 226 break; 227 default: 228 return ''; 229 break; 230 231 } 232 233} 234 235function eb_google_map_style_13(){ 236 237 return [ 238 { 239 "featureType": "water", 240 "elementType": "geometry", 241 "stylers": [ 242 { 243 "visibility": "on" 244 }, 245 { 246 "color": "#aee2e0" 247 } 248 ] 249 }, 250 { 251 "featureType": "landscape", 252 "elementType": "geometry.fill", 253 "stylers": [ 254 { 255 "color": "#abce83" 256 } 257 ] 258 }, 259 { 260 "featureType": "poi", 261 "elementType": "geometry.fill", 262 "stylers": [ 263 { 264 "color": "#769E72" 265 } 266 ] 267 }, 268 { 269 "featureType": "poi", 270 "elementType": "labels.text.fill", 271 "stylers": [ 272 { 273 "color": "#7B8758" 274 } 275 ] 276 }, 277 { 278 "featureType": "poi", 279 "elementType": "labels.text.stroke", 280 "stylers": [ 281 { 282 "color": "#EBF4A4" 283 } 284 ] 285 }, 286 { 287 "featureType": "poi.park", 288 "elementType": "geometry", 289 "stylers": [ 290 { 291 "visibility": "simplified" 292 }, 293 { 294 "color": "#8dab68" 295 } 296 ] 297 }, 298 { 299 "featureType": "road", 300 "elementType": "geometry.fill", 301 "stylers": [ 302 { 303 "visibility": "simplified" 304 } 305 ] 306 }, 307 { 308 "featureType": "road", 309 "elementType": "labels.text.fill", 310 "stylers": [ 311 { 312 "color": "#5B5B3F" 313 } 314 ] 315 }, 316 { 317 "featureType": "road", 318 "elementType": "labels.text.stroke", 319 "stylers": [ 320 { 321 "color": "#ABCE83" 322 } 323 ] 324 }, 325 { 326 "featureType": "road", 327 "elementType": "labels.icon", 328 "stylers": [ 329 { 330 "visibility": "off" 331 } 332 ] 333 }, 334 { 335 "featureType": "road.local", 336 "elementType": "geometry", 337 "stylers": [ 338 { 339 "color": "#A4C67D" 340 } 341 ] 342 }, 343 { 344 "featureType": "road.arterial", 345 "elementType": "geometry", 346 "stylers": [ 347 { 348 "color": "#9BBF72" 349 } 350 ] 351 }, 352 { 353 "featureType": "road.highway", 354 "elementType": "geometry", 355 "stylers": [ 356 { 357 "color": "#EBF4A4" 358 } 359 ] 360 }, 361 { 362 "featureType": "transit", 363 "stylers": [ 364 { 365 "visibility": "off" 366 } 367 ] 368 }, 369 { 370 "featureType": "administrative", 371 "elementType": "geometry.stroke", 372 "stylers": [ 373 { 374 "visibility": "on" 375 }, 376 { 377 "color": "#87ae79" 378 } 379 ] 380 }, 381 { 382 "featureType": "administrative", 383 "elementType": "geometry.fill", 384 "stylers": [ 385 { 386 "color": "#7f2200" 387 }, 388 { 389 "visibility": "off" 390 } 391 ] 392 }, 393 { 394 "featureType": "administrative", 395 "elementType": "labels.text.stroke", 396 "stylers": [ 397 { 398 "color": "#ffffff" 399 }, 400 { 401 "visibility": "on" 402 }, 403 { 404 "weight": 4.1 405 } 406 ] 407 }, 408 { 409 "featureType": "administrative", 410 "elementType": "labels.text.fill", 411 "stylers": [ 412 { 413 "color": "#495421" 414 } 415 ] 416 }, 417 { 418 "featureType": "administrative.neighborhood", 419 "elementType": "labels", 420 "stylers": [ 421 { 422 "visibility": "off" 423 } 424 ] 425 } 426 ]; 427 428} 429 430function eb_google_map_style_12(){ 431 return [ 432 { 433 "featureType": "all", 434 "elementType": "all", 435 "stylers": [ 436 { 437 "saturation": -100 438 }, 439 { 440 "gamma": 0.5 441 } 442 ] 443 } 444 ] 445} 446 447function eb_google_map_style_11(){ 448 449 return [ 450 { 451 "featureType": "water", 452 "elementType": "geometry", 453 "stylers": [ 454 { 455 "color": "#193341" 456 } 457 ] 458 }, 459 { 460 "featureType": "landscape", 461 "elementType": "geometry", 462 "stylers": [ 463 { 464 "color": "#2c5a71" 465 } 466 ] 467 }, 468 { 469 "featureType": "road", 470 "elementType": "geometry", 471 "stylers": [ 472 { 473 "color": "#29768a" 474 }, 475 { 476 "lightness": -37 477 } 478 ] 479 }, 480 { 481 "featureType": "poi", 482 "elementType": "geometry", 483 "stylers": [ 484 { 485 "color": "#406d80" 486 } 487 ] 488 }, 489 { 490 "featureType": "transit", 491 "elementType": "geometry", 492 "stylers": [ 493 { 494 "color": "#406d80" 495 } 496 ] 497 }, 498 { 499 "elementType": "labels.text.stroke", 500 "stylers": [ 501 { 502 "visibility": "on" 503 }, 504 { 505 "color": "#3e606f" 506 }, 507 { 508 "weight": 2 509 }, 510 { 511 "gamma": 0.84 512 } 513 ] 514 }, 515 { 516 "elementType": "labels.text.fill", 517 "stylers": [ 518 { 519 "color": "#ffffff" 520 } 521 ] 522 }, 523 { 524 "featureType": "administrative", 525 "elementType": "geometry", 526 "stylers": [ 527 { 528 "weight": 0.6 529 }, 530 { 531 "color": "#1a3541" 532 } 533 ] 534 }, 535 { 536 "elementType": "labels.icon", 537 "stylers": [ 538 { 539 "visibility": "off" 540 } 541 ] 542 }, 543 { 544 "featureType": "poi.park", 545 "elementType": "geometry", 546 "stylers": [ 547 { 548 "color": "#2c5a71" 549 } 550 ] 551 } 552 ]; 553 554} 555 556function eb_google_map_style_10(){ 557 558 return [ 559 { 560 "featureType": "landscape", 561 "elementType": "labels", 562 "stylers": [ 563 { 564 "visibility": "off" 565 } 566 ] 567 }, 568 { 569 "featureType": "transit", 570 "elementType": "labels", 571 "stylers": [ 572 { 573 "visibility": "off" 574 } 575 ] 576 }, 577 { 578 "featureType": "poi", 579 "elementType": "labels", 580 "stylers": [ 581 { 582 "visibility": "off" 583 } 584 ] 585 }, 586 { 587 "featureType": "water", 588 "elementType": "labels", 589 "stylers": [ 590 { 591 "visibility": "off" 592 } 593 ] 594 }, 595 { 596 "featureType": "road", 597 "elementType": "labels.icon", 598 "stylers": [ 599 { 600 "visibility": "off" 601 } 602 ] 603 }, 604 { 605 "stylers": [ 606 { 607 "hue": "#00aaff" 608 }, 609 { 610 "saturation": -100 611 }, 612 { 613 "gamma": 2.15 614 }, 615 { 616 "lightness": 12 617 } 618 ] 619 }, 620 { 621 "featureType": "road", 622 "elementType": "labels.text.fill", 623 "stylers": [ 624 { 625 "visibility": "on" 626 }, 627 { 628 "lightness": 24 629 } 630 ] 631 }, 632 { 633 "featureType": "road", 634 "elementType": "geometry", 635 "stylers": [ 636 { 637 "lightness": 57 638 } 639 ] 640 } 641 ]; 642 643} 644 645function eb_google_map_style_9(){ 646 647 return [ 648 { 649 "featureType": "all", 650 "elementType": "labels.text.fill", 651 "stylers": [ 652 { 653 "color": "#ffffff" 654 } 655 ] 656 }, 657 { 658 "featureType": "all", 659 "elementType": "labels.t
659ext.stroke", 660 "stylers": [ 661 { 662 "color": "#000000" 663 }, 664 { 665 "lightness": 13 666 } 667 ] 668 }, 669 { 670 "featureType": "administrative", 671 "elementType": "geometry.fill", 672 "stylers": [ 673 { 674 "color": "#000000" 675 } 676 ] 677 }, 678 { 679 "featureType": "administrative", 680 "elementType": "geometry.stroke", 681 "stylers": [ 682 { 683 "color": "#144b53" 684 }, 685 { 686 "lightness": 14 687 }, 688 { 689 "weight": 1.4 690 } 691 ] 692 }, 693 { 694 "featureType": "landscape", 695 "elementType": "all", 696 "stylers": [ 697 { 698 "color": "#08304b" 699 } 700 ] 701 }, 702 { 703 "featureType": "poi", 704 "elementType": "geometry", 705 "stylers": [ 706 { 707 "color": "#0c4152" 708 }, 709 { 710 "lightness": 5 711 } 712 ] 713 }, 714 { 715 "featureType": "road.highway", 716 "elementType": "geometry.fill", 717 "stylers": [ 718 { 719 "color": "#000000" 720 } 721 ] 722 }, 723 { 724 "featureType": "road.highway", 725 "elementType": "geometry.stroke", 726 "stylers": [ 727 { 728 "color": "#0b434f" 729 }, 730 { 731 "lightness": 25 732 } 733 ] 734 }, 735 { 736 "featureType": "road.arterial", 737 "elementType": "geometry.fill", 738 "stylers": [ 739 { 740 "color": "#000000" 741 } 742 ] 743 }, 744 { 745 "featureType": "road.arterial", 746 "elementType": "geometry.stroke", 747 "stylers": [ 748 { 749 "color": "#0b3d51" 750 }, 751 { 752 "lightness": 16 753 } 754 ] 755 }, 756 { 757 "featureType": "road.local", 758 "elementType": "geometry", 759 "stylers": [ 760 { 761 "color": "#000000" 762 } 763 ] 764 }, 765 { 766 "featureType": "transit", 767 "elementType": "all", 768 "stylers": [ 769 { 770 "color": "#146474" 771 } 772 ] 773 }, 774 { 775 "featureType": "water", 776 "elementType": "all", 777 "stylers": [ 778 { 779 "color": "#021019" 780 } 781 ] 782 } 783 ]; 784 785} 786 787function eb_google_map_style_8(){ 788 789 return [ 790 { 791 "featureType": "administrative", 792 "elementType": "all", 793 "stylers": [ 794 { 795 "visibility": "on" 796 }, 797 { 798 "lightness": 33 799 } 800 ] 801 }, 802 { 803 "featureType": "landscape", 804 "elementType": "all", 805 "stylers": [ 806 { 807 "color": "#f2e5d4" 808 } 809 ] 810 }, 811 { 812 "featureType": "poi.park", 813 "elementType": "geometry", 814 "stylers": [ 815 { 816 "color": "#c5dac6" 817 } 818 ] 819 }, 820 { 821 "featureType": "poi.park", 822 "elementType": "labels", 823 "stylers": [ 824 { 825 "visibility": "on" 826 }, 827 { 828 "lightness": 20 829 } 830 ] 831 }, 832 { 833 "featureType": "road", 834 "elementType": "all", 835 "stylers": [ 836 { 837 "lightness": 20 838 } 839 ] 840 }, 841 { 842 "featureType": "road.highway", 843 "elementType": "geometry", 844 "stylers": [ 845 { 846 "color": "#c5c6c6" 847 } 848 ] 849 }, 850 { 851 "featureType": "road.arterial", 852 "elementType": "geometry", 853 "stylers": [ 854 { 855 "color": "#e4d7c6" 856 } 857 ] 858 }, 859 { 860 "featureType": "road.local", 861 "elementType": "geometry", 862 "stylers": [ 863 { 864 "color": "#fbfaf7" 865 } 866 ] 867 }, 868 { 869 "featureType": "water", 870 "elementType": "all", 871 "stylers": [ 872 { 873 "visibility": "on" 874 }, 875 { 876 "color": "#acbcc9" 877 } 878 ] 879 } 880 ]; 881 882} 883 884function eb_google_map_style_7(){ 885 886 return [ 887 { 888 "featureType": "administrative", 889 "elementType": "all", 890 "stylers": [ 891 { 892 "visibility": "off" 893 } 894 ] 895 }, 896 { 897 "featureType": "landscape", 898 "elementType": "all", 899 "stylers": [ 900 { 901 "visibility": "simplified" 902 }, 903 { 904 "hue": "#0066ff" 905 }, 906 { 907 "saturation": 74 908 }, 909 { 910 "lightness": 100 911 } 912 ] 913 }, 914 { 915 "featureType": "poi", 916 "elementType": "all", 917 "stylers": [ 918 { 919 "visibility": "simplified" 920 } 921 ] 922 }, 923 { 924 "featureType": "road", 925 "elementType": "all", 926 "stylers": [ 927 { 928 "visibility": "simplified" 929 } 930 ] 931 }, 932 { 933 "featureType": "road.highway", 934 "elementType": "all", 935 "stylers": [ 936 { 937 "visibility": "off" 938 }, 939 { 940 "weight": 0.6 941 }, 942 { 943 "saturation": -85 944 }, 945 { 946 "lightness": 61 947 } 948 ] 949 }, 950 { 951 "featureType": "road.highway", 952 "elementType": "geometry", 953 "stylers": [ 954 { 955 "visibility": "on" 956 } 957 ] 958 }, 959 { 960 "featureType": "road.arterial", 961 "elementType": "all", 962 "stylers": [ 963 { 964 "visibility": "off" 965 } 966 ] 967 }, 968 { 969 "featureType": "road.local", 970 "elementType": "all", 971 "stylers": [ 972 { 973 "visibility": "on" 974 } 975 ] 976 }, 977 { 978 "featureType": "transit", 979 "elementType": "all", 980 "stylers": [ 981 { 982 "visibility": "simplified" 983 } 984 ] 985 }, 986 { 987 "featureType": "water", 988 "elementType": "all", 989 "stylers": [ 990 { 991 "visibility": "simplified" 992 }, 993 { 994 "color": "#5f94ff" 995 }, 996 { 997 "lightness": 26 998 }, 999 { 1000 "gamma": 5.86 1001 } 1002 ] 1003 } 1004 ]; 1005 1006} 1007 1008function eb_google_map_style_6(){ 1009 1010 return [ 1011 { 1012 "featureType": "landscape", 1013 "stylers": [ 1014 { 1015 "hue": "#FFBB00" 1016 }, 1017 { 1018 "saturation": 43.400000000000006 1019 }, 1020 { 1021 "lightness": 37.599999999999994 1022 }, 1023 { 1024 "gamma": 1 1025 } 1026 ] 1027 }, 1028 { 1029 "featureType": "road.highway", 1030 "stylers": [ 1031 { 1032 "hue": "#FFC200" 1033 }, 1034 { 1035 "saturation": -61.8 1036 }, 1037 { 1038 "lightness": 45.599999999999994 1039 }, 1040 { 1041 "gamma": 1 1042 } 1043 ] 1044 }, 1045 { 1046 "featureType": "road.arterial", 1047 "stylers": [ 1048 { 1049 "hue": "#FF0300" 1050 }, 1051 { 1052 "saturation": -100 1053 }, 1054 { 1055 "lightness": 51.19999999999999 1056 }, 1057 { 1058 "gamma": 1 1059 } 1060 ] 1061 }, 1062 { 1063 "featureType": "road.local", 1064 "stylers": [ 1065 { 1066 "hue": "#FF0300" 1067 }, 1068 { 1069 "saturation": -100 1070 }, 1071 { 1072 "lightness": 52 1073 }, 1074 { 1075 "gamma": 1 1076 } 1077 ] 1078 }, 1079 { 1080 "featureType": "water", 1081 "stylers": [ 1082 { 1083 "hue": "#0078FF" 1084 }, 1085 { 1086 "saturation": -13.200000000000003 1087 }, 1088 { 1089 "lightness": 2.4000000000000057 1090 }, 1091 { 1092 "gamma": 1 1093 } 1094 ] 1095 }, 1096 { 1097 "featureType": "poi", 1098 "stylers": [ 1099 { 1100 "hue": "#00FF6A" 1101 }, 1102 { 1103 "saturation": -1.0989010989011234 1104 }, 1105 { 1106 "lightness": 11.200000000000017 1107 }, 1108 { 1109 "gamma": 1 1110 } 1111 ] 1112 } 1113 ]; 1114 1115} 1116 1117function eb_google_map_style_5(){ 1118 1119 return [ 1120 { 1121 "featureType": "all", 1122 "elementType": "all", 1123 "stylers": [ 1124 { 1125 "color": "#ff7000" 1126 }, 1127 { 1128 "lightness": "69" 1129 }, 1130 { 1131 "saturation": "100" 1132 }, 1133 { 1134 "weight": "1.17" 1135 }, 1136 { 1137 "gamma": "2.04" 1138 } 1139 ] 1140 }, 1141 { 1142 "featureType": "all", 1143 "elementType": "geometry", 1144 "stylers": [ 1145 { 1146 "color": "#cb8536" 1147 } 1148 ] 1149 }, 1150 { 1151 "featureType": "all", 1152 "elementType": "labels", 1153 "stylers": [ 1154 { 1155 "color": "#ffb471" 1156 }, 1157 { 1158 "lightness": "66" 1159 }, 1160 { 1161 "saturation": "100" 1162 } 1163 ] 1164 }, 1165 { 1166 "featureType": "all", 1167 "elementType": "labels.text.fill", 1168 "stylers": [ 1169 { 1170 "gamma": 0.01 1171 }, 1172 { 1173 "lightness": 20 1174 } 1175 ] 1176 }, 1177 { 1178 "featureType": "all", 1179 "elementType": "labels.text.stroke", 1180 "stylers": [ 1181 { 1182 "saturation": -31 1183 }, 1184 { 1185 "lightness": -33 1186 }, 1187 { 1188 "weight": 2 1189 }, 1190 { 1191 "gamma": 0.8 1192 } 1193 ] 1194 }, 1195 { 1196 "featureType": "all", 1197 "elementType": "labels.icon", 1198 "stylers": [ 1199 { 1200 "visibility": "off" 1201 } 1202 ] 1203 }, 1204 { 1205 "featureType": "landscape", 1206 "elementType": "all", 1207 "stylers": [ 1208 { 1209 "lightness": "-8" 1210 }, 1211 { 1212 "gamma": "0.98" 1213 }, 1214 { 1215 "weight": "2.45" 1216 }, 1217 { 1218 "saturation": "26" 1219 } 1220 ] 1221 }, 1222 { 1223 "featureType": "landscape", 1224 "elementType": "geometry", 1225 "stylers": [ 1226 { 1227 "lightness": 30 1228 }, 1229 { 1230 "saturation": 30 1231 } 1232 ] 1233 }, 1234 { 1235 "featureType": "poi", 1236 "elementType": "geometry", 1237 "stylers": [ 1238 { 1239 "saturation": 20 1240 } 1241 ] 1242 }, 1243 { 1244 "featureType": "poi.park", 1245 "elementType": "geometry", 1246 "stylers": [ 1247 { 1248 "lightness": 20 1249 }, 1250 { 1251 "saturation": -20 1252 } 1253 ] 1254 }, 1255 { 1256 "featureType": "road", 1257 "elementType": "geometry", 1258 "stylers": [ 1259 { 1260 "lightness": 10 1261 }, 1262 { 1263 "saturation": -30 1264 } 1265 ] 1266 }, 1267 { 1268 "featureType": "road", 1269 "elementType": "geometry.stroke", 1270 "stylers": [ 1271 { 1272 "saturation": 25 1273 }, 1274 { 1275 "lightness": 25 1276 } 1277 ] 1278 }, 1279 { 1280 "featureType": "water", 1281 "elementType": "all", 1282 "stylers": [ 1283 { 1284 "lightness": -20 1285 }, 1286 { 1287 "color": "#ecc080" 1288 } 1289 ] 1290 } 1291 ]; 1292 1293} 1294 1295function eb_google_map_style_4(){ 1296 1297 return [ 1298 { 1299 "featureType": "all", 1300 "elementType": "labels.text.fill", 1301 "stylers": [ 1302 { 1303 "saturation": 36 1304 }, 1305 { 1306 "color": "#000000" 1307 }, 1308 { 1309 "lightness": 40 1310 } 1311 ] 1312 }, 1313 { 1314 "featureType": "all", 1315 "elementType": "labels.text.stroke", 1316 "stylers": [ 1317 { 1318 "visibility": "on" 1319 }, 1320 { 1321 "color": "#000000" 1322 }, 1323 { 1324 "lightness": 16 1325 } 1326 ] 1327 }, 1328 { 1329 "featureType": "all", 1330 "elementType": "labels.icon", 1331 "stylers": [ 1332 { 1333 "visibility": "off" 1334 } 1335 ] 1336 }, 1337 { 1338 "featureType": "administrative", 1339 "elementType": "geometry.fill", 1340 "stylers": [ 1341 { 1342 "color": "#000000" 1343 }, 1344 { 1345 "lightness": 20 1346 } 1347 ] 1348 }, 1349 { 1350 "featureType": "administrative", 1351 "elementType": "geometry.stroke", 1352 "stylers": [ 1353 { 1354 "color": "#000000" 1355 }, 1356 { 1357 "lightness": 17 1358 }, 1359 { 1360 "weight": 1.2 1361 } 1362 ] 1363 }, 1364 { 1365 "featureType": "landscape", 1366 "elementType": "geometry", 1367 "stylers": [ 1368 { 1369 "color": "#000000" 1370 }, 1371 { 1372 "lightness": 20 1373 } 1374 ] 1375 }, 1376 { 1377 "featureType": "poi", 1378 "elementType": "geometry", 1379 "stylers": [ 1380 { 1381 "color": "#000000" 1382 }, 1383 { 1384 "lightness": 21 1385 } 1386 ] 1387 }, 1388 { 1389 "featureType": "road.highway", 1390 "elementType": "geometry.fill", 1391 "stylers": [ 1392 { 1393 "color": "#000000" 1394 }, 1395 { 1396 "lightness": 17 1397 } 1398 ] 1399 }, 1400 { 1401 "featureType": "road.highway", 1402 "elementType": "geometry.stroke", 1403 "stylers": [ 1404 { 1405 "color": "#000000" 1406 }, 1407 { 1408 "lightness": 29 1409 }, 1410 { 1411 "weight": 0.2 1412 } 1413 ] 1414 }, 1415 { 1416 "featureType": "road.arterial", 1417 "elementType": "geometry", 1418 "stylers": [ 1419 { 1420 "color": "#000000" 1421 }, 1422 { 1423 "lightness": 18 1424 } 1425 ] 1426 }, 1427 { 1428 "featureType": "road.local", 1429 "elementType": "geometry", 1430 "stylers": [ 1431 { 1432 "color": "#000000" 1433 }, 1434 { 1435 "lightness": 16 1436 } 1437 ] 1438 }, 1439 { 1440 "featureType": "transit", 1441 "elementType": "geometry", 1442 "stylers": [ 1443 { 1444 "color": "#000000" 1445 }, 1446 { 1447 "lightness": 19 1448 } 1449 ] 1450 }, 1451 { 1452 "featureType": "water", 1453 "elementType": "geometry", 1454 "stylers": [ 1455 { 1456 "color": "#000000" 1457 }, 1458 { 1459 "lightness": 17 1460 } 1461 ] 1462 } 1463 ]; 1464 1465} 1466 1467function eb_google_map_style_3(){ 1468 1469 retu
1469rn [ 1470 { 1471 "featureType": "administrative", 1472 "elementType": "all", 1473 "stylers": [ 1474 { 1475 "saturation": "-100" 1476 } 1477 ] 1478 }, 1479 { 1480 "featureType": "administrative.province", 1481 "elementType": "all", 1482 "stylers": [ 1483 { 1484 "visibility": "off" 1485 } 1486 ] 1487 }, 1488 { 1489 "featureType": "landscape", 1490 "elementType": "all", 1491 "stylers": [ 1492 { 1493 "saturation": -100 1494 }, 1495 { 1496 "lightness": 65 1497 }, 1498 { 1499 "visibility": "on" 1500 } 1501 ] 1502 }, 1503 { 1504 "featureType": "poi", 1505 "elementType": "all", 1506 "stylers": [ 1507 { 1508 "saturation": -100 1509 }, 1510 { 1511 "lightness": "50" 1512 }, 1513 { 1514 "visibility": "simplified" 1515 } 1516 ] 1517 }, 1518 { 1519 "featureType": "road", 1520 "elementType": "all", 1521 "stylers": [ 1522 { 1523 "saturation": "-100" 1524 } 1525 ] 1526 }, 1527 { 1528 "featureType": "road.highway", 1529 "elementType": "all", 1530 "stylers": [ 1531 { 1532 "visibility": "simplified" 1533 } 1534 ] 1535 }, 1536 { 1537 "featureType": "road.arterial", 1538 "elementType": "all", 1539 "stylers": [ 1540 { 1541 "lightness": "30" 1542 } 1543 ] 1544 }, 1545 { 1546 "featureType": "road.local", 1547 "elementType": "all", 1548 "stylers": [ 1549 { 1550 "lightness": "40" 1551 } 1552 ] 1553 }, 1554 { 1555 "featureType": "transit", 1556 "elementType": "all", 1557 "stylers": [ 1558 { 1559 "saturation": -100 1560 }, 1561 { 1562 "visibility": "simplified" 1563 } 1564 ] 1565 }, 1566 { 1567 "featureType": "water", 1568 "elementType": "geometry", 1569 "stylers": [ 1570 { 1571 "hue": "#ffff00" 1572 }, 1573 { 1574 "lightness": -25 1575 }, 1576 { 1577 "saturation": -97 1578 } 1579 ] 1580 }, 1581 { 1582 "featureType": "water", 1583 "elementType": "labels", 1584 "stylers": [ 1585 { 1586 "lightness": -25 1587 }, 1588 { 1589 "saturation": -100 1590 } 1591 ] 1592 } 1593 ]; 1594 1595} 1596 1597function eb_google_map_style_2(){ 1598 1599 return [ 1600 { 1601 "featureType": "water", 1602 "elementType": "geometry", 1603 "stylers": [ 1604 { 1605 "color": "#e9e9e9" 1606 }, 1607 { 1608 "lightness": 17 1609 } 1610 ] 1611 }, 1612 { 1613 "featureType": "landscape", 1614 "elementType": "geometry", 1615 "stylers": [ 1616 { 1617 "color": "#f5f5f5" 1618 }, 1619 { 1620 "lightness": 20 1621 } 1622 ] 1623 }, 1624 { 1625 "featureType": "road.highway", 1626 "elementType": "geometry.fill", 1627 "stylers": [ 1628 { 1629 "color": "#ffffff" 1630 }, 1631 { 1632 "lightness": 17 1633 } 1634 ] 1635 }, 1636 { 1637 "featureType": "road.highway", 1638 "elementType": "geometry.stroke", 1639 "stylers": [ 1640 { 1641 "color": "#ffffff" 1642 }, 1643 { 1644 "lightness": 29 1645 }, 1646 { 1647 "weight": 0.2 1648 } 1649 ] 1650 }, 1651 { 1652 "featureType": "road.arterial", 1653 "elementType": "geometry", 1654 "stylers": [ 1655 { 1656 "color": "#ffffff" 1657 }, 1658 { 1659 "lightness": 18 1660 } 1661 ] 1662 }, 1663 { 1664 "featureType": "road.local", 1665 "elementType": "geometry", 1666 "stylers": [ 1667 { 1668 "color": "#ffffff" 1669 }, 1670 { 1671 "lightness": 16 1672 } 1673 ] 1674 }, 1675 { 1676 "featureType": "poi", 1677 "elementType": "geometry", 1678 "stylers": [ 1679 { 1680 "color": "#f5f5f5" 1681 }, 1682 { 1683 "lightness": 21 1684 } 1685 ] 1686 }, 1687 { 1688 "featureType": "poi.park", 1689 "elementType": "geometry", 1690 "stylers": [ 1691 { 1692 "color": "#dedede" 1693 }, 1694 { 1695 "lightness": 21 1696 } 1697 ] 1698 }, 1699 { 1700 "elementType": "labels.text.stroke", 1701 "stylers": [ 1702 { 1703 "visibility": "on" 1704 }, 1705 { 1706 "color": "#ffffff" 1707 }, 1708 { 1709 "lightness": 16 1710 } 1711 ] 1712 }, 1713 { 1714 "elementType": "labels.text.fill", 1715 "stylers": [ 1716 { 1717 "saturation": 36 1718 }, 1719 { 1720 "color": "#333333" 1721 }, 1722 { 1723 "lightness": 40 1724 } 1725 ] 1726 }, 1727 { 1728 "elementType": "labels.icon", 1729 "stylers": [ 1730 { 1731 "visibility": "off" 1732 } 1733 ] 1734 }, 1735 { 1736 "featureType": "transit", 1737 "elementType": "geometry", 1738 "stylers": [ 1739 { 1740 "color": "#f2f2f2" 1741 }, 1742 { 1743 "lightness": 19 1744 } 1745 ] 1746 }, 1747 { 1748 "featureType": "administrative", 1749 "elementType": "geometry.fill", 1750 "stylers": [ 1751 { 1752 "color": "#fefefe" 1753 }, 1754 { 1755 "lightness": 20 1756 } 1757 ] 1758 }, 1759 { 1760 "featureType": "administrative", 1761 "elementType": "geometry.stroke", 1762 "stylers": [ 1763 { 1764 "color": "#fefefe" 1765 }, 1766 { 1767 "lightness": 17 1768 }, 1769 { 1770 "weight": 1.2 1771 } 1772 ] 1773 } 1774 ]; 1775 1776}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.