1function stripslashes(str) { 2 return (str + '') 3 .replace(/\\(.?)/g, function(s, n1) { 4 switch (n1) { 5 case '\\': 6 return '\\'; 7 case '0': 8 return '\u0000'; 9 case '': 10 return ''; 11 default: 12 return n1; 13 } 14 }); 15} 16 17 18(function($){ 19 "use strict"; 20 21 22 23 /* Googl Maps Richmarker 24 =================================================================*/ 25 26 if(typeof($.fn.createRichMarker) !== "function" && google.maps != undefined && 'undefined' !== typeof(google.maps) ) { 27 $.fn.createRichMarker = function(){ 28 (function(){var b=true,f=false;function g(a){var c=a||{};this.d=this.c=f;if(a.visible==undefined)a.visible=b;if(a.shadow==undefined)a.shadow="7px -3px 5px rgba(88,88,88,0.7)";if(a.anchor==undefined)a.anchor=i.BOTTOM;this.setValues(c)}g.prototype=new google.maps.OverlayView;window.RichMarker=g;g.prototype.getVisible=function(){return this.get("visible")};g.prototype.getVisible=g.prototype.getVisible;g.prototype.setVisible=function(a){this.set("visible",a)};g.prototype.setVisible=g.prototype.setVisible; 29 g.prototype.s=function(){if(this.c){this.a.style.display=this.getVisible()?"":"none";this.draw()}};g.prototype.visible_changed=g.prototype.s;g.prototype.setFlat=function(a){this.set("flat",!!a)};g.prototype.setFlat=g.prototype.setFlat;g.prototype.getFlat=function(){return this.get("flat")};g.prototype.getFlat=g.prototype.getFlat;g.prototype.p=function(){return this.get("width")};g.prototype.getWidth=g.prototype.p;g.prototype.o=function(){return this.get("height")};g.prototype.getHeight=g.prototype.o; 30 g.prototype.setShadow=function(a){this.set("shadow",a);this.g()};g.prototype.setShadow=g.prototype.setShadow;g.prototype.getShadow=function(){return this.get("shadow")};g.prototype.getShadow=g.prototype.getShadow;g.prototype.g=function(){if(this.c)this.a.style.boxShadow=this.a.style.webkitBoxShadow=this.a.style.MozBoxShadow=this.getFlat()?"":this.getShadow()};g.prototype.flat_changed=g.prototype.g;g.prototype.setZIndex=function(a){this.set("zIndex",a)};g.prototype.setZIndex=g.prototype.setZIndex; 31 g.prototype.getZIndex=function(){return this.get("zIndex")};g.prototype.getZIndex=g.prototype.getZIndex;g.prototype.t=function(){if(this.getZIndex()&&this.c)this.a.style.zIndex=this.getZIndex()};g.prototype.zIndex_changed=g.prototype.t;g.prototype.getDraggable=function(){return this.get("draggable")};g.prototype.getDraggable=g.prototype.getDraggable;g.prototype.setDraggable=function(a){this.set("draggable",!!a)};g.prototype.setDraggable=g.prototype.setDraggable; 32 g.prototype.k=function(){if(this.c)this.getDraggable()?j(this,this.a):k(this)};g.prototype.draggable_changed=g.prototype.k;g.prototype.getPosition=function(){return this.get("position")};g.prototype.getPosition=g.prototype.getPosition;g.prototype.setPosition=function(a){this.set("position",a)};g.prototype.setPosition=g.prototype.setPosition;g.prototype.q=function(){this.draw()};g.prototype.position_changed=g.prototype.q;g.prototype.l=function(){return this.get("anchor")};g.prototype.getAnchor=g.prototype.l; 33 g.prototype.r=function(a){this.set("anchor",a)};g.prototype.setAnchor=g.prototype.r;g.prototype.n=function(){this.draw()};g.prototype.anchor_changed=g.prototype.n;function l(a,c){var d=document.createElement("DIV");d.innerHTML=c;if(d.childNodes.length==1)return d.removeChild(d.firstChild);else{for(var e=document.createDocumentFragment();d.firstChild;)e.appendChild(d.firstChild);return e}}function m(a,c){if(c)for(var d;d=c.firstChild;)c.removeChild(d)} 34 g.prototype.setContent=function(a){this.set("content",a)};g.prototype.setContent=g.prototype.setContent;g.prototype.getContent=function(){return this.get("content")};g.prototype.getContent=g.prototype.getContent; 35 g.prototype.j=function(){if(this.b){m(this,this.b);var a=this.getContent();if(a){if(typeof a=="string"){a=a.replace(/^\s*([\S\s]*)\b\s*$/,"$1");a=l(this,a)}this.b.appendChild(a);var c=this;a=this.b.getElementsByTagName("IMG");for(var d=0,e;e=a[d];d++){google.maps.event.addDomListener(e,"mousedown",function(h){if(c.getDraggable()){h.preventDefault&&h.preventDefault();h.returnValue=f}});google.maps.event.addDomListener(e,"load",function(){c.draw()})}google.maps.event.trigger(this,"domready")}this.c&& 36 this.draw()}};g.prototype.content_changed=g.prototype.j;function n(a,c){if(a.c){var d="";if(navigator.userAgent.indexOf("Gecko/")!==-1){if(c=="dragging")d="-moz-grabbing";if(c=="dragready")d="-moz-grab"}else if(c=="dragging"||c=="dragready")d="move";if(c=="draggable")d="pointer";if(a.a.style.cursor!=d)a.a.style.cursor=d}} 37 function o(a,c){if(a.getDraggable())if(!a.d){a.d=b;var d=a.getMap();a.m=d.get("draggable");d.set("draggable",f);a.h=c.clientX;a.i=c.clientY;n(a,"dragready");a.a.style.MozUserSelect="none";a.a.style.KhtmlUserSelect="none";a.a.style.WebkitUserSelect="none";a.a.unselectable="on";a.a.onselectstart=function(){return f};p(a);google.maps.event.trigger(a,"dragstart")}} 38 function q(a){if(a.getDraggable())if(a.d){a.d=f;a.getMap().set("draggable",a.m);a.h=a.i=a.m=null;a.a.style.MozUserSelect="";a.a.style.KhtmlUserSelect="";a.a.style.WebkitUserSelect="";a.a.unselectable="off";a.a.onselectstart=function(){};r(a);n(a,"draggable");google.maps.event.trigger(a,"dragend");a.draw()}} 39 function s(a,c){if(!a.getDraggable()||!a.d)q(a);else{var d=a.h-c.clientX,e=a.i-c.clientY;a.h=c.clientX;a.i=c.clientY;d=parseInt(a.a.style.left,10)-d;e=parseInt(a.a.style.top,10)-e;a.a.style.left=d+"px";a.a.style.top=e+"px";var h=t(a);a.setPosition(a.getProjection().fromDivPixelToLatLng(new google.maps.Point(d-h.width,e-h.height)));n(a,"dragging");google.maps.event.trigger(a,"drag")}}function k(a){if(a.f){google.maps.event.removeListener(a.f);delete a.f}n(a,"")} 40 function j(a,c){if(c){a.f=google.maps.event.addDomListener(c,"mousedown",function(d){o(a,d)});n(a,"draggable")}}
40function p(a){if(a.a.setCapture){a.a.setCapture(b);a.e=[google.maps.event.addDomListener(a.a,"mousemove",function(c){s(a,c)},b),google.maps.event.addDomListener(a.a,"mouseup",function(){q(a);a.a.releaseCapture()},b)]}else a.e=[google.maps.event.addDomListener(window,"mousemove",function(c){s(a,c)},b),google.maps.event.addDomListener(window,"mouseup",function(){q(a)},b)]} 41 function r(a){if(a.e){for(var c=0,d;d=a.e[c];c++)google.maps.event.removeListener(d);a.e.length=0}} 42 function t(a){var c=a.l();if(typeof c=="object")return c;var d=new google.maps.Size(0,0);if(!a.b)return d;var e=a.b.offsetWidth;a=a.b.offsetHeight;switch(c){case i.TOP:d.width=-e/2;break;case i.TOP_RIGHT:d.width=-e;break;case i.LEFT:d.height=-a/2;break;case i.MIDDLE:d.width=-e/2;d.height=-a/2;break;case i.RIGHT:d.width=-e;d.height=-a/2;break;case i.BOTTOM_LEFT:d.height=-a;break;case i.BOTTOM:d.width=-e/2;d.height=-a;break;case i.BOTTOM_RIGHT:d.width=-e;d.height=-a}return d} 43 g.prototype.onAdd=function(){if(!this.a){this.a=document.createElement("DIV");this.a.style.position="absolute"}if(this.getZIndex())this.a.style.zIndex=this.getZIndex();this.a.style.display=this.getVisible()?"":"none";if(!this.b){this.b=document.createElement("DIV");this.a.appendChild(this.b);var a=this;google.maps.event.addDomListener(this.b,"click",function(){google.maps.event.trigger(a,"click")});google.maps.event.addDomListener(this.b,"mouseover",function(){google.maps.event.trigger(a,"mouseover")}); 44 google.maps.event.addDomListener(this.b,"mouseout",function(){google.maps.event.trigger(a,"mouseout")})}this.c=b;this.j();this.g();this.k();var c=this.getPanes();c&&c.overlayImage.appendChild(this.a);google.maps.event.trigger(this,"ready")};g.prototype.onAdd=g.prototype.onAdd; 45 g.prototype.draw=function(){if(!(!this.c||this.d)){var a=this.getProjection();if(a){var c=this.get("position");a=a.fromLatLngToDivPixel(c);c=t(this);this.a.style.top=a.y+c.height+"px";this.a.style.left=a.x+c.width+"px";a=this.b.offsetHeight;c=this.b.offsetWidth;c!=this.get("width")&&this.set("width",c);a!=this.get("height")&&this.set("height",a)}}};g.prototype.draw=g.prototype.draw;g.prototype.onRemove=function(){this.a&&this.a.parentNode&&this.a.parentNode.removeChild(this.a);k(this)}; 46 g.prototype.onRemove=g.prototype.onRemove;var i={TOP_LEFT:1,TOP:2,TOP_RIGHT:3,LEFT:4,MIDDLE:5,RIGHT:6,BOTTOM_LEFT:7,BOTTOM:8,BOTTOM_RIGHT:9};window.RichMarkerPosition=i; 47 })(); 48 } 49 } 50 51 52 /* dynamic Maps 53 =================================================================*/ 54 55 $.fn.qtPlaceDynamicMaps = function(targetContainer){ 56 57 if(targetContainer === undefined) { 58 targetContainer = ".qtPlaces-container"; 59 } 60 var map, mapElement, myLatlng, mapOptions; 61 if(typeof google !== 'undefined' && 'undefined' !== typeof(google.maps) ){ 62 $.fn.createRichMarker(); 63 var googleMapsColorLight = [{"featureType":"water","elementType":"geometry","stylers":[{"color":"#ff0000"},{"lightness":2}]},{"featureType":"landscape","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"poi","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"stylers":[{"hue":"#00aaff"},{"saturation":-100},{"gamma":2.15},{"lightness":12}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"visibility":"on"},{"lightness":24}]},{"featureType":"road","elementType":"geometry","stylers":[{"lightness":57}]}]; 64 var googleMapsColorDark = [{"featureType":"water","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":17}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":18}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":16}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":21}]},{"elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#000000"},{"lightness":16}]},{"elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#000000"},{"lightness":40}]},{"elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":19}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":17},{"weight":1.2}]}]; 65 // Array with all the locations: 66 67 // google.maps.event.addDomListener(window, 'load', 68 // function () { 69 // 70 71 $(targetContainer).each(function(i,c){ 72 73 // per ogni mappa 74 var that = $(this), 75 target = that.attr("data-dynamicmap"), 76 mapcolor = that.attr("data-mapcolor"), 77 currentMapId = that.attr("id"), 78 mousewheel = that.attr("data-mousewheel"), 79 getdirections = that.attr("data-getdirections"); 80 81 82 var themapcolor = googleMapsColorDark; 83 if (mapcolor === "light"){ 84 themapcolor = googleMapsColorLight; 85 } 86 if (mapcolor === "normal" || mapcolor === "natural"){ 87 themapcolor = ''; 88 } 89 90 91 92 mapOptions = { 93 zoom: 4, 94 styles: themapcolor, 95 panControl: true, 96 scrollwheel: mousewheel, 97 zoomControl: true, 98 draggable: true, 99 zoomControlOptions: { 100 style: google.maps.ZoomControlStyle.LARGE, 101 position: google.maps.ControlPosition.LEFT_CENTER 102 }, 103 mapTypeControl: false, 104 scaleControl: true, 105 streetViewControl: that.attr("data-streetview"), 106 overviewMapControl: true 107 }; 108 mapElement = document.getElementById(target); 109 that.map = new google.maps.Map(mapElement, mapOptions); 110 111 that.bounds = new google.maps.LatLngBounds (); 112 113 114 115 116 that.find(".qtPlaces-marker").each(function(i,c){ 117 // Adding markers 118 var mapitem = $(this); 119 mapitem.lat = mapitem.attr("data-lat"), 120 mapitem.lon = mapitem.attr("data-lon"); 121 122 123 if( mapitem.lat !== "" && mapitem.lon !== ""){ 124 myLatlng = new google.maps.LatLng(mapitem.lat, mapitem.lon); 125 that.bounds.extend (myLatlng); 126 // 127 // MARKER // hidden 128 // ============================================ 129 130 var markerid = mapitem.attr("data-markerid"), 131 mapid = mapitem.attr("data-mapid"), 132 clicktarget = mapitem.attr("data-clicktarget"), 133 markertitle = mapitem.attr("data-markertitle"), 134 markerimg = mapitem.attr("data-markerimg"), 135 hidethumbnail = mapitem.attr("data-hidethumbnail"), 136 filters = mapitem.attr("data-filters"), 137 markerdate = mapitem.attr("data-markerdate"), 138 markerlink = mapitem.attr("data-markerlink"), 139 markerphone = mapitem.attr("data-markerphone"), 140 markerlink = mapitem.attr("data-markerlink"), 141 markerlocation = mapitem.attr("data-markerlocation"), 142 markericon = mapitem.find("i").attr("class"), 143 markeremail = mapitem.attr("data-markeremail"), 144 fulladdress = mapitem.attr("data-markeraddress")+" "+mapitem.attr("data-markercity")+" "+mapitem.attr("data-markercountry").split("++").join(""); 145 146 if(markerimg != ''){ 147 markerimg = '<img src="'+markerimg+'" class="'+hidethumbnail+'">'; 148 } 149 var markercontent = '<div id="mapmarker'+markerid+'" class="qtPlaces-mapmarker all '+filters+'">' 150 +'<a class="qtPlaces-marker-img qtIndicator" data-mapct="'+markerid+'">' 151 +markerimg 152 +'<i class="'+markericon+'"></i></a>' 153 +'<div class="markercontents">'; 154 if(markertitle != ''){ 155 markercontent +='<h5 class="locationname"><a href="'+mapitem.attr("href")+'">'+stripslashes(markertitle)+'</a></h5>'; 156 } 157 if(markertitle === markerlocation) { 158 markerlocation = ''; 159 } 160 markercontent +='<p class="location"><span>'+stripslashes(markerlocation)+'</span>'+stripslashes(mapitem.attr("data-markeraddress"))+' '+stripslashes(mapitem.attr("data-markercity"))+ ' '+stripslashes(mapitem.attr("data-markercountry"))+' </p>'; 161 if(markerlink != ''){ 162 markercontent +='<p class="det"><i class="fa fa-external-link"></i><a href="'+markerlink+'" class="qtPlaces-button" target="_blank">'+markerlink+'</a></p>'; 163 } 164 if(markerphone != ''){ 165 markercontent +='<p class="det"><i class="fa fa-phone"></i>
165<a href="tel:'+markerphone+'" class="qtPlaces-button" target="_blank">'+markerphone+'</a></p>'; 166 } 167 if(markeremail != ''){ 168 markercontent +='<p class="det"><i class="fa fa-envelope-o"></i><a href="mailto:'+markeremail+'" class="qtPlaces-button" target="_blank">'+markeremail+'</a></p>'; 169 } 170 171 if(getdirections != ''){ 172 markercontent +='<p class="det"><i class="fa fa-compass"></i> <a href="https://www.google.com/maps/dir/Current+Location/'+fulladdress.split(" ").join("+")+'" class="qtPlaces-button" target="_blank">'+getdirections+'</a></p>'; 173 } 174 markercontent +='<i class="fa fa-close close"></i></div></div>'; 175 176 if( mapitem.marker = new RichMarker({ position: myLatlng, map: that.map, draggable: false, content: markercontent }) ){ 177 178 179 // CLICK on the List button 180 // ============================================ 181 mapitem.click(function(e){ 182 e.preventDefault(); 183 var theitem = $(this); 184 var theid = theitem.attr("data-markerid"); 185 var themapid = theitem.attr("data-mapid"); 186 var themap = $("#"+themapid); 187 $("#"+themapid+" .qtPlaces-mapmarker").removeClass("active"); 188 $("#"+themapid+" #mapmarker"+theid).addClass("active"); 189 var lat = theitem.attr("data-lat"), 190 lon = theitem.attr("data-lon"); 191 myLatlng = new google.maps.LatLng(lat, lon); 192 that.map.setCenter(myLatlng); 193 that.map.panTo(myLatlng); 194 if(theitem.attr("data-autozoom") === "1") { 195 that.map.setZoom(15); 196 } 197 198 if($(window).width() < 1024) { 199 that.closest(".qtPlaces-container").removeClass("open").find(".qtPlaces-menuswitch i").addClass("fa-bars").removeClass("fa-close"); 200 } 201 }); 202 203 204 that.on("click", ".qtPlaces-mapmarker .close", function(e){ 205 e.preventDefault(); 206 $(this).closest(".qtPlaces-mapmarker").removeClass("active"); 207 } ); 208 } 209 } 210 211 }); // LOOP: data-mapitem each 212 that.map.fitBounds (that.bounds); 213 214 that.animate({"opacity":"1"},800); 215 216 }).delay(1000).promise().done(function(){ 217 /**/ 218 $("a.qtIndicator").click(function(e){ 219 e.preventDefault(); 220 var buttonid = $(this).attr("data-mapct"); 221 $("#"+$(this).attr("data-mapct")).click(); 222 }); 223 }); // data DYNAMICMAP EACH 224 } else { 225 console.log('Google script not loaded'); 226 } 227 } 228 229 /** 230 * [qtPlaceMenuswitch switch menu open close] 231 * @return {[boolean]} [success] 232 */ 233 $.fn.qtPlaceMenuswitch = function(){ 234 $("body").off("click", ".qtPlaces-menuswitch"); 235 $("body").on("click", ".qtPlaces-menuswitch", function(e){ 236 e.preventDefault(); 237 var that = $(this); 238 that.closest(".qtPlaces-container").toggleClass("open"); 239 that.find("i").toggleClass("fa-bars").toggleClass("fa-close"); 240 }); 241 return true; 242 } 243 244 /** 245 * [qtPlaceFilterResults applies a category filter to the selected map] 246 * @param {[string]} target [id of the selected map] 247 * @param {[string]} filter [taxonomy unique ID] 248 * @return {[boolean]} [success] 249 */ 250 $.fn.qtPlaceFilterResults = function(target, filter){ 251 // 1 Filtering of the list results 252 $("#" + target + " .qtPlaces-entry").each(function(i,c){ 253 var that = $(c); 254 255 if(that.hasClass(filter)) { 256 that.show().promise().done(function(){ 257 that.animate({opacity:1}, 500); 258 }); 259 } else { 260 that.animate({opacity:0}
260, 500).promise().done(function(){ 261 that.hide(); 262 }); 263 }; 264 }); 265 266 $("#" + target + " .qtPlaces-mapmarker").each(function(i,c){ 267 var that = $(c); 268 269 if(that.hasClass(filter)) { 270 that.show().promise().done(function(){ 271 that.animate({opacity:1}, 500); 272 }); 273 } else { 274 that.animate({opacity:0}, 500).promise().done(function(){ 275 that.hide(); 276 }); 277 }; 278 }); 279 return true; 280 }; 281 282 283 /** 284 * [qtPlaceFilter filters the results based on the clicked tag] 285 * @param {[string]} targetContainer [map selector] 286 * @return {[boolean]} [success] 287 */ 288 $.fn.qtPlaceFilter = function(targetContainer){ 289 if(targetContainer === undefined) { 290 targetContainer = ".qtPlaces-container"; 291 } 292 $("body").off("click", targetContainer+" [data-placefilter]"); 293 $("body").on("click", targetContainer+" [data-placefilter]", function(e){ 294 e.preventDefault(); 295 var that = $(this), 296 target = that.attr("data-targetmap"), 297 filter = that.attr("data-placefilter"); 298 if(that.hasClass("active")){ 299 that.removeClass("active"); 300 $.fn.qtPlaceFilterResults(target, "all"); 301 } else { 302 that.siblings().removeClass("active"); 303 that.addClass("active"); 304 $.fn.qtPlaceFilterResults(target, filter); 305 } 306 }); 307 return true; 308 }; 309 310 /** 311 * [qtPlaceAutoBg automatically adds background images] 312 * @return {[type]} [description] 313 */ 314 $.fn.qtPlaceAutoBg = function(targetContainer){ 315 if(targetContainer === undefined) { 316 targetContainer = ".qtPlaces-container"; 317 } 318 $(targetContainer+" [data-qtautobg]").each(function(i){ 319 var that = $(this), 320 bg = that.attr("data-qtautobg"); 321 that.css({"background-image": "url("+bg+")"}); 322 }); 323 } 324 325 /** 326 * [qtPlacesInit initialization. Contains all the needed functions to run the map. Can be called again for ajax initialization] 327 * @return {[type]} [description] 328 */ 329 $.fn.qtPlacesInit = function(){ 330 $.fn.qtPlaceMenuswitch(); 331 $.fn.qtPlaceFilter(); 332 $.fn.qtPlaceAutoBg(); 333 $.fn.qtPlaceDynamicMaps(); 334 }; 335 336 337 338 339 340 /** ======================================================================================================================================== 341 * 342 * 343 * 19. Dynamic maps 344 * 345 * 346 ========================================================================================================================================*/ 347 348 var QT_map_light = [{"featureType":"landscape","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"poi","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"stylers":[{"hue":"#00aaff"},{"saturation":-100},{"gamma":2.15},{"lightness":12}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"visibility":"on"},{"lightness":24}]},{"featureType":"road","elementType":"geometry","stylers":[{"lightness":57}]}]; 349 var QT_map_dark = [{"featureType":"water","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":17}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":18}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":16}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":21}]},{"elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#000000"},{"lightness":16}]},{"elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#000000"},{"lightness":40}]},{"elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":19}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":17},{"weight":1.2}]}]; 350 $.fn.qtDynamicMaps = function(targetContainer){ 351 if(undefined === targetContainer) { 352 targetContainer = "body"; 353 } 354 var map, mapOptions; 355 $(targetContainer+" .qt_dynamicmaps").each(function(i,c){ 356 var that = $(c), 357 coord = that.attr("data-coord").split(","), 358 mylat = coord[0], 359 mylon = coord[1], 360 mapid = that.attr("id"), 361 colors = that.attr("data-colors"), 362 height = that.attr("data-height"), 363 locationname = that.attr("data-locationname"); 364 365 that.height(height); 366 var map = new google.maps.Map(document.getElementById(mapid), { 367 zoom: 16, 368 height: height, 369 // styles: QT_map_dark, 370 center: new google.maps.LatLng(mylat, mylon), 371 mapTypeId: google.maps.MapTypeId.ROADMAP 372 }); 373 var infowindow = new google.maps.InfoWindow(); 374 var marker, i; 375 marker = new google.maps.Marker({ 376 position: new google.maps.LatLng(mylat,mylon), 377 map: map 378 }); 379 google.maps.event.addListener(marker, 'click', (function(marker, i) { 380 return function() { 381 infowindow.setContent(locationname); 382 infowindow.open(map, marker); 383 } 384 })(marker, i)); 385 }); 386 } 387 388 /** 389 * Custom styles from shortcodes 390 */ 391 $.fn.QtPlacesStyles = function(){ 392 var styles = ''; 393 $('[data-qtplaces-styles]').each(function(i,c){ 394 styles = styles + $(c).data('qtplaces-styles'); 395 }); 396 $('head').append('<style id="qtplaces-styles">'+styles+'<style>'); 397 } 398 399 400 $(window).ready(function(){ 401 $.fn.qtDynamicMaps(); 402 $.fn.qtPlacesInit(); 403 $.fn.QtPlacesStyles(); 404 }); 405 406 407})(jQuery);
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.