/** * Simple Map - v2.9.0 * * http://wordpress.org/plugins/simple-map/ * https://github.com/miya0001/simple-map * * Special thanks! * http://hpneo.github.io/gmaps/ * * Copyright 2018, Takayuki Miyauchi (http://wpist.me/) * Released under the GPLv2 */ "use strict";!function(e,t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(["jquery","googlemaps!"],t):e.GMaps=t()}(this,function(){var T,z,t,o,S=function(e,t){var o;if(e===t)return e;for(o in t)void 0!==t[o]&&(e[o]=t[o]);return e},i=function(e,o){var t,n=Array.prototype.slice.call(arguments,2),r=[],i=e.length;if(Array.prototype.map&&e.map===Array.prototype.map)r=Array.prototype.map.call(e,function(e){var t=n.slice(0);return t.splice(0,0,e),o.apply(this,t)});else for(t=0;t'+i.title+""}if(W("gmaps_context_menu")){var a=W("gmaps_context_menu");a.innerHTML=e;var s=a.getElementsByTagName("a"),l=s.length;for(r=0;r=e.lng()||c.lng()=e.lng())&&p.lat()+(e.lng()-p.lng())/(c.lng()-p.lng())*(c.lat()-p.lat())>>0;if(0===o)return-1;var n=0;if(1r){var i,a;i="true"==d(e).data("map-type-control"),a=d(e).data("map-type-id")?d(e).data("map-type-id"):"ROADMAP";var s=new GMaps({div:e,lat:t.lat(),lng:t.lng(),mapTypeControl:i,zoom:parseFloat(o),streetViewControl:!1,scrollwheel:!1,mapTypeId:google.maps.MapTypeId[a],width:e.style.width,height:e.style.height});if(!d(e).is(":visible"))var l=setInterval(function(){d(e).is(":visible")&&(clearInterval(l),s.refresh(),s.setCenter(t.lat(),t.lng()))},1e3);if(n.length){var p=s.addMarker({lat:t.lat(),lng:t.lng(),infoWindow:{content:n}});"open"==d(e).data("infowindow")&&p.infoWindow.open(p.map,p)}else s.addMarker({lat:t.lat(),lng:t.lng()})}else{var c=GMaps.staticMapURL({center:t.lat()+","+t.lng(),zoom:o,size:r+"x"+d(e).height(),markers:[{lat:t.lat(),lng:t.lng()}]}),g=d("");d(g).attr("src",c+"&key="+google_map_api_key),d(g).attr("alt",d(e).text());var h=d("");d(h).attr("href",this.base_url+"q="+t.lat()+","+t.lng()+"&z="+o),d(h).html(g),d(e).html(h),d(e).addClass("staticmap")}},d(".simplemap").each(function(){new e(d("div",this).get(0))})}(jQuery);