MapPress Easy Google Maps - Version 2.48.7

Version Description

  • Fixed: restored inline directions form
  • Changed: updated 'directions.php' template file and CSS
  • Changed: updated plugin with new mappresspro.com URL
  • Changed: re-added use of inline script functions for themes that match tags inside content (json) data
Download this release

Release Info

Developer chrisvrichardson
Plugin Icon 128x128 MapPress Easy Google Maps
Version 2.48.7
Comparing to
See all releases

Code changes from version 2.48.6 to 2.48.7

css/mappress.css CHANGED
@@ -489,7 +489,7 @@
489
  line-height: normal ;
490
  }
491
 
492
- .mapp-dir-a, .mapp-dir-b, .mapp-dir-arrows {
493
  background: transparent url('../images/directions.png') no-repeat center center;
494
  cursor: pointer;
495
  display: inline-block;
@@ -499,8 +499,6 @@
499
  }
500
 
501
  .mapp-dir-arrows { width: 10px; height: 12px; background-position: -10px -489px; position: relative; top: 10px; left: 5px; }
502
- .mapp-dir-a { width: 24px; height: 24px; background-position: 0px -140px; }
503
- .mapp-dir-b { width: 24px; height: 24px; background-position: 0px -71px; }
504
 
505
  /*
506
  -----------------------------------------------------------------------------------
489
  line-height: normal ;
490
  }
491
 
492
+ .mapp-dir-arrows {
493
  background: transparent url('../images/directions.png') no-repeat center center;
494
  cursor: pointer;
495
  display: inline-block;
499
  }
500
 
501
  .mapp-dir-arrows { width: 10px; height: 12px; background-position: -10px -489px; position: relative; top: 10px; left: 5px; }
 
 
502
 
503
  /*
504
  -----------------------------------------------------------------------------------
js/mappress.min.js CHANGED
@@ -1 +1 @@
1
- var mapp=window.mapp||{};+function(n){mapp.Map=function(t,r){function a(n,t){n=n.split(" ");for(var i=0;i<n.length;i++)google.maps.event.addListener(u,n[i],t)}function y(){var i,t;n("[data-mapp-type]",f.menu).removeClass("mapp-active");n('[data-mapp-type="'+u.getMapTypeId()+'"]',f.menu).addClass("mapp-active");for(layer in s)i=!!s[layer].getMap(),n('[data-mapp-layer="'+layer+'"]',f.menu).toggleClass("mapp-active",i);t=!!(e.center&&e.zoom);n('[data-mapp-action="viewport-set"]',f.menu).toggle(!t);n('[data-mapp-action="viewport-reset"]',f.menu).toggle(t)}function p(){var n=mappl10n.options.styles,i=mappl10n.options.style,r=["roadmap","satellite","terrain","hybrid"],t;if(i&&typeof n[i]!="undefined"&&u.setOptions({styles:n[i]}),e.editable){for(t in n)u.mapTypes.set(t,new google.maps.StyledMapType(n[t],{name:t})),r.push(t);u.setOptions({mapTypeControlOptions:{mapTypeIds:r,position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}})}else typeof n[e.mapTypeId]!="undefined"&&u.setOptions({styles:n[e.mapTypeId]})}function w(){f.controls.children("[data-mapp-position]").each(function(){var t=n(this).attr("data-mapp-position"),i;t=t?google.maps.ControlPosition[t]:google.maps.ControlPosition.TOP_RIGHT;i=n(this);i.get(0).index=0;u.controls[t].push(i.get(0))})}function b(){var f,i,t,r;for(s={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer},f=n.makeArray(e.layers),i=0;i<f.length;i++)t=n.trim(f[i]),r=t.split(".").pop(),s[t]?l(t):r=="kml"||r=="kmz"?s[t]=new google.maps.KmlLayer({map:u,preserveViewport:!0,url:t}):r=="json"&&(s[t]=new google.maps.Data({map:u}).loadGeoJson(t))}function l(t,i){n.each(["traffic","bicycling","transit"],function(n,t){s[t].setMap(null)});t&&(i=typeof i=="undefined"?s[t].getMap()==null:i,s[t].setMap(i?u:null))}function v(t,i){var r=n.inArray(t,["roadmap","satellite","terrain","hybrid"])!=-1;i=typeof i!="undefined"?i:!(u.getMapTypeId()==t);t=e.editable?i&&(r||typeof mappl10n.options.styles[t]!="undefined")?t:"roadmap":r?t:"roadmap";u.setMapTypeId(t)}this.defaults={center:null,editable:null,height:null,initialOpenDirections:null,initialOpenInfo:null,layers:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,pois:null,postid:null,query:null,title:null,width:null,zoom:null};this.iw=null;this.places=null;this.poi=null;this.settings=r?r:{};var e=this,h=null,f={},u=null,s={},o=[],c;_.extend(this,this.defaults,_.pick(t,_.keys(this.defaults)),_.pick(this.settings,_.keys(this.defaults)));this.display=function(){if(f.layout=n("#"+this.name),n.each(["canvas","controls","directions","filters","list","menu","search"],function(t,i){f[i]=n(".mapp-"+i,f.layout)}),!f.canvas.length)return mapp.lib.log("MapPress: Missing map name or container for map: "+this.name);u=new google.maps.Map(f.canvas.get(0),{mapTypeId:"roadmap",zoom:1});var t=_.extend({backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,keyboardShortcuts:!1,mapTypeControl:!0,mapTypeControlOptions:{position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},minZoom:0,scaleControl:!0,scrollwheel:!1,streetViewControl:!this.editable&&!this.query},this.mapOpts);t.minZoom=isNaN(parseInt(t.minZoom))?0:parseInt(t.minZoom);u.setOptions(t);p();w();b();v(this.mapTypeId,!0);this.toggleView("mini",f.layout.width()<450);this.places=new mapp.Places(n(".mapp-places",f.search),{map:e});e.editable||google.maps.event.addListener(this.places,"search",function(n){e.search(n)});f.layout.on("click","[data-mapp-action]",function(t){var i=n(this).attr("data-mapp-action");t.preventDefault();e.action(i,n(this).attr("data-mapp-"+i),n(this))});f.filters.on("change",function(){e.ajaxQuery(u.getBounds())});a("click drag",function(){e.closeInfoWindow()});n("body").on("click",function(t){var i=n(t.target),r=i.attr("data-mapp-action");i==f.filters||r=="filters-toggle"||i.closest(f.filters).length||e.toggleView("filters",!1);i==f.menu||r=="menu-toggle"||i.closest(f.menu).length||e.toggleView("menu",!1)});n(window).resize(function(){e.resize()});this.iw=mappl10n.options.iwType=="ib"||this.editable?new mapp.InfoBox(this):new google.maps.InfoWindow;google.maps.event.addListenerOnce(u,"idle",function(){var n=o.length?o[0]:null;e.initialOpenDirections?e.openDirections(null,n):n&&e.initialOpenInfo&&n.open()});mappl10n.options.search&&google.maps.event.addListenerOnce(u,"tilesloaded",function(){google.maps.event.addListenerOnce(u,"idle",function(){a("dragend zoom_changed",function(){e.ajaxQuery(u.getBounds())})})});this.query||this.setPois(this.pois);typeof this.center=="string"?this.places.parse(this.center):this.query?this.ajaxQuery():this.recenter()};this.load=function(n){_.extend(this,this.defaults,n,this.settings);v(this.mapTypeId,!0);this.toggleView("menu",!1);l();this.closeInfoWindow();this.setPois(this.pois);this.places.set("");google.maps.event.trigger(this,"load")};this.action=function(t,i,r){switch(t){case"center":this.toggleView("menu",!1);this.closeInfoWindow();this.recenter();break;case"dir":this.openDirections(null,this.poi);break;case"dir-from":this.openDirections(this.poi,null);break;case"filters-reset":f.filters.find(":input").each(function(){this.type=="checkbox"||this.type=="radio"?n(this).prop("checked",!1):n(this).val("")});this.ajaxQuery(u.getBounds());break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":this.places.geolocate(function(n){e.search(n)});break;case"layer":l(i);this.toggleView("menu",!1);break;case"menu-toggle":this.toggleView("menu");break;case"open":var s=r.attr("data-mapp-poi");this.openInfoWindow(o[s]);break;case"show":f.layout.show();this.resize();this.initCenter();break;case"view-map":this.toggleView("list",!1);break;case"view-list":this.toggleView("list",!0);break;case"viewport-set":this.center=u.getCenter().toJSON();this.zoom=u.getZoom();this.toggleView("menu",!1);break;case"viewport-reset":this.center=null;this.zoom=null;this.toggleView("menu",!1);this.recenter();break;default:return!0}};this.search=function(n){var t=n.geometry.location?n.geometry.location:null,i=n.geometry.viewport?n.geometry.viewport:null,r=new google.maps.Circle({center:t,radius:mappl10n.options.radius*1e3}),f=i?i.union(r.getBounds()):r.getBounds();u.fitBounds(f,0);u.setCenter(t);this.query&&this.ajaxQuery(f)};this.dialog=function(t,i){t?(f.canvas.append("<div class='mapp-dialog'>"+t+"<\/div>"),i&&(clearTimeout(this.dialog.fade),this.dialog.fade=setTimeout(function(){e.dialog(null)},3e3))):n(".mapp-dialog",f.canvas).remove()};this.closeInfoWindow=function(){this.iw.close();this.poiSelect(null)};this.openDirections=function(n,t){var i=n?n.getAddress():"",r=t?t.getAddress():"";h||(h=new mapp.Directions(f.directions,e));h.open(i,r)};this.poiSelect=function(t){if(n("[data-mapp-poi]",f.list).removeClass("mapp-selected"),t){var r=n.inArray(t,o),i=n('[data-mapp-poi="'+r+'"]',f.list);i.addClass("mapp-selected");mapp.lib.scrollTo(f.list,i);t.setZIndex(++c)}this.poi=t};this.getMap=function(){return u};this.renderList=function(){this.editable&&(f.list.html(mapp.lib.template("poi-list",{pois:o})),google.maps.event.trigger(this,"render-list"))};this.getPois=function(){return o};this.addPoi=function(n){o.unshift(n);n.setMap(this);e.renderList();this.poiSelect(n)};this.removePoi=function(t){var i=n.inArray(t,o);i!=-1&&(o[i].setMap(null),o.splice(i,1),e.renderList())};this.resetPois=function(){for(i=0;i<o.length;i++)o[i].setMap(null);o=[];c=google.maps.Marker.MAX_ZINDEX};this.setPois=function(n){var t,i;if(this.resetPois(),n){for(t=0;t<n.length;t++)i=new mapp.Poi(n[t]),o.push(i),i.setMap(this),i.setZIndex(c+n.length-1-t);c+=n.length-1}this.renderList()};this.sortPois=function(n){for(var r,t=Array(),i=0;i<n.length;i++){if(r=parseInt(n[i]),isNaN(r))return!1;t.push(o[r])}if(t.length!=o.length)return!1;o=t;this.renderList()};this.openInfoWindow=function(n,t){if(h&&h.close(),this.iw.close(),this.poiSelect(n),mappl10n.options.mashupClick!="poi"&&n.postid&&n.url){window.open(n.url);return}this.toggleView("list",!1);this.editable||this.iw.setContent(n.html);google.maps.event.addListenerOnce(this.iw,"domready",function(){google.maps.event.trigger(e,"poidomready",n)});google.maps.event.trigger(e,"open",n);var i=new google.maps.MVCObject;i.setValues({position:n.getPosition(t),anchorPoint:n.getAnchorPoint(t)});this.iw.open(u,i)};this.togglePois=function(n){n=!!n;for(var t=0;t<o.length;t++)o[t].setVisible(n)};this.toggleView=function(n,t){t=typeof t=="undefined"?!f.layout.hasClass("mapp-view-"+n):t;f.layout.toggleClass("mapp-view-"+n,t);n=="menu"&&t&&y();n=="directions"&&this.resize()};this.resize=function(){var n=u.getCenter();this.toggleView("mini",f.layout.width()<450);google.maps.event.trigger(u,"resize");u.setCenter(n)};this.recenter=function(){var i=!this.query&&this.center&&this.center.lat&&this.center.lng?new google.maps.LatLng(this.center.lat,this.center.lng):null,n=!this.query&&this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null,t,r;if(this.center&&this.center.lat==0&&this.center.lng==0&&(i=null),i){u.setCenter(i);u.setZoom(n?n:1);return}if(o.length==0){u.setCenter(new google.maps.LatLng(0,0));u.setZoom(n?n:1);return}if(o.length==1){o[0].center(n);return}for(bounds=new google.maps.LatLngBounds,t=0;t<o.length;t++)r=o[t].getBounds(),bounds=r?bounds.union(r):bounds.extend(o[t].getPosition());u.fitBounds(bounds,0)};this.toJSON=function(){var n;for(this.pois=[],n=0;n<o.length;n++)this.pois.push(o[n].toJSON());return{center:this.center,height:this.height,mapid:this.mapid,mapTypeId:u.getMapTypeId(),metaKey:this.metaKey,pois:this.pois,title:this.title,width:this.width,zoom:this.zoom}};this.ajaxSave=function(n){var t=JSON.stringify(this),i=!this.mapid||!this.postid?mappl10n.options.postid:this.postid;mapp.lib.ajax({type:"POST",data:{action:"mapp_save",map:t,postid:i},callback:function(t){t.status=="OK"&&(e.mapid=t.data.mapid,n(t.data),google.maps.event.trigger(e,"save"))}})}};mapp.Map.ajaxCreate=function(n,t){mapp.lib.ajax({type:"GET",data:{action:"mapp_create"},callback:function(i){if(i.status=="OK"){var r=new mapp.Map(i.data.map,n);t(r)}}})};mapp.Map.ajaxGet=function(n,t,i){mapp.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:n},callback:function(n){if(n.status=="OK"){var r=new mapp.Map(n.data.map,t);i(r)}}})};mapp.Map.ajaxDelete=function(n,t){mapp.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:n},callback:function(n){n.status=="OK"&&t&&t()}})}}(jQuery);mapp=window.mapp||{};+function(n){mapp.Directions=function(t,i){this.sel=n(t);this.map=i;this.directionsRenderer=null;this.directionsService=null;this.placesService=null;var r=this;this.sel.on("keydown",function(n){n.which==13?(r.getDirections(),n.preventDefault()):n.which==27&&r.close()});this.sel.on("click","[data-mapp-action]",function(t){var f=n(this).attr("data-mapp-action"),i=n(".mapp-dir-daddr",r.sel).val(),u=n(".mapp-dir-saddr",r.sel).val();t.preventDefault();switch(f){case"dir-cancel":r.close();break;case"dir-get":r.getDirections();break;case"dir-google":r.openGoogle(u,i);r.close();break;case"dir-myloc":r.map.places.geolocate(function(t){n(".mapp-dir-saddr",r.sel).val(t.name);r.getDirections()});break;case"dir-swap":n(".mapp-dir-saddr",r.sel).val(i);n(".mapp-dir-daddr",r.sel).val(u);r.getDirections()}});this.open=function(t,i){this.openGoogle(t,i);return};this.close=function(){this.map.toggleView("directions",!1);this.directionsRenderer&&(this.directionsRenderer.setPanel(null),this.directionsRenderer.getMap()&&(this.directionsRenderer.setMap(null),this.map.togglePois(!0)))};this.getDirections=function(){var t;this.map.closeInfoWindow();n(".mapp-spinner",this.sel).css("visibility","visible");this.directionsService=this.directionsService?this.directionsService:new google.maps.DirectionsService;this.directionsRenderer=this.directionsRenderer?this.directionsRenderer:new google.maps.DirectionsRenderer({hideRouteList:!1,draggable:!0});this.placesService=this.placesService?this.placesService:new google.maps.places.PlacesService(this.map.getMap());n(".mapp-dir-renderer",this.sel).empty();t={travelMode:google.maps.DirectionsTravelMode.DRIVING,provideRouteAlternatives:!0,origin:n(".mapp-dir-saddr",this.sel).val(),destination:n(".mapp-dir-daddr",this.sel).val()};this.directionsService.route(t,function(t,i){(n(".mapp-spinner",r.sel).css("visibility","hidden"),n(".mapp-dir-addr",r.sel).removeClass("mapp-error"),n.each(t.geocoded_waypoints,function(t,i){n(".mapp-dir-addr",r.sel).eq(t).toggleClass("mapp-error",i.geocoder_status!="OK");i.place_id&&r.placesService.getDetails({placeId:i.place_id},function(i,u){if(u=="OK"){var f=i.formatted_address.replace(", USA","");f.indexOf(i.name)===-1&&(f=i.name+", "+f);n(".mapp-dir-addr",r.sel).eq(t).val(f)}})}),n(".mapp-dir-addr.mapp-error").length)||(i==google.maps.DirectionsStatus.OK?(r.map.togglePois(!1),r.directionsRenderer.setOptions({directions:t,map:r.map.getMap(),panel:n(".mapp-dir-renderer",r.sel).get(0)})):alert(mappl10n.dir_error+i))})};this.openGoogle=function(n,t){var i=mappl10n.options.directionsServer;i.toLowerCase().indexOf("http")==-1&&(i="https://"+i);i+="?saddr="+encodeURIComponent(n);i+="&daddr="+encodeURIComponent(t);window.open(i)}}}(jQuery);mapp=window.mapp||{};mapp.Geocoder=function(n){function r(n,t){jQuery(n).removeClass("mapp-error");jQuery(t).hide()}function u(n,t,i){jQuery(n).addClass("mapp-error");jQuery(t).html(i);jQuery(t).show()}var t,f,i=this;f=n;this.geocode=function(i,r){typeof i=="string"&&i.substring(0,1)=="("&&(split=i.replace(/\(|\)/g,"").split(","),i=new google.maps.LatLng(split[0],split[1]));var u=i instanceof google.maps.LatLng?{location:i}:{address:i,region:mappl10n.options.country,bounds:n.getBounds()};t||(t=new google.maps.Geocoder);t.geocode(u,function(n,t){if(n){for(var i=0;i<n.length;i++)n[i].formatted_address==""&&n.splice(i,1);r(n[0],t)}else r(null,t)})};this.geolocate=function(n){if(!navigator||!navigator.geolocation)return null;navigator.geolocation.getCurrentPosition(function(t){n(t)},function(){n(null)},{timeout:1e4,enableHighAccuracy:!0,maximumAge:3e4})};this.stringToLatLng=function(n){var t=n.split(",",2),i=Number(t[0]),r=Number(t[1]);return isNaN(i)||isNaN(r)?!1:new google.maps.LatLng(i,r)};this.geocodeField=function(n,t,i){r(n,t);checkAddress(n,t,jQuery(n).val(),function(r){if(!r){u(n,t,mappl10n.no_address);i(null);return}if(r&&r.formatted_address){jQuery(n).val(r.formatted_address);i(r.formatted_address);return}i(r);return})};this.autocompleteField=function(n,t,f,e,o){jQuery(n).keypress(function(i){i.which==13&&(checkAddress(n,t,jQuery(n).val(),o),i.preventDefault())});jQuery(f).click(function(){return checkAddress(n,t,jQuery(n).val(),o),!1});jQuery(e).click(function(){return r(n,t),i.geolocate(function(i){if(i){var r="("+i.coords.latitude+", "+i.coords.longitude+")";jQuery(n).val("");checkAddress(n,t,r,o)}else u(n,t,mappl10n.no_geolocate);return}),!1})};checkAddress=function(n,t,f,e){if(r(n,t),f=jQuery.trim(f),f==""){e(null);return}var o=i.stringToLatLng(f);if(o){e(o);return}if(f.substring(0,4)=="http"){e(f);return}i.geocode(f,function(i,r){if(!i||r!=google.maps.GeocoderStatus.OK){u(n,t,mappl10n.no_address);e(null);return}e(i);return})}};mapp.Geocoder.parseAddress=function(n){return!n||n==""?{firstLine:"",secondLine:""}:(n.lastIndexOf(", USA")>0||n.lastIndexOf(", United States")>0)&&(n.lastIndexOf(", USA")>0&&(n=n.slice(0,n.lastIndexOf(", USA"))),n.lastIndexOf(", United States")>0&&(n=n.slice(0,n.lastIndexOf(", United States"))),n.indexOf(",")==n.lastIndexOf(","))?{firstLine:n,secondLine:""}:n.indexOf(",")==-1?{firstLine:n,secondLine:""}:{firstLine:n.slice(0,n.indexOf(",")),secondLine:n.slice(n.indexOf(", ")+2)}};mapp=window.mapp||{};mapp.Icons={};mapp.Icons.get=function(){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"};mapp.Icons.getUrl=function(){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"};mapp=window.mapp||{};+function(n){mapp.InfoBox=function(t,i){var f=n.extend({border:20,disableAutoPan:!1},i),u=null,r=null,e=null,o=this;r=n('<div class="mapp-ib" tabindex="0">').appendTo(t.getMap().getDiv());e=n('<div class="mapp-ib-tip">').appendTo(t.getMap().getDiv());jQuery(window).resize(function(){o.close()});r.on("keydown",function(n){n.which==27&&o.close()});r.on("click",".mapp-close",function(){o.close()});this.getContent=function(){return r};this.setContent=function(n){r.empty().append(n)};this.open=function(n,t){u=t;this.setMap(n)};this.onAdd=function(){r.show();e.show();var t=n(":input",r);t.length?t.first().focus():r.focus();google.maps.event.trigger(o,"domready")};this.draw=function(){var l=this.getMap(),c=this.getProjection().fromLatLngToContainerPixel(u.position),t={width:n(l.getDiv()).width(),height:n(l.getDiv()).height()},v=n(".mapp-ib-body",r);if(!f.disableAutoPan){r.css({"max-height":"9999px",left:0,bottom:0,top:"auto",right:"auto"});var s=r.outerWidth(!0),h=r.outerHeight(!0),a=e.outerHeight(!0),i=c.x,o=c.y;i+s/2>t.width&&(i=t.width-s/2);i-s/2<0&&(i=s/2);o-h+u.anchorPoint.y-a<f.border&&(o=h-u.anchorPoint.y+f.border+a);o>t.height&&(o=t.height);l.panBy(c.x-i,c.y-o);h>t.height+u.anchorPoint.y-2*f.border&&(h=t.height+u.anchorPoint.y-2*f.border,r.css({"max-height":h+2}));r.css({left:i-s/2,bottom:t.height-o-u.anchorPoint.y+a});e.css({left:i,bottom:t.height-o-u.anchorPoint.y})}};this.close=function(){r.is(":visible")&&(this.setMap(null),google.maps.event.trigger(this,"closed"))};this.onRemove=function(){r.empty();r.hide();e.hide()}};mapp.InfoBox.prototype=new google.maps.OverlayView}(jQuery);mapp=window.mapp||{};+function(n){if(mapp.lib={ajax:function(t){var r=this,u,i;if(n.extend({type:"GET",cache:!1,data:null,spinner:null,callback:n.noop},t),t.cache)for(typeof mapp.lib.ajax.cache=="undefined"&&(mapp.lib.ajax.cache=[]),u=JSON.stringify(t.data),i=0;i<mapp.lib.ajax.cache.length;i++)if(mapp.lib.ajax.cache[i].hash==u){t.callback(mapp.lib.ajax.cache[i].response);return}return t.spinner&&t.spinner.show(),n.ajax({type:t.type,cache:!1,url:mappl10n.options.ajaxurl,data:t.data,success:function(n,i,u){if(t.spinner&&t.spinner.hide(),n.output){r.alert("AJAX Error\r\n"+n.output);return}if(n.status=="OK"){t.cache&&mapp.lib.ajax.cache.push({hash:JSON.stringify(t.data),response:n});t.callback&&t.callback(n,u);return}var f=typeof n=="object"?n.status:n;r.alert("AJAX ERROR\r\nResponse="+f+" TextStatus="+i+"\r\nResponseText="+u.responseText)},error:function(n,i,u){(t.spinner&&t.spinner.hide(),i!="cancel")&&typeof u!="undefined"&&u!=""&&r.alert("AJAX ERROR\r\nTextStatus="+i+"\r\nError="+u+"\r\nResponseText="+n.responseText)}})},alert:function(n){mappl10n.options.admin||mappl10n.options.debug?alert(n):window.console&&console.error(n)},fullscreen:function(n){var u=document.documentElement,i={requestFullscreen:"onfullscreenchange",webkitRequestFullscreen:"onwebkitfullscreenchange",mozRequestFullScreen:"onmozfullscreenchange",msRequestFullscreen:"onmsfullscreenchange"},t,r;for(t in i)u[t]&&(r=i[t],document[r]=n)},jqVersionCheck:function(t){if(typeof n=="undefined"||typeof t=="undefined")return!1;for(t=t.split("."),v=n.fn.jquery.split("."),i=0;i<t.length;i++){var r=parseInt(t[i]),u=typeof v[i]!="undefined"?parseInt(v[i]):0;if(u!=r)return u>r}return!0},log:function(n){window.console&&console.error(n)},scrollTo:function(n,t){if(n&&t&&n.length&&t.length){var i=n.scrollTop(),u=n.height(),r=i+t.position().top,f=r+t.outerHeight(!0);r<i?n.scrollTop(r):f>i+u&&n.scrollTop(f-u)}},template:function(t,i){if(mapp.lib.templates=mapp.lib.templates?mapp.lib.templates:{},!mapp.lib.templates[t]){var r=mappl10n.options.templates?mappl10n.options.template[t]:n("#mapp-tmpl-"+t).html();if(r)mapp.lib.templates[t]=_.template(r.replace(/[\n\r\t]/g,""),null,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g});else return""}return mapp.lib.templates[t](i)}},typeof google=="undefined")return mapp.lib.alert("ERROR: Google Maps API not loaded");if(!mappl10n.options.apiKey)return mapp.lib.alert("ERROR: Google Maps API Key missing, please check MapPress settings and FAQ");n(document).ready(function(){n('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1&&mapp.lib.alert("ERROR: Google Maps API key loaded multiple times, please see MapPress FAQ.")});mapp.lib.jqVersionCheck("1.7")||mapp.lib.alert("jQuery version is too old: "+n.fn.jquery);n("body").on("tabsactivate tabsshow",function(t,i){var r=i.newPanel?i.newPanel:i.panel;r&&n(".mapp-layout",r).each(function(){var i=n(this).attr("id"),t=window[i];t.resize();t.initCenter()})})}(jQuery);mapp=window.mapp||{};+function(n){mapp.Places=function(t,i){var u=this,r;if(this.sel=n(t),this.opts=n.extend({map:null,types:[]},i),r=n('<div style="display:none">').appendTo("body"),this.placesService=new google.maps.places.PlacesService(r.get(0)),this.autocompleteService=new google.maps.places.AutocompleteService,this.sel.length){this.autocomplete=new google.maps.places.Autocomplete(this.sel.get(0),{types:this.opts.types});this.autocomplete.bindTo("bounds",this.opts.map.getMap());this.sel.on("keydown",function(n){n.which==13&&n.preventDefault()});google.maps.event.addListener(this.autocomplete,"place_changed",function(){u.parse(this.getPlace())})}};mapp.Places.prototype={parse:function(t){var u,i=this,r,e,f;if(this.error(!1),r=t&&t.name?n.trim(t.name):n.trim(t),!r)return this.error(!0);if(r=="user"){this.geolocate(function(n){google.maps.event.trigger(i,"search",n)});return}if(r.substring(0,4)=="http"){google.maps.event.trigger(i,"search",r);return}if(t&&t.geometry){t.formatted_address&&this.set(t.formatted_address);google.maps.event.trigger(i,"search",t);return}if(e=this.parseLatLng(t),e){google.maps.event.trigger(i,"search",e);return}f=this.opts.map.getMap().getBounds();f=f?f:new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180));this.autocompleteService.getPlacePredictions({input:r,types:this.opts.types,bounds:f},function(n,t){if(t!="OK"||n==null||n.length==0)return i.error(!0);u=typeof n[0].description!="undefined"?n[0].description:null;i.placesService.getDetails({placeId:n[0].place_id},function(n,t){if(t!="OK"||!n||!n.geometry)return i.error(!0);u=u?u:n.formatted_address;i.set(u);google.maps.event.trigger(i,"search",n)})})},parseLatLng:function(t){var i,u,r;return t instanceof google.maps.LatLng?i=t:t&&t.lat&&t.lng?i=new google.maps.LatLng(t.lat,t.lng):(u=t&&t.name?n.trim(t.name):n.trim(t),r=u.split(","),r.length!=2||isNaN(r[0])||isNaN(r[1])||(i=new google.maps.LatLng(r[0],r[1]))),i?{name:i.toUrlValue(),geometry:{location:i}}:null},geolocate:function(n){var t=this;if(!navigator||!navigator.geolocation){alert(mappl10n.no_geolocate);return}navigator.geolocation.getCurrentPosition(function(i){t.set("");var r=new google.maps.LatLng(i.coords.latitude,i.coords.longitude);n({name:r.toUrlValue(),geometry:{location:r}})},function(n){var t=n&&n.message?" : "+n.message:"";alert(mappl10n.no_geolocate+t)},{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4})},set:function(n){n=n.replace(", United States of America","").replace(", USA","").replace(", United States","");this.sel.val(n);this.error(!1)},get:function(){return n.trim(this.sel.val())},focus:function(){this.sel.focus()},error:function(n){this.sel.toggleClass("mapp-error",!!n)},destroy:function(){this.autocomplete.unbindAll();google.maps.event.clearInstanceListeners(this.sel.get(0))}}}(jQuery);mapp=window.mapp||{};+function(n){mapp.Poi=function(t){var f,e,r,s,i,u,h,o;if(this.defaults={address:null,body:null,html:null,iconid:null,kml:null,map:null,overlay:null,postid:null,title:"",url:null,type:null,viewport:null},n.extend(this,this.defaults,t),t&&t.correctedAddress&&(this.address=t.correctedAddress),t.viewport&&t.viewport.sw&&t.viewport.ne&&(f=new google.maps.LatLng(t.viewport.sw.lat,t.viewport.sw.lng),e=new google.maps.LatLng(t.viewport.ne.lat,t.viewport.ne.lng),this.viewport=f.lat()==0&&f.lng()==0&&e.lat()==0&&e.lng()==0?null:new google.maps.LatLngBounds(f,e)),r=[],s=[],!t.overlay)switch(this.type){case"polygon":if(t.poly&&t.poly.paths)for(i=0;i<t.poly.paths.length;i++){for(r=[],u=0;u<t.poly.paths[i].length;u++)r.push(new google.maps.LatLng(t.poly.paths[i][u].lat,t.poly.paths[i][u].lng));s.push(new google.maps.MVCArray(r))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(s)});this.setColors(t.poly);break;case"polyline":if(t.poly&&t.poly.path)for(i=0;i<t.poly.path.length;i++)r.push(new google.maps.LatLng(t.poly.path[i].lat,t.poly.path[i].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(r)});this.setColors(t.poly);break;case"circle":o=new google.maps.LatLng(t.point.lat,t.point.lng);this.overlay=new google.maps.Circle({center:o,radius:parseFloat(t.poly.radius)});this.setColors(t.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport});this.setColors(t.poly);break;case"kml":h=t.kml&&t.kml.url?t.kml.url:"";this.overlay=new google.maps.KmlLayer(h,{preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:o=new google.maps.LatLng(t.point.lat,t.point.lng);this.overlay=new google.maps.Marker({position:o})}};mapp.Poi.prototype={toJSON:function(){var n={address:this.address,body:this.body,correctedAddress:this.address,iconid:this.iconid,point:null,poly:null,title:this.title,type:this.type,viewport:null},r=this.getPosition(),t,i;if(n.point={lat:r.lat(),lng:r.lng()},t=this.viewport?this.viewport:this.getBounds(),t&&(n.viewport={sw:{lat:t.getSouthWest().lat(),lng:t.getSouthWest().lng()},ne:{lat:t.getNorthEast().lat(),lng:t.getNorthEast().lng()}}),this.type=="kml"&&(n.kml={url:this.overlay.getUrl()}),this.isPoly()){n.poly=this.getColors();switch(this.type){case"circle":n.poly.radius=this.overlay.getRadius();break;case"polyline":n.poly.path=[];this.overlay.getPath().forEach(function(t){n.poly.path.push({lat:t.lat(),lng:t.lng()})});break;case"polygon":n.poly.paths=[];this.overlay.getPaths().forEach(function(t){var i=[];t.forEach(function(n){i.push({lat:n.lat(),lng:n.lng()})});n.poly.paths.push(i)});break;case"rectangle":i=this.overlay.getBounds();n.viewport={sw:{lat:i.getSouthWest().lat(),lng:i.getSouthWest().lng()},ne:{lat:i.getNorthEast().lat(),lng:i.getNorthEast().lng()}}}}return n},setMap:function(t){var i=this;if(google.maps.event.clearInstanceListeners(this.overlay),t==null){this.overlay.setMap(null);return}this.type=="kml"&&(google.maps.event.addListener(this.overlay,"defaultviewport_changed",function(){i.viewport=i.overlay.getDefaultViewport()}),google.maps.event.addListener(this.overlay,"status_changed",function(){var n=i.overlay.getStatus();n!="OK"&&mappl10n.ajaxErrors&&alert(mappl10n.kml_error+":"+n)}));this.map=t;this.overlay.setMap(t.getMap());this.setEditable(this.map.editable);this.setIcon(this.iconid);this.type||this.overlay.setTitle(n("<div>").html(this.title).text());google.maps.event.addListener(this.overlay,"click",function(n){i.open(n)})},setEditable:function(n){var t=this;this.type!="kml"&&(this.overlay.setDraggable(n),this.isPoly()&&this.overlay.setEditable(n),google.maps.event.clearListeners(this.overlay,"rightclick"),google.maps.event.clearListeners(this.overlay,"dragstart"),n&&(google.maps.event.addListener(this.overlay,"dragstart",function(){t.viewport=null;t.map.closeInfoWindow()}),(this.type=="polygon"||this.type=="polyline")&&google.maps.event.addListener(this.overlay,"rightclick",function(n){n.vertex!=null&&t.overlay.getPath().getLength()>2&&t.overlay.getPath().removeAt(n.vertex)})))},setZIndex:function(n){this.overlay.set("zIndex",n)},select:function(){},setIcon:function(n){this.type||typeof mapp.Icons=="undefined"||(this.overlay.setIcon(null),this.overlay.setIcon(mapp.Icons.get(n)),this.iconid=n)},setVisible:function(n){typeof this.overlay.setVisible!="undefined"&&this.overlay.setVisible(n)},setColors:function(n){var i={};for(var t in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})n&&typeof n[t]!="undefined"&&(i[t]=n[t]);this.overlay.setOptions(i)},getColors:function(){var t={};for(var n in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})typeof this.overlay[n]!="undefined"&&(t[n]=this.overlay[n]);return t},center:function(t){var i=this.map.getMap(),u=this.getBounds(),r,t;if(typeof t=="number"){i.setCenter(this.getPosition());i.setZoom(t);return}if(!u){i.setCenter(this.getPosition());i.setZoom(parseInt(mappl10n.options.poiZoom));return}r=u.getNorthEast().lng()-u.getSouthWest().lng();r<0&&(r+=360);t=Math.round(Math.log(n(i.getDiv()).width()*360/r/256)/Math.LN2);i.setCenter(this.getPosition());i.setZoom(t)},open:function(n){this.map.openInfoWindow(this,n)},isPoly:function(){return jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])!=-1},getBounds:function(){var n;switch(this.type){case"polyline":n=new google.maps.LatLngBounds;this.overlay.getPath().forEach(function(t){n.extend(t)});break;case"polygon":n=new google.maps.LatLngBounds;this.overlay.getPaths().forEach(function(t){t.forEach(function(t){n.extend(t)})});break;case"rectangle":case"circle":n=this.overlay.getBounds();break;case"kml":n=this.overlay.getDefaultViewport();n=n?n:this.viewport;break;default:return this.viewport}return n},getPosition:function(n){if(!this.type)return this.overlay.getPosition();if(this.type=="kml"&&n&&n.latLng)return n.latLng;var t=this.getBounds();return t?t.getCenter():new google.maps.LatLng(0,0)},click:function(){google.maps.event.trigger(this.overlay,"click")},getAddress:function(){return this.address?this.address:this.type=="kml"?this.kml.url:this.getPosition().toUrlValue()},getAnchorPoint:function(n){return this.type=="kml"?n&&n.pixelOffset?new google.maps.Point(n.pixelOffset.width,n.pixelOffset.height):new google.maps.Point(0,0):this.type?new google.maps.Point(0,0):typeof this.overlay.anchorPoint!="undefined"?this.overlay.anchorPoint:new google.maps.Point(0,-32)}}}(jQuery);mapp=window.mapp||{};mapp.widgets={};+function(n){mapp.widgets.Grid=function(t,i){this.el=n(t);this.options=jQuery.extend({action:null,sortable:!1},i);var r=this;this.table=n("table",this.el);this.template=n("script",this.el).html().replace(new RegExp("'","g"),'"');this.el.on("click",function(t){var u=n(t.target),i=u.attr("data-mapp-action");i&&(r[i](t),t.preventDefault())})};mapp.widgets.Grid.prototype={add:function(){this.table.show();var t=n(this.template).appendTo(this.table);n(":input:eq(0)",t).focus()},remove:function(t){var i=n(t.target).closest("tr").remove();n("tbody > tr",this.table).length||this.table.hide()}}}(jQuery);+function(n){mapp.widgets.Popup=function(t,i){this.options=n.extend({destroy:!1,fullscreen:!1,modal:!1,position:null,toggle:null},i);this.activeToggle=null;var r=this;this.el=n('<div class="mapp-popup" tabindex="-1">').appendTo("body").hide();this.setContent(t);this.el.on("focusout",function(t){n.contains(r.el.get(0),t.relatedTarget)||r.el.get(0)==t.relatedTarget||r.close()});if(this.options.toggle)n(document).on("click",this.options.toggle,function(t){r.activeToggle=n(this);r.open();t.stopPropagation()});this.el.on("click",".mapp-close",function(){r.close()});this.el.on("keydown",function(n){n.which==27&&r.close()});return this};mapp.widgets.Popup.prototype={close:function(){this.el.is(":visible")&&(this.backdrop&&this.backdrop.remove(),n("body").removeClass("mapp-popup-open"),this.el.hide(),this.activeToggle.focus(),this.el.trigger("closed.mapp.popup"))},destroy:function(){this.el.remove();n(document).off("click.mapp.popup",function(){me.close()})},open:function(){var i=this,t;n(document).trigger("click.mapp.popup");this.el.trigger("open.mapp.popup");this.el.show();this.options.modal||this.el.position(n.extend({my:"center bottom",at:"center top-5",of:this.activeToggle,collision:"flipfit"},this.options.position));t=n(":input",this.el);t.length?t.first().focus():this.el.focus();this.options.modal&&(this.backdrop=n('<div class="mapp-backdrop"><\/div>'),this.el.after(this.backdrop),n("body").addClass("mapp-popup-open"))},setContent:function(n){this.el.empty();this.el.append('<span class="mapp-close">');this.el.append(n)},toggle:function(){this.el.is(":visible")?this.close():this.open()}}}(jQuery);+function(){mapp.load=function(){if(typeof mapp!="undefined"&&mapp.data)while(mapp.data.length){var n=mapp.data.pop();window[n.name]=new mapp.Map(n);window[n.name].display()}}}(jQuery);typeof mapp.Media!="undefined"?window.mappEditor=new mapp.Media:mapp.load()
1
+ var mapp=window.mapp||{};+function(n){mapp.Map=function(t,r){function a(n,t){n=n.split(" ");for(var i=0;i<n.length;i++)google.maps.event.addListener(u,n[i],t)}function y(){var i,t;n("[data-mapp-type]",e.menu).removeClass("mapp-active");n('[data-mapp-type="'+u.getMapTypeId()+'"]',e.menu).addClass("mapp-active");for(layer in s)i=!!s[layer].getMap(),n('[data-mapp-layer="'+layer+'"]',e.menu).toggleClass("mapp-active",i);t=!!(f.center&&f.zoom);n('[data-mapp-action="viewport-set"]',e.menu).toggle(!t);n('[data-mapp-action="viewport-reset"]',e.menu).toggle(t)}function p(){var n=mappl10n.options.styles,i=mappl10n.options.style,r=["roadmap","satellite","terrain","hybrid"],t;if(i&&typeof n[i]!="undefined"&&u.setOptions({styles:n[i]}),f.editable){for(t in n)u.mapTypes.set(t,new google.maps.StyledMapType(n[t],{name:t})),r.push(t);u.setOptions({mapTypeControlOptions:{mapTypeIds:r,position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}})}else typeof n[f.mapTypeId]!="undefined"&&u.setOptions({styles:n[f.mapTypeId]})}function w(){e.controls.children("[data-mapp-position]").each(function(){var t=n(this).attr("data-mapp-position"),i;t=t?google.maps.ControlPosition[t]:google.maps.ControlPosition.TOP_RIGHT;i=n(this);i.get(0).index=0;u.controls[t].push(i.get(0))})}function b(){var e,i,t,r;for(s={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer},e=n.makeArray(f.layers),i=0;i<e.length;i++)t=n.trim(e[i]),r=t.split(".").pop(),s[t]?l(t):r=="kml"||r=="kmz"?s[t]=new google.maps.KmlLayer({map:u,preserveViewport:!0,url:t}):r=="json"&&(s[t]=new google.maps.Data({map:u}).loadGeoJson(t))}function l(t,i){n.each(["traffic","bicycling","transit"],function(n,t){s[t].setMap(null)});t&&(i=typeof i=="undefined"?s[t].getMap()==null:i,s[t].setMap(i?u:null))}function v(t,i){var r=n.inArray(t,["roadmap","satellite","terrain","hybrid"])!=-1;i=typeof i!="undefined"?i:!(u.getMapTypeId()==t);t=f.editable?i&&(r||typeof mappl10n.options.styles[t]!="undefined")?t:"roadmap":r?t:"roadmap";u.setMapTypeId(t)}this.defaults={center:null,editable:null,height:null,initialOpenDirections:null,initialOpenInfo:null,layers:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,pois:null,postid:null,query:null,title:null,width:null,zoom:null};this.iw=null;this.places=null;this.poi=null;this.settings=r?r:{};var f=this,h=null,e={},u=null,s={},o=[],c;_.extend(this,this.defaults,_.pick(t,_.keys(this.defaults)),_.pick(this.settings,_.keys(this.defaults)));this.display=function(){if(e.layout=n("#"+this.name),n.each(["canvas","controls","directions","filters","list","menu","search"],function(t,i){e[i]=n(".mapp-"+i,e.layout)}),!e.canvas.length)return mapp.lib.log("MapPress: Missing map name or container for map: "+this.name);u=new google.maps.Map(e.canvas.get(0),{mapTypeId:"roadmap",zoom:1});var t=_.extend({backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,keyboardShortcuts:!1,mapTypeControl:!0,mapTypeControlOptions:{position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},minZoom:0,scaleControl:!0,scrollwheel:!1,streetViewControl:!this.editable&&!this.query},this.mapOpts);t.minZoom=isNaN(parseInt(t.minZoom))?0:parseInt(t.minZoom);u.setOptions(t);p();w();b();v(this.mapTypeId,!0);this.places=new mapp.Places(n(".mapp-places",e.search),{map:f});f.editable||google.maps.event.addListener(this.places,"search",function(n){f.search(n)});e.layout.on("click","[data-mapp-action]",function(t){var i=n(this).attr("data-mapp-action");t.preventDefault();f.action(i,n(this).attr("data-mapp-"+i),n(this))});e.filters.on("change",function(){f.ajaxQuery(u.getBounds())});a("click drag",function(){f.closeInfoWindow()});n("body").on("click",function(t){var i=n(t.target),r=i.attr("data-mapp-action");i==e.filters||r=="filters-toggle"||i.closest(e.filters).length||f.toggleView("filters",!1);i==e.menu||r=="menu-toggle"||i.closest(e.menu).length||f.toggleView("menu",!1)});n(window).resize(function(){f.resize()});this.iw=mappl10n.options.iwType=="ib"||this.editable?new mapp.InfoBox(this):new google.maps.InfoWindow;google.maps.event.addListenerOnce(u,"idle",function(){var n=o.length?o[0]:null;f.initialOpenDirections?f.openDirections(null,n):n&&f.initialOpenInfo&&n.open()});mappl10n.options.search&&google.maps.event.addListenerOnce(u,"tilesloaded",function(){google.maps.event.addListenerOnce(u,"idle",function(){a("dragend zoom_changed",function(){f.ajaxQuery(u.getBounds())})})});this.query||this.setPois(this.pois);this.places.parse(this.center,function(n){f.query?n?f.search(n):f.ajaxQuery():(n&&n.geometry&&n.geometry.location&&(f.center=n.geometry.location.toJSON()),f.recenter())})};this.load=function(n){_.extend(this,this.defaults,n,this.settings);v(this.mapTypeId,!0);this.toggleView("menu",!1);l();this.closeInfoWindow();this.setPois(this.pois);this.places.set("");google.maps.event.trigger(this,"load")};this.action=function(t,i,r){switch(t){case"center":this.toggleView("menu",!1);this.closeInfoWindow();this.recenter();break;case"dir":this.openDirections(null,this.poi);break;case"dir-from":this.openDirections(this.poi,null);break;case"filters-reset":e.filters.find(":input").each(function(){this.type=="checkbox"||this.type=="radio"?n(this).prop("checked",!1):n(this).val("")});this.ajaxQuery(u.getBounds());break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":this.places.geolocate(function(n){n&&f.search(n)});break;case"layer":l(i);this.toggleView("menu",!1);break;case"menu-toggle":this.toggleView("menu");break;case"open":var s=r.attr("data-mapp-poi");this.openInfoWindow(o[s]);break;case"show":e.layout.show();this.resize();this.initCenter();break;case"view-map":this.toggleView("list",!1);break;case"view-list":this.toggleView("list",!0);break;case"viewport-set":this.center=u.getCenter().toJSON();this.zoom=u.getZoom();this.toggleView("menu",!1);break;case"viewport-reset":this.center=null;this.zoom=null;this.toggleView("menu",!1);this.recenter();break;default:return!0}};this.search=function(n){var t=n.geometry.location?n.geometry.location:null,i=n.geometry.viewport?n.geometry.viewport:null,r=new google.maps.Circle({center:t,radius:mappl10n.options.radius*1e3}),f=i?i.union(r.getBounds()):r.getBounds();u.fitBounds(f,0);u.setCenter(t);this.query&&this.ajaxQuery(f)};this.dialog=function(t,i){t?(e.canvas.append("<div class='mapp-dialog'>"+t+"<\/div>"),i&&(clearTimeout(this.dialog.fade),this.dialog.fade=setTimeout(function(){f.dialog(null)},3e3))):n(".mapp-dialog",e.canvas).remove()};this.closeInfoWindow=function(){this.iw.close();this.poiSelect(null)};this.openDirections=function(n,t){var i=n?n.getAddress():"",r=t?t.getAddress():"";h||(h=new mapp.Directions(e.directions,f));h.open(i,r)};this.poiSelect=function(t){if(n("[data-mapp-poi]",e.list).removeClass("mapp-selected"),t){var r=n.inArray(t,o),i=n('[data-mapp-poi="'+r+'"]',e.list);i.addClass("mapp-selected");mapp.lib.scrollTo(e.list,i);t.setZIndex(++c)}this.poi=t};this.getMap=function(){return u};this.renderList=function(){this.editable&&(e.list.html(mapp.lib.template("poi-list",{pois:o})),google.maps.event.trigger(this,"render-list"))};this.getPois=function(){return o};this.addPoi=function(n){o.unshift(n);n.setMap(this);f.renderList();this.poiSelect(n)};this.removePoi=function(t){var i=n.inArray(t,o);i!=-1&&(o[i].setMap(null),o.splice(i,1),f.renderList())};this.resetPois=function(){for(i=0;i<o.length;i++)o[i].setMap(null);o=[];c=google.maps.Marker.MAX_ZINDEX};this.setPois=function(n){var t,i;if(this.resetPois(),n){for(t=0;t<n.length;t++)i=new mapp.Poi(n[t]),o.push(i),i.setMap(this),i.setZIndex(c+n.length-1-t);c+=n.length-1}this.renderList()};this.sortPois=function(n){for(var r,t=Array(),i=0;i<n.length;i++){if(r=parseInt(n[i]),isNaN(r))return!1;t.push(o[r])}if(t.length!=o.length)return!1;o=t;this.renderList()};this.openInfoWindow=function(n,t){if(h&&h.close(),this.iw.close(),this.poiSelect(n),mappl10n.options.mashupClick!="poi"&&n.postid&&n.url){window.open(n.url);return}this.toggleView("list",!1);this.editable||this.iw.setContent(n.html);google.maps.event.addListenerOnce(this.iw,"domready",function(){google.maps.event.trigger(f,"poidomready",n)});google.maps.event.trigger(f,"open",n);var i=new google.maps.MVCObject;i.setValues({position:n.getPosition(t),anchorPoint:n.getAnchorPoint(t)});this.iw.open(u,i)};this.togglePois=function(n){n=!!n;for(var t=0;t<o.length;t++)o[t].setVisible(n)};this.toggleView=function(n,t){t=typeof t=="undefined"?!e.layout.hasClass("mapp-view-"+n):t;e.layout.toggleClass("mapp-view-"+n,t);n=="menu"&&t&&y();n=="directions"&&this.resize()};this.resize=function(){var n=u.getCenter();google.maps.event.trigger(u,"resize");u.setCenter(n)};this.recenter=function(){var i=!this.query&&this.center&&this.center.lat&&this.center.lng?new google.maps.LatLng(this.center.lat,this.center.lng):null,n=!this.query&&this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null,t,r;if(this.center&&this.center.lat==0&&this.center.lng==0&&(i=null),i){u.setCenter(i);u.setZoom(n?n:1);return}if(o.length==0){u.setCenter(new google.maps.LatLng(0,0));u.setZoom(n?n:1);return}if(o.length==1){o[0].center(n);return}for(bounds=new google.maps.LatLngBounds,t=0;t<o.length;t++)r=o[t].getBounds(),bounds=r?bounds.union(r):bounds.extend(o[t].getPosition());u.fitBounds(bounds,0)};this.toJSON=function(){var n;for(this.pois=[],n=0;n<o.length;n++)this.pois.push(o[n].toJSON());return{center:this.center,height:this.height,mapid:this.mapid,mapTypeId:u.getMapTypeId(),metaKey:this.metaKey,pois:this.pois,title:this.title,width:this.width,zoom:this.zoom}};this.ajaxSave=function(n){var t=JSON.stringify(this),i=!this.mapid||!this.postid?mappl10n.options.postid:this.postid;mapp.lib.ajax({type:"POST",data:{action:"mapp_save",map:t,postid:i},callback:function(t){t.status=="OK"&&(f.mapid=t.data.mapid,n(t.data),google.maps.event.trigger(f,"save"))}})}};mapp.Map.ajaxCreate=function(n,t){mapp.lib.ajax({type:"GET",data:{action:"mapp_create"},callback:function(i){if(i.status=="OK"){var r=new mapp.Map(i.data.map,n);t(r)}}})};mapp.Map.ajaxGet=function(n,t,i){mapp.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:n},callback:function(n){if(n.status=="OK"){var r=new mapp.Map(n.data.map,t);i(r)}}})};mapp.Map.ajaxDelete=function(n,t){mapp.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:n},callback:function(n){n.status=="OK"&&t&&t()}})}}(jQuery);mapp=window.mapp||{};+function(n){mapp.Directions=function(t,i){this.sel=n(t);this.map=i;this.directionsRenderer=null;this.directionsService=null;this.placesService=null;var r=this;this.sel.on("keydown",function(n){n.which==13?(r.getDirections(),n.preventDefault()):n.which==27&&r.close()});this.sel.on("click","[data-mapp-action]",function(t){var i=n(this).attr("data-mapp-action"),u=n(".mapp-dir-daddr",r.sel).val(),f=n(".mapp-dir-saddr",r.sel).val();t.preventDefault();switch(i){case"dir-cancel":r.close();break;case"dir-get":r.getDirections();break;case"dir-myloc":r.map.places.geolocate(function(t){t&&(n(".mapp-dir-saddr",r.sel).val(t.name),r.getDirections())});break;case"dir-swap":n(".mapp-dir-saddr",r.sel).val(u);n(".mapp-dir-daddr",r.sel).val(f);r.getDirections()}});this.open=function(t,i){if(mappl10n.options.directions=="google"){this.openGoogle(t,i);return}this.map.toggleView("directions",!0);n(".mapp-dir-addr",this.sel).removeClass("mapp-error");n(".mapp-dir-saddr",this.sel).val(t);n(".mapp-dir-daddr",this.sel).val(i);n(".mapp-dir-get",this.sel).focus();n(".mapp-dir-saddr",this.sel).focus()};this.close=function(){this.map.toggleView("directions",!1);this.directionsRenderer&&(this.directionsRenderer.setPanel(null),this.directionsRenderer.getMap()&&(this.directionsRenderer.setMap(null),this.map.togglePois(!0)))};this.getDirections=function(){var t;this.map.closeInfoWindow();n(".mapp-spinner",this.sel).css("visibility","visible");this.directionsService=this.directionsService?this.directionsService:new google.maps.DirectionsService;this.directionsRenderer=this.directionsRenderer?this.directionsRenderer:new google.maps.DirectionsRenderer({hideRouteList:!1,draggable:!0});this.placesService=this.placesService?this.placesService:new google.maps.places.PlacesService(this.map.getMap());n(".mapp-dir-renderer",this.sel).empty();t={travelMode:google.maps.DirectionsTravelMode.DRIVING,provideRouteAlternatives:!0,origin:n(".mapp-dir-saddr",this.sel).val(),destination:n(".mapp-dir-daddr",this.sel).val()};this.directionsService.route(t,function(t,i){(n(".mapp-spinner",r.sel).css("visibility","hidden"),n(".mapp-dir-addr",r.sel).removeClass("mapp-error"),n.each(t.geocoded_waypoints,function(t,i){n(".mapp-dir-addr",r.sel).eq(t).toggleClass("mapp-error",i.geocoder_status!="OK");i.place_id&&r.placesService.getDetails({placeId:i.place_id},function(i,u){if(u=="OK"){var f=i.formatted_address.replace(", USA","");f.indexOf(i.name)===-1&&(f=i.name+", "+f);n(".mapp-dir-addr",r.sel).eq(t).val(f)}})}),n(".mapp-dir-addr.mapp-error").length)||(i==google.maps.DirectionsStatus.OK?(r.map.togglePois(!1),r.directionsRenderer.setOptions({directions:t,map:r.map.getMap(),panel:n(".mapp-dir-renderer",r.sel).get(0)})):alert(mappl10n.dir_error+i))})};this.openGoogle=function(n,t){var i=mappl10n.options.directionsServer;i.toLowerCase().indexOf("http")==-1&&(i="https://"+i);i+="?saddr="+encodeURIComponent(n);i+="&daddr="+encodeURIComponent(t);window.open(i)}}}(jQuery);mapp=window.mapp||{};mapp.Geocoder=function(n){function r(n,t){jQuery(n).removeClass("mapp-error");jQuery(t).hide()}function u(n,t,i){jQuery(n).addClass("mapp-error");jQuery(t).html(i);jQuery(t).show()}var t,f,i=this;f=n;this.geocode=function(i,r){typeof i=="string"&&i.substring(0,1)=="("&&(split=i.replace(/\(|\)/g,"").split(","),i=new google.maps.LatLng(split[0],split[1]));var u=i instanceof google.maps.LatLng?{location:i}:{address:i,region:mappl10n.options.country,bounds:n.getBounds()};t||(t=new google.maps.Geocoder);t.geocode(u,function(n,t){if(n){for(var i=0;i<n.length;i++)n[i].formatted_address==""&&n.splice(i,1);r(n[0],t)}else r(null,t)})};this.geolocate=function(n){if(!navigator||!navigator.geolocation)return null;navigator.geolocation.getCurrentPosition(function(t){n(t)},function(){n(null)},{timeout:1e4,enableHighAccuracy:!0,maximumAge:3e4})};this.stringToLatLng=function(n){var t=n.split(",",2),i=Number(t[0]),r=Number(t[1]);return isNaN(i)||isNaN(r)?!1:new google.maps.LatLng(i,r)};this.geocodeField=function(n,t,i){r(n,t);checkAddress(n,t,jQuery(n).val(),function(r){if(!r){u(n,t,mappl10n.no_address);i(null);return}if(r&&r.formatted_address){jQuery(n).val(r.formatted_address);i(r.formatted_address);return}i(r);return})};this.autocompleteField=function(n,t,f,e,o){jQuery(n).keypress(function(i){i.which==13&&(checkAddress(n,t,jQuery(n).val(),o),i.preventDefault())});jQuery(f).click(function(){return checkAddress(n,t,jQuery(n).val(),o),!1});jQuery(e).click(function(){return r(n,t),i.geolocate(function(i){if(i){var r="("+i.coords.latitude+", "+i.coords.longitude+")";jQuery(n).val("");checkAddress(n,t,r,o)}else u(n,t,mappl10n.no_geolocate);return}),!1})};checkAddress=function(n,t,f,e){if(r(n,t),f=jQuery.trim(f),f==""){e(null);return}var o=i.stringToLatLng(f);if(o){e(o);return}if(f.substring(0,4)=="http"){e(f);return}i.geocode(f,function(i,r){if(!i||r!=google.maps.GeocoderStatus.OK){u(n,t,mappl10n.no_address);e(null);return}e(i);return})}};mapp.Geocoder.parseAddress=function(n){return!n||n==""?{firstLine:"",secondLine:""}:(n.lastIndexOf(", USA")>0||n.lastIndexOf(", United States")>0)&&(n.lastIndexOf(", USA")>0&&(n=n.slice(0,n.lastIndexOf(", USA"))),n.lastIndexOf(", United States")>0&&(n=n.slice(0,n.lastIndexOf(", United States"))),n.indexOf(",")==n.lastIndexOf(","))?{firstLine:n,secondLine:""}:n.indexOf(",")==-1?{firstLine:n,secondLine:""}:{firstLine:n.slice(0,n.indexOf(",")),secondLine:n.slice(n.indexOf(", ")+2)}};mapp=window.mapp||{};mapp.Icons={};mapp.Icons.get=function(){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"};mapp.Icons.getUrl=function(){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"};mapp=window.mapp||{};+function(n){mapp.InfoBox=function(t,i){var f=n.extend({border:20,disableAutoPan:!1},i),u=null,r=null,e=null,o=this;r=n('<div class="mapp-ib" tabindex="0">').appendTo(t.getMap().getDiv());e=n('<div class="mapp-ib-tip">').appendTo(t.getMap().getDiv());jQuery(window).resize(function(){o.close()});r.on("keydown",function(n){n.which==27&&o.close()});r.on("click",".mapp-close",function(){o.close()});this.getContent=function(){return r};this.setContent=function(n){r.empty().append(n)};this.open=function(n,t){u=t;this.setMap(n)};this.onAdd=function(){r.show();e.show();var t=n(":input",r);t.length?t.first().focus():r.focus();google.maps.event.trigger(o,"domready")};this.draw=function(){var l=this.getMap(),c=this.getProjection().fromLatLngToContainerPixel(u.position),t={width:n(l.getDiv()).width(),height:n(l.getDiv()).height()},v=n(".mapp-ib-body",r);if(!f.disableAutoPan){r.css({"max-height":"9999px",left:0,bottom:0,top:"auto",right:"auto"});var s=r.outerWidth(!0),h=r.outerHeight(!0),a=e.outerHeight(!0),i=c.x,o=c.y;i+s/2>t.width&&(i=t.width-s/2);i-s/2<0&&(i=s/2);o-h+u.anchorPoint.y-a<f.border&&(o=h-u.anchorPoint.y+f.border+a);o>t.height&&(o=t.height);l.panBy(c.x-i,c.y-o);h>t.height+u.anchorPoint.y-2*f.border&&(h=t.height+u.anchorPoint.y-2*f.border,r.css({"max-height":h+2}));r.css({left:i-s/2,bottom:t.height-o-u.anchorPoint.y+a});e.css({left:i,bottom:t.height-o-u.anchorPoint.y})}};this.close=function(){r.is(":visible")&&(this.setMap(null),google.maps.event.trigger(this,"closed"))};this.onRemove=function(){r.empty();r.hide();e.hide()}};mapp.InfoBox.prototype=new google.maps.OverlayView}(jQuery);mapp=window.mapp||{};+function(n){if(mapp.lib={ajax:function(t){var r=this,u,i;if(n.extend({type:"GET",cache:!1,data:null,spinner:null,callback:n.noop},t),t.cache)for(typeof mapp.lib.ajax.cache=="undefined"&&(mapp.lib.ajax.cache=[]),u=JSON.stringify(t.data),i=0;i<mapp.lib.ajax.cache.length;i++)if(mapp.lib.ajax.cache[i].hash==u){t.callback(mapp.lib.ajax.cache[i].response);return}return t.spinner&&t.spinner.show(),n.ajax({type:t.type,cache:!1,url:mappl10n.options.ajaxurl,data:t.data,success:function(n,i,u){if(t.spinner&&t.spinner.hide(),n.output){r.alert("AJAX Error\r\n"+n.output);return}if(n.status=="OK"){t.cache&&mapp.lib.ajax.cache.push({hash:JSON.stringify(t.data),response:n});t.callback&&t.callback(n,u);return}var f=typeof n=="object"?n.status:n;r.alert("AJAX ERROR\r\nResponse="+f+" TextStatus="+i+"\r\nResponseText="+u.responseText)},error:function(n,i,u){(t.spinner&&t.spinner.hide(),i!="cancel")&&typeof u!="undefined"&&u!=""&&r.alert("AJAX ERROR\r\nTextStatus="+i+"\r\nError="+u+"\r\nResponseText="+n.responseText)}})},alert:function(n){mappl10n.options.admin||mappl10n.options.debug?alert(n):window.console&&console.error(n)},fullscreen:function(n){var u=document.documentElement,i={requestFullscreen:"onfullscreenchange",webkitRequestFullscreen:"onwebkitfullscreenchange",mozRequestFullScreen:"onmozfullscreenchange",msRequestFullscreen:"onmsfullscreenchange"},t,r;for(t in i)u[t]&&(r=i[t],document[r]=n)},jqVersionCheck:function(t){if(typeof n=="undefined"||typeof t=="undefined")return!1;for(t=t.split("."),v=n.fn.jquery.split("."),i=0;i<t.length;i++){var r=parseInt(t[i]),u=typeof v[i]!="undefined"?parseInt(v[i]):0;if(u!=r)return u>r}return!0},log:function(n){window.console&&console.error(n)},scrollTo:function(n,t){if(n&&t&&n.length&&t.length){var i=n.scrollTop(),u=n.height(),r=i+t.position().top,f=r+t.outerHeight(!0);r<i?n.scrollTop(r):f>i+u&&n.scrollTop(f-u)}},template:function(t,i){if(mapp.lib.templates=mapp.lib.templates?mapp.lib.templates:{},!mapp.lib.templates[t]){var r=mappl10n.options.templates?mappl10n.options.template[t]:n("#mapp-tmpl-"+t).html();if(r)mapp.lib.templates[t]=_.template(r.replace(/[\n\r\t]/g,""),null,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g});else return""}return mapp.lib.templates[t](i)}},typeof google=="undefined")return mapp.lib.alert("ERROR: Google Maps API not loaded");if(!mappl10n.options.apiKey)return mapp.lib.alert("ERROR: Google Maps API Key missing, please check MapPress settings and FAQ");n(document).ready(function(){n('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1&&mapp.lib.alert("ERROR: Google Maps API key loaded multiple times, please see MapPress FAQ.")});mapp.lib.jqVersionCheck("1.7")||mapp.lib.alert("jQuery version is too old: "+n.fn.jquery);n("body").on("tabsactivate tabsshow",function(t,i){var r=i.newPanel?i.newPanel:i.panel;r&&n(".mapp-layout",r).each(function(){var i=n(this).attr("id"),t=window[i];t.resize();t.initCenter()})})}(jQuery);mapp=window.mapp||{};+function(n){mapp.Places=function(t,i){var r=this,u;if(this.sel=n(t),this.opts=n.extend({map:null,types:[]},i),u=n('<div style="display:none">').appendTo("body"),this.placesService=new google.maps.places.PlacesService(u.get(0)),this.autocompleteService=new google.maps.places.AutocompleteService,this.sel.length){this.autocomplete=new google.maps.places.Autocomplete(this.sel.get(0),{types:this.opts.types});this.autocomplete.bindTo("bounds",this.opts.map.getMap());this.sel.on("keydown",function(n){n.which==13&&n.preventDefault()});google.maps.event.addListener(this.autocomplete,"place_changed",function(){r.parse(this.getPlace(),function(n){n&&google.maps.event.trigger(r,"search",n)})})}};mapp.Places.prototype={parse:function(t,i){var u,e=this,r,o,f;if(this.error(!1),r=t&&t.name?n.trim(t.name):n.trim(t),!r){this.error(!0);i(null);return}if(r=="user"){this.geolocate(function(n){i(n)});return}if(r.substring(0,4)=="http"){i(r);return}if(t&&t.geometry){t.formatted_address&&this.set(t.formatted_address);i(t);return}if(o=this.parseLatLng(t),o){i(o);return}f=this.opts.map.getMap().getBounds();f=f?f:new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180));this.autocompleteService.getPlacePredictions({input:r,types:this.opts.types,bounds:f},function(n,t){if(t!="OK"||n==null||n.length==0){e.error(!0);i(null);return}u=typeof n[0].description!="undefined"?n[0].description:null;e.placesService.getDetails({placeId:n[0].place_id},function(n,t){if(t=="OK"&&n&&n.geometry){u=u?u:n.formatted_address;e.set(u);i(n);return}e.error(!0);i(null);return})})},parseLatLng:function(t){var i,u,r;return t instanceof google.maps.LatLng?i=t:t&&t.lat&&t.lng?i=new google.maps.LatLng(t.lat,t.lng):(u=t&&t.name?n.trim(t.name):n.trim(t),r=u.split(","),r.length!=2||isNaN(r[0])||isNaN(r[1])||(i=new google.maps.LatLng(r[0],r[1]))),i?{name:i.toUrlValue(),geometry:{location:i}}:null},geolocate:function(n){var t=this;if(!navigator||!navigator.geolocation){alert(mappl10n.no_geolocate);n(null);return}navigator.geolocation.getCurrentPosition(function(i){t.set("");var r=new google.maps.LatLng(i.coords.latitude,i.coords.longitude);n({name:r.toUrlValue(),geometry:{location:r}})},function(t){var i=t&&t.message?" : "+t.message:"";alert(mappl10n.no_geolocate+i);n(null)},{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4})},set:function(n){n=n.replace(", United States of America","").replace(", USA","").replace(", United States","");this.sel.val(n);this.error(!1)},get:function(){return n.trim(this.sel.val())},focus:function(){this.sel.focus()},error:function(n){this.sel.toggleClass("mapp-error",!!n)},destroy:function(){this.autocomplete.unbindAll();google.maps.event.clearInstanceListeners(this.sel.get(0))}}}(jQuery);mapp=window.mapp||{};+function(n){mapp.Poi=function(t){var f,e,r,s,i,u,h,o;if(this.defaults={address:null,body:null,html:null,iconid:null,kml:null,map:null,overlay:null,postid:null,title:"",url:null,type:null,viewport:null},n.extend(this,this.defaults,t),t&&t.correctedAddress&&(this.address=t.correctedAddress),t.viewport&&t.viewport.sw&&t.viewport.ne&&(f=new google.maps.LatLng(t.viewport.sw.lat,t.viewport.sw.lng),e=new google.maps.LatLng(t.viewport.ne.lat,t.viewport.ne.lng),this.viewport=f.lat()==0&&f.lng()==0&&e.lat()==0&&e.lng()==0?null:new google.maps.LatLngBounds(f,e)),r=[],s=[],!t.overlay)switch(this.type){case"polygon":if(t.poly&&t.poly.paths)for(i=0;i<t.poly.paths.length;i++){for(r=[],u=0;u<t.poly.paths[i].length;u++)r.push(new google.maps.LatLng(t.poly.paths[i][u].lat,t.poly.paths[i][u].lng));s.push(new google.maps.MVCArray(r))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(s)});this.setColors(t.poly);break;case"polyline":if(t.poly&&t.poly.path)for(i=0;i<t.poly.path.length;i++)r.push(new google.maps.LatLng(t.poly.path[i].lat,t.poly.path[i].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(r)});this.setColors(t.poly);break;case"circle":o=new google.maps.LatLng(t.point.lat,t.point.lng);this.overlay=new google.maps.Circle({center:o,radius:parseFloat(t.poly.radius)});this.setColors(t.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport});this.setColors(t.poly);break;case"kml":h=t.kml&&t.kml.url?t.kml.url:"";this.overlay=new google.maps.KmlLayer(h,{preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:o=new google.maps.LatLng(t.point.lat,t.point.lng);this.overlay=new google.maps.Marker({position:o})}};mapp.Poi.prototype={toJSON:function(){var n={address:this.address,body:this.body,correctedAddress:this.address,iconid:this.iconid,point:null,poly:null,title:this.title,type:this.type,viewport:null},r=this.getPosition(),t,i;if(n.point={lat:r.lat(),lng:r.lng()},t=this.viewport?this.viewport:this.getBounds(),t&&(n.viewport={sw:{lat:t.getSouthWest().lat(),lng:t.getSouthWest().lng()},ne:{lat:t.getNorthEast().lat(),lng:t.getNorthEast().lng()}}),this.type=="kml"&&(n.kml={url:this.overlay.getUrl()}),this.isPoly()){n.poly=this.getColors();switch(this.type){case"circle":n.poly.radius=this.overlay.getRadius();break;case"polyline":n.poly.path=[];this.overlay.getPath().forEach(function(t){n.poly.path.push({lat:t.lat(),lng:t.lng()})});break;case"polygon":n.poly.paths=[];this.overlay.getPaths().forEach(function(t){var i=[];t.forEach(function(n){i.push({lat:n.lat(),lng:n.lng()})});n.poly.paths.push(i)});break;case"rectangle":i=this.overlay.getBounds();n.viewport={sw:{lat:i.getSouthWest().lat(),lng:i.getSouthWest().lng()},ne:{lat:i.getNorthEast().lat(),lng:i.getNorthEast().lng()}}}}return n},setMap:function(t){var i=this;if(google.maps.event.clearInstanceListeners(this.overlay),t==null){this.overlay.setMap(null);return}this.type=="kml"&&(google.maps.event.addListener(this.overlay,"defaultviewport_changed",function(){i.viewport=i.overlay.getDefaultViewport()}),google.maps.event.addListener(this.overlay,"status_changed",function(){var n=i.overlay.getStatus();n!="OK"&&mappl10n.ajaxErrors&&alert(mappl10n.kml_error+":"+n)}));this.map=t;this.overlay.setMap(t.getMap());this.setEditable(this.map.editable);this.setIcon(this.iconid);this.type||this.overlay.setTitle(n("<div>").html(this.title).text());google.maps.event.addListener(this.overlay,"click",function(n){i.open(n)})},setEditable:function(n){var t=this;this.type!="kml"&&(this.overlay.setDraggable(n),this.isPoly()&&this.overlay.setEditable(n),google.maps.event.clearListeners(this.overlay,"rightclick"),google.maps.event.clearListeners(this.overlay,"dragstart"),n&&(google.maps.event.addListener(this.overlay,"dragstart",function(){t.viewport=null;t.map.closeInfoWindow()}),(this.type=="polygon"||this.type=="polyline")&&google.maps.event.addListener(this.overlay,"rightclick",function(n){n.vertex!=null&&t.overlay.getPath().getLength()>2&&t.overlay.getPath().removeAt(n.vertex)})))},setZIndex:function(n){this.overlay.set("zIndex",n)},select:function(){},setIcon:function(n){this.type||typeof mapp.Icons=="undefined"||(this.overlay.setIcon(null),this.overlay.setIcon(mapp.Icons.get(n)),this.iconid=n)},setVisible:function(n){typeof this.overlay.setVisible!="undefined"&&this.overlay.setVisible(n)},setColors:function(n){var i={};for(var t in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})n&&typeof n[t]!="undefined"&&(i[t]=n[t]);this.overlay.setOptions(i)},getColors:function(){var t={};for(var n in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})typeof this.overlay[n]!="undefined"&&(t[n]=this.overlay[n]);return t},center:function(t){var i=this.map.getMap(),u=this.getBounds(),r,t;if(typeof t=="number"){i.setCenter(this.getPosition());i.setZoom(t);return}if(!u){i.setCenter(this.getPosition());i.setZoom(parseInt(mappl10n.options.poiZoom));return}r=u.getNorthEast().lng()-u.getSouthWest().lng();r<0&&(r+=360);t=Math.round(Math.log(n(i.getDiv()).width()*360/r/256)/Math.LN2);i.setCenter(this.getPosition());i.setZoom(t)},open:function(n){this.map.openInfoWindow(this,n)},isPoly:function(){return jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])!=-1},getBounds:function(){var n;switch(this.type){case"polyline":n=new google.maps.LatLngBounds;this.overlay.getPath().forEach(function(t){n.extend(t)});break;case"polygon":n=new google.maps.LatLngBounds;this.overlay.getPaths().forEach(function(t){t.forEach(function(t){n.extend(t)})});break;case"rectangle":case"circle":n=this.overlay.getBounds();break;case"kml":n=this.overlay.getDefaultViewport();n=n?n:this.viewport;break;default:return this.viewport}return n},getPosition:function(n){if(!this.type)return this.overlay.getPosition();if(this.type=="kml"&&n&&n.latLng)return n.latLng;var t=this.getBounds();return t?t.getCenter():new google.maps.LatLng(0,0)},click:function(){google.maps.event.trigger(this.overlay,"click")},getAddress:function(){return this.address?this.address:this.type=="kml"?this.kml.url:this.getPosition().toUrlValue()},getAnchorPoint:function(n){return this.type=="kml"?n&&n.pixelOffset?new google.maps.Point(n.pixelOffset.width,n.pixelOffset.height):new google.maps.Point(0,0):this.type?new google.maps.Point(0,0):typeof this.overlay.anchorPoint!="undefined"?this.overlay.anchorPoint:new google.maps.Point(0,-32)}}}(jQuery);mapp=window.mapp||{};mapp.widgets={};+function(n){mapp.widgets.Grid=function(t,i){this.el=n(t);this.options=jQuery.extend({action:null,sortable:!1},i);var r=this;this.table=n("table",this.el);this.template=n("script",this.el).html().replace(new RegExp("'","g"),'"');this.el.on("click",function(t){var u=n(t.target),i=u.attr("data-mapp-action");i&&(r[i](t),t.preventDefault())})};mapp.widgets.Grid.prototype={add:function(){this.table.show();var t=n(this.template).appendTo(this.table);n(":input:eq(0)",t).focus()},remove:function(t){var i=n(t.target).closest("tr").remove();n("tbody > tr",this.table).length||this.table.hide()}}}(jQuery);+function(n){mapp.widgets.Popup=function(t,i){this.options=n.extend({destroy:!1,fullscreen:!1,modal:!1,position:null,toggle:null},i);this.activeToggle=null;var r=this;this.el=n('<div class="mapp-popup" tabindex="-1">').appendTo("body").hide();this.setContent(t);this.el.on("focusout",function(t){n.contains(r.el.get(0),t.relatedTarget)||r.el.get(0)==t.relatedTarget||r.close()});if(this.options.toggle)n(document).on("click",this.options.toggle,function(t){r.activeToggle=n(this);r.open();t.stopPropagation()});this.el.on("click",".mapp-close",function(){r.close()});this.el.on("keydown",function(n){n.which==27&&r.close()});return this};mapp.widgets.Popup.prototype={close:function(){this.el.is(":visible")&&(this.backdrop&&this.backdrop.remove(),n("body").removeClass("mapp-popup-open"),this.el.hide(),this.activeToggle.focus(),this.el.trigger("closed.mapp.popup"))},destroy:function(){this.el.remove();n(document).off("click.mapp.popup",function(){me.close()})},open:function(){var i=this,t;n(document).trigger("click.mapp.popup");this.el.trigger("open.mapp.popup");this.el.show();this.options.modal||this.el.position(n.extend({my:"center bottom",at:"center top-5",of:this.activeToggle,collision:"flipfit"},this.options.position));t=n(":input",this.el);t.length?t.first().focus():this.el.focus();this.options.modal&&(this.backdrop=n('<div class="mapp-backdrop"><\/div>'),this.el.after(this.backdrop),n("body").addClass("mapp-popup-open"))},setContent:function(n){this.el.empty();this.el.append('<span class="mapp-close">');this.el.append(n)},toggle:function(){this.el.is(":visible")?this.close():this.open()}}}(jQuery);+function(){mapp.load=function(){if(typeof mapp!="undefined"&&mapp.data)while(mapp.data.length){var n=mapp.data.pop();window[n.name]=new mapp.Map(n);window[n.name].display()}}}(jQuery);typeof mapp.Media!="undefined"?window.mappEditor=new mapp.Media:mapp.load()
languages/mappress-google-maps-for-wordpress.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the MapPress Easy Google Maps package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: MapPress Easy Google Maps 2.48.6\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
- "POT-Creation-Date: 2018-05-19 00:05:23+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -37,7 +37,7 @@ msgid "Cancel"
37
  msgstr ""
38
 
39
  #: forms/map_editor.php:51 languages/texts.php:46 mappress_controls.php:102
40
- #: mappress_map.php:586
41
  msgid "Delete"
42
  msgstr ""
43
 
@@ -58,7 +58,7 @@ msgid "Map Title"
58
  msgstr ""
59
 
60
  #: forms/map_media.php:20 languages/texts.php:51 mappress.php:624
61
- #: mappress_map.php:591
62
  msgid "Untitled"
63
  msgstr ""
64
 
@@ -66,7 +66,7 @@ msgstr ""
66
  msgid "Display Size"
67
  msgstr ""
68
 
69
- #: forms/map_media.php:39 languages/texts.php:19 mappress_map.php:585
70
  msgid "Insert into post"
71
  msgstr ""
72
 
@@ -227,11 +227,11 @@ msgstr ""
227
  msgid "Map not found"
228
  msgstr ""
229
 
230
- #: languages/texts.php:54 mappress_map.php:584
231
  msgid "Edit"
232
  msgstr ""
233
 
234
- #: languages/texts.php:55 mappress_map.php:442
235
  msgid "Show map"
236
  msgstr ""
237
 
@@ -903,7 +903,7 @@ msgstr ""
903
  msgid "Map Zoom"
904
  msgstr ""
905
 
906
- #: languages/texts.php:222 mappress_map.php:446 pro/mappress_widget.php:110
907
  msgid "Map"
908
  msgstr ""
909
 
@@ -996,7 +996,7 @@ msgstr ""
996
  msgid "Swap start and end"
997
  msgstr ""
998
 
999
- #: languages/texts.php:245 templates/map-directions.php:19
1000
  msgid "Get Directions"
1001
  msgstr ""
1002
 
@@ -1013,7 +1013,7 @@ msgid "MapPress Easy Google Maps"
1013
  msgstr ""
1014
 
1015
  #: languages/texts.php:249 languages/texts.php:252
1016
- msgid "http://www.wphostreviews.com/mappress"
1017
  msgstr ""
1018
 
1019
  #: languages/texts.php:250
@@ -1044,11 +1044,11 @@ msgstr ""
1044
  msgid "MapPress"
1045
  msgstr ""
1046
 
1047
- #: mappress_map.php:418 pro/mappress_pro_settings.php:33
1048
  msgid "Filter"
1049
  msgstr ""
1050
 
1051
- #: mappress_map.php:447
1052
  msgid "List"
1053
  msgstr ""
1054
 
@@ -1276,10 +1276,6 @@ msgstr ""
1276
  msgid "Clear center/zoom"
1277
  msgstr ""
1278
 
1279
- #: templates/map-directions.php:18
1280
- msgid "Google Maps"
1281
- msgstr ""
1282
-
1283
  #: templates/map-filters.php:9
1284
  msgid "Done"
1285
  msgstr ""
@@ -1292,7 +1288,7 @@ msgid "MapPress Easy Google Maps"
1292
  msgstr ""
1293
 
1294
  #. Plugin URI of the plugin/theme
1295
- msgid "http://www.wphostreviews.com/mappress"
1296
  msgstr ""
1297
 
1298
  #. Description of the plugin/theme
@@ -1304,5 +1300,5 @@ msgid "Chris Richardson"
1304
  msgstr ""
1305
 
1306
  #. Author URI of the plugin/theme
1307
- msgid "http://www.wphostreviews.com/mappress"
1308
  msgstr ""
2
  # This file is distributed under the same license as the MapPress Easy Google Maps package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: MapPress Easy Google Maps 2.48.7\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
+ "POT-Creation-Date: 2018-06-14 21:18:48+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
37
  msgstr ""
38
 
39
  #: forms/map_editor.php:51 languages/texts.php:46 mappress_controls.php:102
40
+ #: mappress_map.php:592
41
  msgid "Delete"
42
  msgstr ""
43
 
58
  msgstr ""
59
 
60
  #: forms/map_media.php:20 languages/texts.php:51 mappress.php:624
61
+ #: mappress_map.php:597
62
  msgid "Untitled"
63
  msgstr ""
64
 
66
  msgid "Display Size"
67
  msgstr ""
68
 
69
+ #: forms/map_media.php:39 languages/texts.php:19 mappress_map.php:591
70
  msgid "Insert into post"
71
  msgstr ""
72
 
227
  msgid "Map not found"
228
  msgstr ""
229
 
230
+ #: languages/texts.php:54 mappress_map.php:590
231
  msgid "Edit"
232
  msgstr ""
233
 
234
+ #: languages/texts.php:55 mappress_map.php:448
235
  msgid "Show map"
236
  msgstr ""
237
 
903
  msgid "Map Zoom"
904
  msgstr ""
905
 
906
+ #: languages/texts.php:222 mappress_map.php:452 pro/mappress_widget.php:110
907
  msgid "Map"
908
  msgstr ""
909
 
996
  msgid "Swap start and end"
997
  msgstr ""
998
 
999
+ #: languages/texts.php:245 templates/map-directions.php:16
1000
  msgid "Get Directions"
1001
  msgstr ""
1002
 
1013
  msgstr ""
1014
 
1015
  #: languages/texts.php:249 languages/texts.php:252
1016
+ msgid "https://www.mappresspro.com"
1017
  msgstr ""
1018
 
1019
  #: languages/texts.php:250
1044
  msgid "MapPress"
1045
  msgstr ""
1046
 
1047
+ #: mappress_map.php:424 pro/mappress_pro_settings.php:33
1048
  msgid "Filter"
1049
  msgstr ""
1050
 
1051
+ #: mappress_map.php:453
1052
  msgid "List"
1053
  msgstr ""
1054
 
1276
  msgid "Clear center/zoom"
1277
  msgstr ""
1278
 
 
 
 
 
1279
  #: templates/map-filters.php:9
1280
  msgid "Done"
1281
  msgstr ""
1288
  msgstr ""
1289
 
1290
  #. Plugin URI of the plugin/theme
1291
+ msgid "https://www.mappresspro.com"
1292
  msgstr ""
1293
 
1294
  #. Description of the plugin/theme
1300
  msgstr ""
1301
 
1302
  #. Author URI of the plugin/theme
1303
+ msgid "https://www.mappresspro.com"
1304
  msgstr ""
languages/texts.php CHANGED
@@ -247,7 +247,7 @@ __("Get Directions");
247
  __("Print");
248
  __("Close");
249
  __("MapPress Easy Google Maps");
250
- __("http://www.wphostreviews.com/mappress");
251
  __("MapPress makes it easy to insert Google Maps in WordPress posts and pages.");
252
  __("Chris Richardson");
253
  __("Loading");
@@ -313,12 +313,11 @@ __("Example: initialopeninfo=\"true\"");
313
  __("Menu");
314
  __("Set center/zoom");
315
  __("Clear center/zoom");
316
- __("Google Maps");
317
  __("Done");
318
  __("Reset");
319
  __("MapPress Easy Google Maps");
320
- __("http://www.wphostreviews.com/mappress");
321
  __("MapPress makes it easy to insert Google Maps in WordPress posts and pages.");
322
  __("Chris Richardson");
323
- __("http://www.wphostreviews.com/mappress");
324
  ?>
247
  __("Print");
248
  __("Close");
249
  __("MapPress Easy Google Maps");
250
+ __("https://www.mappresspro.com");
251
  __("MapPress makes it easy to insert Google Maps in WordPress posts and pages.");
252
  __("Chris Richardson");
253
  __("Loading");
313
  __("Menu");
314
  __("Set center/zoom");
315
  __("Clear center/zoom");
 
316
  __("Done");
317
  __("Reset");
318
  __("MapPress Easy Google Maps");
319
+ __("https://www.mappresspro.com");
320
  __("MapPress makes it easy to insert Google Maps in WordPress posts and pages.");
321
  __("Chris Richardson");
322
+ __("https://www.mappresspro.com");
323
  ?>
mappress.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
  /*
3
  Plugin Name: MapPress Easy Google Maps
4
- Plugin URI: http://www.wphostreviews.com/mappress
5
- Author URI: http://www.wphostreviews.com/mappress
6
  Description: MapPress makes it easy to insert Google Maps in WordPress posts and pages.
7
- Version: 2.48.6
8
  Author: Chris Richardson
9
  Text Domain: mappress-google-maps-for-wordpress
10
  Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
@@ -34,7 +34,7 @@ if (is_dir(dirname( __FILE__ ) . '/pro')) {
34
  }
35
 
36
  class Mappress {
37
- const VERSION = '2.48.6';
38
 
39
  static
40
  $baseurl,
@@ -165,10 +165,10 @@ class Mappress {
165
 
166
  static function get_support_links($title = 'MapPress') {
167
  $html = "<div class='mapp-support'>" . self::get_version_string();
168
- $html .= " | <a target='_blank' href='http://wphostreviews.com/mappress/mappress-documentation'>" . __('Documentation', 'mappress-google-maps-for-wordpress') . "</a>";
169
- $html .= " | <a target='_blank' href='http://wphostreviews.com/chris-contact'>" . __('Support', 'mappress-google-maps-for-wordpress') . "</a>";
170
  if (!self::$pro)
171
- $html .= "<a class='button button-primary' href='http://wphostreviews.com/mappress' target='_blank'>" . __('Upgrade to MapPress Pro', 'mappress-google-maps-for-wordpress') . "</a>";
172
  $html .= "</div>";
173
  echo $html;
174
  }
@@ -334,7 +334,7 @@ class Mappress {
334
  }
335
 
336
  static function wp_head() {
337
- echo "\r\n<!-- MapPress Easy Google Maps " . self::get_version_string() . " (http://www.wphostreviews.com/mappress) -->\r\n";
338
  echo "<script type='text/javascript'>mapp = window.mapp || {}; mapp.data = [];</script>\r\n";
339
  }
340
 
1
  <?php
2
  /*
3
  Plugin Name: MapPress Easy Google Maps
4
+ Plugin URI: https://www.mappresspro.com
5
+ Author URI: https://www.mappresspro.com
6
  Description: MapPress makes it easy to insert Google Maps in WordPress posts and pages.
7
+ Version: 2.48.7
8
  Author: Chris Richardson
9
  Text Domain: mappress-google-maps-for-wordpress
10
  Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
34
  }
35
 
36
  class Mappress {
37
+ const VERSION = '2.48.7';
38
 
39
  static
40
  $baseurl,
165
 
166
  static function get_support_links($title = 'MapPress') {
167
  $html = "<div class='mapp-support'>" . self::get_version_string();
168
+ $html .= " | <a target='_blank' href='https://mappresspro.com/mappress/mappress-documentation'>" . __('Documentation', 'mappress-google-maps-for-wordpress') . "</a>";
169
+ $html .= " | <a target='_blank' href='https://mappresspro.com/chris-contact'>" . __('Support', 'mappress-google-maps-for-wordpress') . "</a>";
170
  if (!self::$pro)
171
+ $html .= "<a class='button button-primary' href='https://mappresspro.com' target='_blank'>" . __('Upgrade to MapPress Pro', 'mappress-google-maps-for-wordpress') . "</a>";
172
  $html .= "</div>";
173
  echo $html;
174
  }
334
  }
335
 
336
  static function wp_head() {
337
+ echo "\r\n<!-- MapPress Easy Google Maps " . self::get_version_string() . " (https://www.mappresspro.com) -->\r\n";
338
  echo "<script type='text/javascript'>mapp = window.mapp || {}; mapp.data = [];</script>\r\n";
339
  }
340
 
mappress_map.php CHANGED
@@ -347,7 +347,13 @@ class Mappress_Map extends Mappress_Obj {
347
 
348
  $html = Mappress::get_template('map', array('map' => $this));
349
  $script = "mapp.data.push( " . json_encode($this) . " ); \r\nif (typeof mapp.load != 'undefined') { mapp.load(); };";
350
- $html .= Mappress::script($script);
 
 
 
 
 
 
351
  return $html;
352
  }
353
 
347
 
348
  $html = Mappress::get_template('map', array('map' => $this));
349
  $script = "mapp.data.push( " . json_encode($this) . " ); \r\nif (typeof mapp.load != 'undefined') { mapp.load(); };";
350
+
351
+ // Use inline scripts for XHTML and some themes which match tags (incorrectly) in the content
352
+ if (function_exists('wp_add_inline_script') && Mappress::$options->footer && (!defined('DOING_AJAX') || !DOING_AJAX))
353
+ wp_add_inline_script('mappress', "//<![CDATA[\r\n" . $script . "\r\n//]]>");
354
+ else
355
+ $html .= Mappress::script($script);
356
+
357
  return $html;
358
  }
359
 
mappress_settings.php CHANGED
@@ -173,7 +173,7 @@ class Mappress_Settings {
173
 
174
  function set_api_key($name) {
175
  echo Mappress_Controls::input($name, $this->options->apiKey, array('size' => '50'));
176
- $helpurl = "<a href='http://wphostreviews.com/mappress-faq' target='_blank'>" . __('more info', 'mappress-google-maps-for-wordpress') . "</a>";
177
  printf("<br/><i>%s %s</i>", __("Required to display maps", 'mappress-google-maps-for-wordpress'), $helpurl);
178
  }
179
 
173
 
174
  function set_api_key($name) {
175
  echo Mappress_Controls::input($name, $this->options->apiKey, array('size' => '50'));
176
+ $helpurl = "<a href='https://mappresspro.com/mappress-faq' target='_blank'>" . __('more info', 'mappress-google-maps-for-wordpress') . "</a>";
177
  printf("<br/><i>%s %s</i>", __("Required to display maps", 'mappress-google-maps-for-wordpress'), $helpurl);
178
  }
179
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: google maps,google,map,maps,easy,poi,mapping,mapper,gps,lat,lon,latitude,longitude,geocoder,geocoding,georss,geo rss,geo,v3,marker,mashup,mash,api,v3,buddypress,mashup,geo,wp-geo,geo mashup,simplemap,simple,wpml
5
  Requires at least: 3.5
6
  Tested up to: 4.9
7
- Stable tag: 2.48.6
8
 
9
  MapPress is the most popular and easiest way to create great-looking Google Maps and driving directions in your blog.
10
 
@@ -13,12 +13,12 @@ MapPress adds an interactive map to the wordpress editing screens. When editing
13
 
14
  The plugin will automatically insert a great-looking interactive map into your blog, with directions and custom map markers.
15
 
16
- For even more features, try [MapPress Pro](http://wphostreviews.com/mappress)
17
 
18
- [Home Page](http://www.wphostreviews.com/mappress)
19
- [Documentation](http://www.wphostreviews.com/mappress-documentation)
20
- [FAQ](http://www.wphostreviews.com/mappress-faq)
21
- [Support](http://www.wphostreviews.com/mappress-faq)
22
 
23
 
24
  = Key Features =
@@ -35,7 +35,7 @@ For even more features, try [MapPress Pro](http://wphostreviews.com/mappress)
35
  * New shortcodes with many parameters: "mapid" (to specify which map to show), "width" "height", "zoom", etc.
36
 
37
  = Pro Version Features =
38
- * Get the [MapPress Pro Version](http://wphostreviews.com/mappress) for additional functionality
39
  * Use marker icons in your maps - 100 standard icons included
40
  * Use your own custom icons or download thousands of icons from the web
41
  * Create mashups by taxonomy, tag, category, or post to show multiple locations on a single map
@@ -50,26 +50,26 @@ For even more features, try [MapPress Pro](http://wphostreviews.com/mappress)
50
  6. Street view of mashup location
51
 
52
  = Localization =
53
- Please [Contact me](http://wphostreviews.com/chris-contact) if you'd like to provide a translation or an update. Special thanks to all the folks who created and udpated translations.
54
 
55
  == Installation ==
56
 
57
- See full [installation intructions and Documentation](http://www.wphostreviews.com/mappress-documentation)
58
  1. Install and activate the plugin through the 'Plugins' menu in WordPress
59
  1. You should now see a MapPress meta box in in the 'edit posts' screen
60
 
61
- [Home Page](http://www.wphostreviews.com/mappress)
62
- [Documentation](http://www.wphostreviews.com/mappress-documentation)
63
- [FAQ](http://www.wphostreviews.com/mappress-faq)
64
- [Support](http://www.wphostreviews.com/forums)
65
 
66
  == Frequently Asked Questions ==
67
  Please see the plugin documentation pages:
68
 
69
- [Home Page](http://www.wphostreviews.com/mappress)
70
- [Documentation](http://www.wphostreviews.com/mappress-documentation)
71
- [FAQ](http://www.wphostreviews.com/mappress-faq)
72
- [Support](http://www.wphostreviews.com/forums)
73
 
74
  == Upgrade ==
75
 
@@ -86,8 +86,15 @@ Please see the plugin documentation pages:
86
 
87
  == Changelog ==
88
 
 
 
 
 
 
 
89
  = 2.48.6 =
90
  * Fixed: geocoding bug in editor
 
91
 
92
  = 2.48.5 =
93
  * Fixed: shake in editor caused by Google API update
4
  Tags: google maps,google,map,maps,easy,poi,mapping,mapper,gps,lat,lon,latitude,longitude,geocoder,geocoding,georss,geo rss,geo,v3,marker,mashup,mash,api,v3,buddypress,mashup,geo,wp-geo,geo mashup,simplemap,simple,wpml
5
  Requires at least: 3.5
6
  Tested up to: 4.9
7
+ Stable tag: 2.48.7
8
 
9
  MapPress is the most popular and easiest way to create great-looking Google Maps and driving directions in your blog.
10
 
13
 
14
  The plugin will automatically insert a great-looking interactive map into your blog, with directions and custom map markers.
15
 
16
+ For even more features, try [MapPress Pro](https://mappresspro.com/mappress)
17
 
18
+ [Home Page](https://mappresspro.com/mappress)
19
+ [Documentation](https://mappresspro.com/mappress-documentation)
20
+ [FAQ](https://mappresspro.com/mappress-faq)
21
+ [Support](https://mappresspro.com/mappress-faq)
22
 
23
 
24
  = Key Features =
35
  * New shortcodes with many parameters: "mapid" (to specify which map to show), "width" "height", "zoom", etc.
36
 
37
  = Pro Version Features =
38
+ * Get the [MapPress Pro Version](https://mappresspro.com/mappress) for additional functionality
39
  * Use marker icons in your maps - 100 standard icons included
40
  * Use your own custom icons or download thousands of icons from the web
41
  * Create mashups by taxonomy, tag, category, or post to show multiple locations on a single map
50
  6. Street view of mashup location
51
 
52
  = Localization =
53
+ Please [Contact me](https://mappresspro.com/chris-contact) if you'd like to provide a translation or an update. Special thanks to all the folks who created and udpated translations.
54
 
55
  == Installation ==
56
 
57
+ See full [installation intructions and Documentation](https://mappresspro.com/mappress-documentation)
58
  1. Install and activate the plugin through the 'Plugins' menu in WordPress
59
  1. You should now see a MapPress meta box in in the 'edit posts' screen
60
 
61
+ [Home Page](https://mappresspro.com/mappress)
62
+ [Documentation](https://mappresspro.com/mappress-documentation)
63
+ [FAQ](https://mappresspro.com/mappress-faq)
64
+ [Support](https://mappresspro.com/forums)
65
 
66
  == Frequently Asked Questions ==
67
  Please see the plugin documentation pages:
68
 
69
+ [Home Page](https://mappresspro.com/mappress)
70
+ [Documentation](https://mappresspro.com/mappress-documentation)
71
+ [FAQ](https://mappresspro.com/mappress-faq)
72
+ [Support](https://mappresspro.com/forums)
73
 
74
  == Upgrade ==
75
 
86
 
87
  == Changelog ==
88
 
89
+ = 2.48.7 =
90
+ * Fixed: restored inline directions form
91
+ * Changed: updated 'directions.php' template file and CSS
92
+ * Changed: updated plugin with new mappresspro.com URL
93
+ * Changed: re-added use of inline script functions for themes that match tags inside content (json) data
94
+
95
  = 2.48.6 =
96
  * Fixed: geocoding bug in editor
97
+ * Removed: drawingmanager
98
 
99
  = 2.48.5 =
100
  * Fixed: shake in editor caused by Google API update
templates/map-directions.php CHANGED
@@ -4,18 +4,15 @@
4
  <a href='#' class='mapp-myloc' data-mapp-action='dir-myloc'><?php _e('My location', 'mappress-google-maps-for-wordpress'); ?></a>
5
  <?php endif; ?>
6
  <div>
7
- <span class='mapp-dir-a'></span>
8
  <input class='mapp-dir-addr mapp-dir-saddr' tabindex='1'/>
9
  <span data-mapp-action='dir-swap' class='mapp-dir-arrows'></span>
10
  </div>
11
 
12
  <div>
13
- <span class='mapp-dir-b'></span>
14
  <input class='mapp-dir-addr mapp-dir-daddr' tabindex='2'/>
15
  </div>
16
 
17
  <div class='mapp-dir-toolbar'>
18
- <a class='mapp-dir-google' href='#' data-mapp-action='dir-google'><?php esc_html_e('Google Maps', 'mappress-google-maps-for-wordpress'); ?></a>
19
  <span class='mapp-button-submit' data-mapp-action='dir-get'><?php esc_html_e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></span>
20
  <span class='mapp-spinner'></span>
21
  </div>
4
  <a href='#' class='mapp-myloc' data-mapp-action='dir-myloc'><?php _e('My location', 'mappress-google-maps-for-wordpress'); ?></a>
5
  <?php endif; ?>
6
  <div>
 
7
  <input class='mapp-dir-addr mapp-dir-saddr' tabindex='1'/>
8
  <span data-mapp-action='dir-swap' class='mapp-dir-arrows'></span>
9
  </div>
10
 
11
  <div>
 
12
  <input class='mapp-dir-addr mapp-dir-daddr' tabindex='2'/>
13
  </div>
14
 
15
  <div class='mapp-dir-toolbar'>
 
16
  <span class='mapp-button-submit' data-mapp-action='dir-get'><?php esc_html_e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></span>
17
  <span class='mapp-spinner'></span>
18
  </div>