MapPress Easy Google Maps - Version 2.46.2

Version Description

  • Fixed: Pro version automatic updater communications errors
  • Fixed: icon picker was not working on MapPress settings page
Download this release

Release Info

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

Code changes from version 2.46.1 to 2.46.2

js/mappress.min.js CHANGED
@@ -1 +1 @@
1
- var mapp=window.mapp||{};+function(n){mapp.Map=function(t){function c(n,t){n=n.split(" ");for(var i=0;i<n.length;i++)google.maps.event.addListener(r,n[i],t)}function l(){var u,t;n("[data-mapp-type]",i.menu).removeClass("mapp-active");n('[data-mapp-type="'+r.getMapTypeId()+'"]',i.menu).addClass("mapp-active");for(layer in e)u=!!e[layer].getMap(),n('[data-mapp-layer="'+layer+'"]',i.menu).toggleClass("mapp-active",u);t=!!(f.center&&f.zoom);n('[data-mapp-action="viewport-set"]',i.menu).toggle(!t);n('[data-mapp-action="viewport-reset"]',i.menu).toggle(t)}function a(){var n=mappl10n.options.styles,i=mappl10n.options.style,u=["roadmap","satellite","terrain","hybrid"],t;if(i&&typeof n[i]!="undefined"&&r.setOptions({styles:n[i]}),f.editable){for(t in n)r.mapTypes.set(t,new google.maps.StyledMapType(n[t],{name:t})),u.push(t);r.setOptions({mapTypeControlOptions:{mapTypeIds:u,position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}})}else typeof n[f.mapTypeId]!="undefined"&&r.setOptions({styles:n[f.mapTypeId]})}function v(){i.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;r.controls[t].push(i.get(0))})}function y(){var o,i,t,u;for(e={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer},o=n.makeArray(f.options.layers),i=0;i<o.length;i++)t=n.trim(o[i]),u=t.split(".").pop(),e[t]?h(t):u=="kml"||u=="kmz"?e[t]=new google.maps.KmlLayer({map:r,preserveViewport:!0,url:t}):u=="json"&&(e[t]=new google.maps.Data({map:r}).loadGeoJson(t))}function h(t,i){i=typeof i!="undefined"?i:e[t].getMap()==null;n.each(["traffic","bicycling","transit"],function(n,t){e[t].setMap(null)});t&&e[t].setMap(i?r:null)}function p(t,i){var u=n.inArray(t,["roadmap","satellite","terrain","hybrid"])!=-1;i=typeof i!="undefined"?i:!(r.getMapTypeId()==t);t=f.editable?i&&(u||mappl10n.options.styles[t]!="undefined")?t:"roadmap":u?t:"roadmap";r.setMapTypeId(t)}this.center=t.center;this.height=t.height;this.mapid=t.mapid;this.mapTypeId=t.mapTypeId?t.mapTypeId:"roadmap";this.metaKey=t.metaKey;this.name=t.name;this.options=t.options;this.query=t.query;this.title=t.title;this.width=t.width;this.zoom=t.zoom?parseInt(t.zoom,10):null;this.editable=t.options.editable;this.iw=null;this.layers=t.options.layers;this.places=null;this.poi=null;var f=this,o=null,i={},r=null,e={},w=t.options,u=[],s;this.display=function(){if(i.layout=n("#"+this.name),i.canvas=n(".mapp-canvas",i.layout),i.controls=n(".mapp-controls",i.layout),i.dialog=n(".mapp-dialog",i.layout),i.dir=n(".mapp-directions",i.layout),i.filters=n(".mapp-filters",i.layout),i.list=n(".mapp-list",i.layout),i.menu=n(".mapp-menu",i.controls),!i.canvas.length)return mapp.lib.log("MapPress: Missing map name or container for map: "+this.name);r=new google.maps.Map(i.canvas.get(0),{mapTypeId:"roadmap",zoom:1});s=google.maps.Marker.MAX_ZINDEX;var u={backgroundColor:"transparent",fullscreenControl:!1,keyboardShortcuts:!1,mapTypeControl:!0,mapTypeControlOptions:{position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},scaleControl:!0,scrollwheel:!1,streetViewControl:!(this.editable||this.query)};r.setOptions(u);a();v();y();p(this.mapTypeId,!0);this.places=new mapp.Places(null,{gmap:r});google.maps.event.addListener(this.places,"search",function(n){f.search(n)});i.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))});i.filters.on("change",function(){f.ajaxQuery(r.getBounds())});c("click drag",function(){f.closeInfoWindow()});i.layout.on("click",function(t){var r=n(t.target),u=r.attr("data-mapp-action");r==i.filters||u=="filters-toggle"||r.closest(i.filters).length||f.toggleView("filters",!1);r==i.menu||u=="menu-toggle"||r.closest(i.menu).length||f.toggleView("menu",!1)});if(n(window).resize(function(){f.resize()}),this.iw=this.iw=mappl10n.options.iwType=="ib"||this.editable?new mapp.InfoBox(this):new google.maps.InfoWindow,mappl10n.options.directions!="none"&&(o=new mapp.Directions(i.dir,{map:f,directions:mappl10n.options.directions})),this.query){this.options.search?this.places.parse(this.options.search):this.ajaxQuery();return}google.maps.event.addListenerOnce(r,"idle",function(){f.initCenter()});this.setPois(t.pois);this.renderList()};this.action=function(t,f,e){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":i.filters.find(":input").each(function(){this.type=="checkbox"||this.type=="radio"?n(this).prop("checked",!1):n(this).val("")});this.ajaxQuery(r.getBounds());break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":this.places.geolocate();break;case"layer":h(f);this.toggleView("menu",!1);break;case"menu-toggle":this.toggleView("menu");break;case"open":var o=e.attr("data-mapp-poi");this.openInfoWindow(u[o]);break;case"show":i.layout.show();this.resize();this.initCenter();break;case"viewport-set":this.center=r.getCenter().toJSON();this.zoom=r.getZoom();this.toggleView("menu",!1);break;case"viewport-reset":this.center=null;this.zoom=null;this.toggleView("menu",!1);break;default:return!0}};this.closeInfoWindow=function(){this.iw.close();this.poiSelect(null)};this.openDirections=function(n,t){var i=n?n.getAddress():"",r=t?t.getAddress():"";o.open(i,r)};this.poiSelect=function(t){if(this.poi=t,n("[data-mapp-poi]",i.list).removeClass("mapp-selected"),t){var f=n.inArray(t,u),r=n('[data-mapp-poi="'+f+'"]',i.list);r.addClass("mapp-selected");mapp.lib.scrollTo(i.list,r);s++;t.setZIndex(s)}};this.getMap=function(){return r};this.renderList=function(){this.editable&&(i.list.html(mapp.lib.template("poi-list",{pois:u})),google.maps.event.trigger(this,"rendered"))};this.getPoi=function(n){return n=typeof n=="string"?parseInt(n,10):n,u[n]};this.getPoiById=function(n){for(var t=0;t<u.length;t++)if(u[t].postid==n)return u[t];return null};this.getPois=function(){return u};this.addPoi=function(n){u.unshift(n);n.setMap(this);f.renderList();this.poiSelect(n)};this.removePoi=function(t){var i=n.inArray(t,u);i!=-1&&(u[i].setMap(null),u.splice(i,1),f.renderList())};this.setPois=function(n){for(var i,t=0;t<u.length;t++)u[t].setMap(null);if(u=[],n){for(t=0;t<n.length;t++)i=new mapp.Poi,i.fromJSON(n[t]),u.push(i),i.setMap(this),i.setZIndex(s+n.length-1-t);s+=n.length-1}};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(u[r])}if(t.length!=u.length)return!1;u=t;this.renderList()};this.openInfoWindow=function(n,t){if(this.iw){if(o&&o.close(),this.iw.close(),this.poiSelect(n),!this.editable){if(this.options.mashupClick=="post"&&n.postid&&n.url){window.location.assign(n.url);return}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(r,i)}};this.togglePois=function(n){n=!!n;for(var t=0;t<u.length;t++)u[t].setVisible(n)};this.toggleView=function(n,t){t=typeof t=="undefined"?!i.layout.hasClass("mapp-view-"+n):t;i.layout.toggleClass("mapp-view-"+n,t);n=="menu"&&t&&l()};this.resize=function(){var n=r.getCenter();google.maps.event.trigger(r,"resize");r.setCenter(n);return};this.initCenter=function(){var n=u.length?u[0]:null;google.maps.event.addListenerOnce(r,"idle",function(){if(o&&f.options.initialOpenDirections){f.openDirections(null,n);return}f.options.initialOpenInfo&&n.open()});this.recenter()};this.recenter=function(){var f=!this.query&&this.center?new google.maps.LatLng(this.center.lat,this.center.lng):null,t=!this.query&&this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null,n,i;if(f){r.setCenter(f);r.setZoom(t?t:1);return}if(u.length==0){r.setCenter(new google.maps.LatLng(0,0));r.setZoom(1);return}if(u.length==1){u[0].center(t);return}for(bounds=new google.maps.LatLngBounds,n=0;n<u.length;n++)i=u[n].getBounds(),bounds=i?bounds.union(i):bounds.extend(u[n].getPosition());r.fitBounds(bounds)};this.toJSON=function(){for(var t={center:this.center,height:this.height,mapid:this.mapid,mapTypeId:r.getMapTypeId(),metaKey:this.metaKey,pois:[],title:this.title,width:this.width,zoom:this.zoom},n=0;n<u.length;n++)t.pois.push(u[n].toJSON());return t};this.ajaxSave=function(n){mapp.lib.ajax({type:"POST",data:{action:"mapp_save",map:JSON.stringify(this),postid:mappl10n.options.postid},callback:function(t){t.status=="OK"&&(f.mapid=t.data.mapid,n(t.data))}})}};mapp.Map.ajaxCreate=function(t,i,r){mapp.lib.ajax({type:"GET",data:{action:"mapp_create"},callback:function(u){if(u.status=="OK"){n.extend(u.data.map.options,i);u.data.map.name=t;var f=new mapp.Map(u.data.map);r(f)}}})};mapp.Map.ajaxGet=function(t,i,r,u){mapp.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:t},callback:function(t){if(t.status=="OK"){n.extend(t.data.map.options,r);t.data.map.name=i;var f=new mapp.Map(t.data.map);u(f)}}})};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){function h(t,i,o){var c=n(".mapp-travelmode-on > span",r).hasClass("mapp-dir-walk")?google.maps.DirectionsTravelMode.WALKING:n(".mapp-travelmode-on > span",r).hasClass("mapp-dir-transit")?google.maps.DirectionsTravelMode.TRANSIT:n(".mapp-travelmode-on > span",r).hasClass("mapp-dir-bike")?google.maps.DirectionsTravelMode.BICYCLING:google.maps.DirectionsTravelMode.DRIVING;var l={travelMode:c,transitOptions:{departureTime:null},provideRouteAlternatives:!0,origin:t,destination:i},h=n(".mapp-dir-renderer",r).get(0);n(".mapp-dir-renderer",r).empty();s||(s=new google.maps.DirectionsService);s.route(l,function(n,t){switch(t){case google.maps.DirectionsStatus.OK:f.opts.map.togglePois(!1);u?(u.setDirections(n),u.setMap(e),u.setPanel(h)):u=new google.maps.DirectionsRenderer({map:e,panel:h,directions:n,hideRouteList:!1,draggable:!0});break;case google.maps.DirectionsStatus.NOT_FOUND:alert(mappl10n.dir_error);break;case google.maps.DirectionsStatus.ZERO_RESULTS:alert(mappl10n.dir_error);break;default:alert(mappl10n.dir_error+t)}o()})}this.opts=n.extend({map:null,directions:null},i);var r=n(t),e,o,u,s,f=this;e=this.opts.map.getMap();o=new mapp.Geocoder(e);r.on("keydown",function(t){t.which==13?(f.getDirections(n(".mapp-dir-saddr",r).val(),n(".mapp-dir-daddr",r).val()),t.preventDefault()):t.which==27&&f.close()});r.on("click","[data-mapp-action]",function(t){var h=n(this).attr("data-mapp-action"),i,u,e,s;t.preventDefault();switch(h){case"dir-cancel":f.close();break;case"dir-get":f.getDirections();break;case"dir-google":i=n(".mapp-dir-saddr",r).val();u=n(".mapp-dir-daddr",r).val();f.openGoogle(i,u);f.close();break;case"dir-myloc":o.geolocate(function(t){t?n(".mapp-dir-saddr",r).val(t.coords.latitude+", "+t.coords.longitude):alert(mappl10n.no_geolocate)});break;case"dir-swap":e=n(".mapp-dir-daddr",r).val();s=n(".mapp-dir-saddr",r).val();n(".mapp-dir-saddr",r).val(e);n(".mapp-dir-daddr",r).val(s)}});this.open=function(t,i){if(this.opts.directions=="google"){this.openGoogle(t,i);return}this.opts.map.toggleView("directions",!0);n(".mapp-dir-saddr",r).val(t);n(".mapp-dir-daddr",r).val(i);n(".mapp-dir-get",r).focus();n(".mapp-dir-saddr",r).focus()};this.close=function(){this.opts.map.toggleView("directions",!1);u&&(u.setPanel(null),u.getMap()&&(u.setMap(null),this.opts.map.togglePois(!0)))};this.getDirections=function(){this.opts.map.closeInfoWindow();n(".mapp-spinner",r).show();var t=n(".mapp-dir-saddr",r),i=n(".mapp-dir-daddr",r),u=n(".mapp-dir-saddr-err",r),f=n(".mapp-dir-daddr-err",r);o.geocodeField(t,u,function(t){o.geocodeField(i,f,function(i){t&&i?h(t,i,function(){n(".mapp-spinner",r).hide();return}):n(".mapp-spinner",r).hide()})})};this.printDirections=function(){var i,t=n(".mapp-travelmode-on > span",r);i=t.hasClass("mapp-dir-walk")?"w":t.hasClass("mapp-dir-bike")?"b":t.hasClass("mapp-dir-transit")?"r":"d";this.openGoogle(n(".mapp-dir-saddr",r).val(),n(".mapp-dir-daddr",r).val(),i)};this.openGoogle=function(n,t,i){var r=mappl10n.options.directionsServer;r.toLowerCase().indexOf("http")==-1&&(r="https://"+r);r+="?saddr="+encodeURIComponent(n);r+="&daddr="+encodeURIComponent(t);i&&(r+="&dirflg="+i);window.open(r)}}}(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({disableAutoPan:!1,border:20},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.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.log(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.log(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(n.trim(r),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"]').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-canvas",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.opts.types||(this.opts.types=[]);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){if(n.which==13)return!1});google.maps.event.addListener(this.autocomplete,"place_changed",function(){u.parse(this.getPlace())})}};mapp.Places.prototype={parse:function(t){var u,i=this,r;if(this.error(!1),r=t&&t.name?n.trim(t.name):n.trim(t),!r)return this.error(!0);if(r=="geolocate")return this.geolocate();if(r.substring(0,4)=="http"||r.substring(0,3)=="kml"&&typeof typenow!="undefined"&&typenow=="mappress_map"){google.maps.event.trigger(i,"search",r=="kml"?"http://googlemaps.github.io/js-v2-samples/ggeoxml/cta.kml":r);return}if(t&&t.geometry){t.formatted_address&&this.set(t.formatted_address);google.maps.event.trigger(i,"search",t);return}if(latLngLoc=this.parseLatLng(t)){google.maps.event.trigger(i,"search",latLngLoc);return}this.autocompleteService.getPlacePredictions({input:r,types:this.opts.types,bounds:this.opts.map.getMap().getBounds()},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,r;return t instanceof google.maps.LatLng?i=t:t&&t.lat&&t.lng?i=new google.maps.LatLng(t.lat,t.lng):(name=t&&t.name?n.trim(t.name):n.trim(t),r=name.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(){var n=this;if(!navigator||!navigator.geolocation){alert(mappl10n.no_geolocate);return}navigator.geolocation.getCurrentPosition(function(t){n.set("");var i=new google.maps.LatLng(t.coords.latitude,t.coords.longitude),r={name:i.toUrlValue(),geometry:{location:i}};google.maps.event.trigger(n,"search",r)},function(){alert(mappl10n.no_geolocate)},{timeout:1e4,enableHighAccuracy:!0,maximumAge:3e4})},set:function(n){n=n.replace(", United States of America","").replace(", USA","").replace(", United States","");this.sel.blur();this.sel.val(n);this.sel.blur();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)}}}(jQuery);mapp=window.mapp||{};+function(n){mapp.Poi=function(){this.address=null;this.body=null;this.html=null;this.iconid=null;this.kml=null;this.map=null;this.overlay=null;this.postid=null;this.title="";this.url=null;this.type=null;this.viewport=null;for(var n in arguments[0])typeof arguments[0][n]!="undefined"&&(this[n]=arguments[0][n])};mapp.Poi.prototype={fromJSON:function(n){var u,f,i,o,t,r,s,e;this.address=n.correctedAddress;this.body=n.body;this.correctedAddress=n.correctedAddress;this.html=n.html;this.iconid=n.iconid;this.kml=n.kml;this.postid=n.postid;this.title=n.title;this.type=n.type;this.url=n.url;n.viewport&&n.viewport.sw&&n.viewport.ne&&(u=new google.maps.LatLng(n.viewport.sw.lat,n.viewport.sw.lng),f=new google.maps.LatLng(n.viewport.ne.lat,n.viewport.ne.lng),this.viewport=u.lat()==0&&u.lng()==0&&f.lat()==0&&f.lng()==0?null:new google.maps.LatLngBounds(u,f));i=[];o=[];switch(this.type){case"polygon":if(n.poly&&n.poly.paths)for(t=0;t<n.poly.paths.length;t++){for(i=[],r=0;r<n.poly.paths[t].length;r++)i.push(new google.maps.LatLng(n.poly.paths[t][r].lat,n.poly.paths[t][r].lng));o.push(new google.maps.MVCArray(i))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(o)});this.setColors(n.poly);break;case"polyline":if(n.poly&&n.poly.path)for(t=0;t<n.poly.path.length;t++)i.push(new google.maps.LatLng(n.poly.path[t].lat,n.poly.path[t].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(i)});this.setColors(n.poly);break;case"circle":e=new google.maps.LatLng(n.point.lat,n.point.lng);this.overlay=new google.maps.Circle({center:e,radius:parseFloat(n.poly.radius)});this.setColors(n.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport});this.setColors(n.poly);break;case"kml":s=n.kml&&n.kml.url?n.kml.url:"";this.overlay=new google.maps.KmlLayer(s,{preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:e=new google.maps.LatLng(n.point.lat,n.point.lng);this.overlay=new google.maps.Marker({position:e})}},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)})))},getZIndex:function(){return this.type?this.overlay.zIndex:this.overlay.getZIndex()},setZIndex:function(n){this.type?this.overlay.zIndex=n:this.overlay.setZIndex(n)},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(n){var t=this.map.getMap(),i=this.getBounds();if(typeof n=="number"){t.setCenter(this.getPosition());t.setZoom(n);return}i?(t.fitBounds(i),t.setCenter(this.getPosition())):(t.setCenter(this.getPosition()),t.setZoom(parseInt(mappl10n.options.poiZoom)))},open:function(n){this.map.openInfoWindow(this,n)},isPoly:function(){return jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])!=-1},getBounds:function(){var n;if(!this.map.editable&&this.viewport)return this.viewport;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?this.viewport:null}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(){mapp.load=function(){if(typeof mapp!="undefined"&&mapp.data)while(mapp.data.length){var n=mapp.data.pop(),t=new mapp.Map(n);window[n.name]=t;t.display()}}}(jQuery);typeof mapp.Media!="undefined"?window.mappEditor=new mapp.Media:mapp.load()
1
+ var mapp=window.mapp||{};+function(n){mapp.Map=function(t){function c(n,t){n=n.split(" ");for(var i=0;i<n.length;i++)google.maps.event.addListener(r,n[i],t)}function l(){var u,t;n("[data-mapp-type]",i.menu).removeClass("mapp-active");n('[data-mapp-type="'+r.getMapTypeId()+'"]',i.menu).addClass("mapp-active");for(layer in e)u=!!e[layer].getMap(),n('[data-mapp-layer="'+layer+'"]',i.menu).toggleClass("mapp-active",u);t=!!(f.center&&f.zoom);n('[data-mapp-action="viewport-set"]',i.menu).toggle(!t);n('[data-mapp-action="viewport-reset"]',i.menu).toggle(t)}function a(){var n=mappl10n.options.styles,i=mappl10n.options.style,u=["roadmap","satellite","terrain","hybrid"],t;if(i&&typeof n[i]!="undefined"&&r.setOptions({styles:n[i]}),f.editable){for(t in n)r.mapTypes.set(t,new google.maps.StyledMapType(n[t],{name:t})),u.push(t);r.setOptions({mapTypeControlOptions:{mapTypeIds:u,position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}})}else typeof n[f.mapTypeId]!="undefined"&&r.setOptions({styles:n[f.mapTypeId]})}function v(){i.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;r.controls[t].push(i.get(0))})}function y(){var o,i,t,u;for(e={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer},o=n.makeArray(f.options.layers),i=0;i<o.length;i++)t=n.trim(o[i]),u=t.split(".").pop(),e[t]?h(t):u=="kml"||u=="kmz"?e[t]=new google.maps.KmlLayer({map:r,preserveViewport:!0,url:t}):u=="json"&&(e[t]=new google.maps.Data({map:r}).loadGeoJson(t))}function h(t,i){i=typeof i!="undefined"?i:e[t].getMap()==null;n.each(["traffic","bicycling","transit"],function(n,t){e[t].setMap(null)});t&&e[t].setMap(i?r:null)}function p(t,i){var u=n.inArray(t,["roadmap","satellite","terrain","hybrid"])!=-1;i=typeof i!="undefined"?i:!(r.getMapTypeId()==t);t=f.editable?i&&(u||mappl10n.options.styles[t]!="undefined")?t:"roadmap":u?t:"roadmap";r.setMapTypeId(t)}this.center=t.center;this.height=t.height;this.mapid=t.mapid;this.mapTypeId=t.mapTypeId?t.mapTypeId:"roadmap";this.metaKey=t.metaKey;this.name=t.name;this.options=t.options;this.query=t.query;this.title=t.title;this.width=t.width;this.zoom=t.zoom?parseInt(t.zoom,10):null;this.editable=t.options.editable;this.iw=null;this.layers=t.options.layers;this.places=null;this.poi=null;var f=this,o=null,i={},r=null,e={},w=t.options,u=[],s;this.display=function(){if(i.layout=n("#"+this.name),i.canvas=n(".mapp-canvas",i.layout),i.controls=n(".mapp-controls",i.layout),i.dialog=n(".mapp-dialog",i.layout),i.dir=n(".mapp-directions",i.layout),i.filters=n(".mapp-filters",i.layout),i.list=n(".mapp-list",i.layout),i.menu=n(".mapp-menu",i.controls),!i.canvas.length)return mapp.lib.log("MapPress: Missing map name or container for map: "+this.name);r=new google.maps.Map(i.canvas.get(0),{mapTypeId:"roadmap",zoom:1});s=google.maps.Marker.MAX_ZINDEX;var u={backgroundColor:"transparent",fullscreenControl:!1,keyboardShortcuts:!1,mapTypeControl:!0,mapTypeControlOptions:{position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},scaleControl:!0,scrollwheel:!1,streetViewControl:!(this.editable||this.query)};r.setOptions(u);a();v();y();p(this.mapTypeId,!0);this.places=new mapp.Places(null,{gmap:r});google.maps.event.addListener(this.places,"search",function(n){f.search(n)});i.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))});i.filters.on("change",function(){f.ajaxQuery(r.getBounds())});c("click drag",function(){f.closeInfoWindow()});i.layout.on("click",function(t){var r=n(t.target),u=r.attr("data-mapp-action");r==i.filters||u=="filters-toggle"||r.closest(i.filters).length||f.toggleView("filters",!1);r==i.menu||u=="menu-toggle"||r.closest(i.menu).length||f.toggleView("menu",!1)});if(n(window).resize(function(){f.resize()}),this.iw=this.iw=mappl10n.options.iwType=="ib"||this.editable?new mapp.InfoBox(this):new google.maps.InfoWindow,mappl10n.options.directions!="none"&&(o=new mapp.Directions(i.dir,{map:f,directions:mappl10n.options.directions})),this.query){this.options.search?this.places.parse(this.options.search):this.ajaxQuery();return}google.maps.event.addListenerOnce(r,"idle",function(){f.initCenter()});this.setPois(t.pois);this.renderList()};this.action=function(t,f,e){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":i.filters.find(":input").each(function(){this.type=="checkbox"||this.type=="radio"?n(this).prop("checked",!1):n(this).val("")});this.ajaxQuery(r.getBounds());break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":this.places.geolocate();break;case"layer":h(f);this.toggleView("menu",!1);break;case"menu-toggle":this.toggleView("menu");break;case"open":var o=e.attr("data-mapp-poi");this.openInfoWindow(u[o]);break;case"show":i.layout.show();this.resize();this.initCenter();break;case"viewport-set":this.center=r.getCenter().toJSON();this.zoom=r.getZoom();this.toggleView("menu",!1);break;case"viewport-reset":this.center=null;this.zoom=null;this.toggleView("menu",!1);break;default:return!0}};this.closeInfoWindow=function(){this.iw.close();this.poiSelect(null)};this.openDirections=function(n,t){var i=n?n.getAddress():"",r=t?t.getAddress():"";o.open(i,r)};this.poiSelect=function(t){if(this.poi=t,n("[data-mapp-poi]",i.list).removeClass("mapp-selected"),t){var f=n.inArray(t,u),r=n('[data-mapp-poi="'+f+'"]',i.list);r.addClass("mapp-selected");mapp.lib.scrollTo(i.list,r);s++;t.setZIndex(s)}};this.getMap=function(){return r};this.renderList=function(){this.editable&&(i.list.html(mapp.lib.template("poi-list",{pois:u})),google.maps.event.trigger(this,"rendered"))};this.getPoi=function(n){return n=typeof n=="string"?parseInt(n,10):n,u[n]};this.getPoiById=function(n){for(var t=0;t<u.length;t++)if(u[t].postid==n)return u[t];return null};this.getPois=function(){return u};this.addPoi=function(n){u.unshift(n);n.setMap(this);f.renderList();this.poiSelect(n)};this.removePoi=function(t){var i=n.inArray(t,u);i!=-1&&(u[i].setMap(null),u.splice(i,1),f.renderList())};this.setPois=function(n){for(var i,t=0;t<u.length;t++)u[t].setMap(null);if(u=[],n){for(t=0;t<n.length;t++)i=new mapp.Poi,i.fromJSON(n[t]),u.push(i),i.setMap(this),i.setZIndex(s+n.length-1-t);s+=n.length-1}};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(u[r])}if(t.length!=u.length)return!1;u=t;this.renderList()};this.openInfoWindow=function(n,t){if(this.iw){if(o&&o.close(),this.iw.close(),this.poiSelect(n),!this.editable){if(this.options.mashupClick=="post"&&n.postid&&n.url){window.location.assign(n.url);return}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(r,i)}};this.togglePois=function(n){n=!!n;for(var t=0;t<u.length;t++)u[t].setVisible(n)};this.toggleView=function(n,t){t=typeof t=="undefined"?!i.layout.hasClass("mapp-view-"+n):t;i.layout.toggleClass("mapp-view-"+n,t);n=="menu"&&t&&l()};this.resize=function(){var n=r.getCenter();google.maps.event.trigger(r,"resize");r.setCenter(n);return};this.initCenter=function(){var n=u.length?u[0]:null;google.maps.event.addListenerOnce(r,"idle",function(){if(o&&f.options.initialOpenDirections){f.openDirections(null,n);return}n&&f.options.initialOpenInfo&&n.open()});this.recenter()};this.recenter=function(){var f=!this.query&&this.center?new google.maps.LatLng(this.center.lat,this.center.lng):null,t=!this.query&&this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null,n,i;if(f){r.setCenter(f);r.setZoom(t?t:1);return}if(u.length==0){r.setCenter(new google.maps.LatLng(0,0));r.setZoom(1);return}if(u.length==1){u[0].center(t);return}for(bounds=new google.maps.LatLngBounds,n=0;n<u.length;n++)i=u[n].getBounds(),bounds=i?bounds.union(i):bounds.extend(u[n].getPosition());r.fitBounds(bounds)};this.toJSON=function(){for(var t={center:this.center,height:this.height,mapid:this.mapid,mapTypeId:r.getMapTypeId(),metaKey:this.metaKey,pois:[],title:this.title,width:this.width,zoom:this.zoom},n=0;n<u.length;n++)t.pois.push(u[n].toJSON());return t};this.ajaxSave=function(n){mapp.lib.ajax({type:"POST",data:{action:"mapp_save",map:JSON.stringify(this),postid:mappl10n.options.postid},callback:function(t){t.status=="OK"&&(f.mapid=t.data.mapid,n(t.data))}})}};mapp.Map.ajaxCreate=function(t,i,r){mapp.lib.ajax({type:"GET",data:{action:"mapp_create"},callback:function(u){if(u.status=="OK"){n.extend(u.data.map.options,i);u.data.map.name=t;var f=new mapp.Map(u.data.map);r(f)}}})};mapp.Map.ajaxGet=function(t,i,r,u){mapp.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:t},callback:function(t){if(t.status=="OK"){n.extend(t.data.map.options,r);t.data.map.name=i;var f=new mapp.Map(t.data.map);u(f)}}})};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){function h(t,i,o){var c=n(".mapp-travelmode-on > span",r).hasClass("mapp-dir-walk")?google.maps.DirectionsTravelMode.WALKING:n(".mapp-travelmode-on > span",r).hasClass("mapp-dir-transit")?google.maps.DirectionsTravelMode.TRANSIT:n(".mapp-travelmode-on > span",r).hasClass("mapp-dir-bike")?google.maps.DirectionsTravelMode.BICYCLING:google.maps.DirectionsTravelMode.DRIVING;var l={travelMode:c,transitOptions:{departureTime:null},provideRouteAlternatives:!0,origin:t,destination:i},h=n(".mapp-dir-renderer",r).get(0);n(".mapp-dir-renderer",r).empty();s||(s=new google.maps.DirectionsService);s.route(l,function(n,t){switch(t){case google.maps.DirectionsStatus.OK:f.opts.map.togglePois(!1);u?(u.setDirections(n),u.setMap(e),u.setPanel(h)):u=new google.maps.DirectionsRenderer({map:e,panel:h,directions:n,hideRouteList:!1,draggable:!0});break;case google.maps.DirectionsStatus.NOT_FOUND:alert(mappl10n.dir_error);break;case google.maps.DirectionsStatus.ZERO_RESULTS:alert(mappl10n.dir_error);break;default:alert(mappl10n.dir_error+t)}o()})}this.opts=n.extend({map:null,directions:null},i);var r=n(t),e,o,u,s,f=this;e=this.opts.map.getMap();o=new mapp.Geocoder(e);r.on("keydown",function(t){t.which==13?(f.getDirections(n(".mapp-dir-saddr",r).val(),n(".mapp-dir-daddr",r).val()),t.preventDefault()):t.which==27&&f.close()});r.on("click","[data-mapp-action]",function(t){var h=n(this).attr("data-mapp-action"),i,u,e,s;t.preventDefault();switch(h){case"dir-cancel":f.close();break;case"dir-get":f.getDirections();break;case"dir-google":i=n(".mapp-dir-saddr",r).val();u=n(".mapp-dir-daddr",r).val();f.openGoogle(i,u);f.close();break;case"dir-myloc":o.geolocate(function(t){t?n(".mapp-dir-saddr",r).val(t.coords.latitude+", "+t.coords.longitude):alert(mappl10n.no_geolocate)});break;case"dir-swap":e=n(".mapp-dir-daddr",r).val();s=n(".mapp-dir-saddr",r).val();n(".mapp-dir-saddr",r).val(e);n(".mapp-dir-daddr",r).val(s)}});this.open=function(t,i){if(this.opts.directions=="google"){this.openGoogle(t,i);return}this.opts.map.toggleView("directions",!0);n(".mapp-dir-saddr",r).val(t);n(".mapp-dir-daddr",r).val(i);n(".mapp-dir-get",r).focus();n(".mapp-dir-saddr",r).focus()};this.close=function(){this.opts.map.toggleView("directions",!1);u&&(u.setPanel(null),u.getMap()&&(u.setMap(null),this.opts.map.togglePois(!0)))};this.getDirections=function(){this.opts.map.closeInfoWindow();n(".mapp-spinner",r).show();var t=n(".mapp-dir-saddr",r),i=n(".mapp-dir-daddr",r),u=n(".mapp-dir-saddr-err",r),f=n(".mapp-dir-daddr-err",r);o.geocodeField(t,u,function(t){o.geocodeField(i,f,function(i){t&&i?h(t,i,function(){n(".mapp-spinner",r).hide();return}):n(".mapp-spinner",r).hide()})})};this.printDirections=function(){var i,t=n(".mapp-travelmode-on > span",r);i=t.hasClass("mapp-dir-walk")?"w":t.hasClass("mapp-dir-bike")?"b":t.hasClass("mapp-dir-transit")?"r":"d";this.openGoogle(n(".mapp-dir-saddr",r).val(),n(".mapp-dir-daddr",r).val(),i)};this.openGoogle=function(n,t,i){var r=mappl10n.options.directionsServer;r.toLowerCase().indexOf("http")==-1&&(r="https://"+r);r+="?saddr="+encodeURIComponent(n);r+="&daddr="+encodeURIComponent(t);i&&(r+="&dirflg="+i);window.open(r)}}}(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({disableAutoPan:!1,border:20},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.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.log(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.log(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(n.trim(r),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"]').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-canvas",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.opts.types||(this.opts.types=[]);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){if(n.which==13)return!1});google.maps.event.addListener(this.autocomplete,"place_changed",function(){u.parse(this.getPlace())})}};mapp.Places.prototype={parse:function(t){var u,i=this,r;if(this.error(!1),r=t&&t.name?n.trim(t.name):n.trim(t),!r)return this.error(!0);if(r=="geolocate")return this.geolocate();if(r.substring(0,4)=="http"||r.substring(0,3)=="kml"&&typeof typenow!="undefined"&&typenow=="mappress_map"){google.maps.event.trigger(i,"search",r=="kml"?"http://googlemaps.github.io/js-v2-samples/ggeoxml/cta.kml":r);return}if(t&&t.geometry){t.formatted_address&&this.set(t.formatted_address);google.maps.event.trigger(i,"search",t);return}if(latLngLoc=this.parseLatLng(t)){google.maps.event.trigger(i,"search",latLngLoc);return}this.autocompleteService.getPlacePredictions({input:r,types:this.opts.types,bounds:this.opts.map.getMap().getBounds()},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,r;return t instanceof google.maps.LatLng?i=t:t&&t.lat&&t.lng?i=new google.maps.LatLng(t.lat,t.lng):(name=t&&t.name?n.trim(t.name):n.trim(t),r=name.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(){var n=this;if(!navigator||!navigator.geolocation){alert(mappl10n.no_geolocate);return}navigator.geolocation.getCurrentPosition(function(t){n.set("");var i=new google.maps.LatLng(t.coords.latitude,t.coords.longitude),r={name:i.toUrlValue(),geometry:{location:i}};google.maps.event.trigger(n,"search",r)},function(){alert(mappl10n.no_geolocate)},{timeout:1e4,enableHighAccuracy:!0,maximumAge:3e4})},set:function(n){n=n.replace(", United States of America","").replace(", USA","").replace(", United States","");this.sel.blur();this.sel.val(n);this.sel.blur();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)}}}(jQuery);mapp=window.mapp||{};+function(n){mapp.Poi=function(){this.address=null;this.body=null;this.html=null;this.iconid=null;this.kml=null;this.map=null;this.overlay=null;this.postid=null;this.title="";this.url=null;this.type=null;this.viewport=null;for(var n in arguments[0])typeof arguments[0][n]!="undefined"&&(this[n]=arguments[0][n])};mapp.Poi.prototype={fromJSON:function(n){var u,f,i,o,t,r,s,e;this.address=n.correctedAddress;this.body=n.body;this.correctedAddress=n.correctedAddress;this.html=n.html;this.iconid=n.iconid;this.kml=n.kml;this.postid=n.postid;this.title=n.title;this.type=n.type;this.url=n.url;n.viewport&&n.viewport.sw&&n.viewport.ne&&(u=new google.maps.LatLng(n.viewport.sw.lat,n.viewport.sw.lng),f=new google.maps.LatLng(n.viewport.ne.lat,n.viewport.ne.lng),this.viewport=u.lat()==0&&u.lng()==0&&f.lat()==0&&f.lng()==0?null:new google.maps.LatLngBounds(u,f));i=[];o=[];switch(this.type){case"polygon":if(n.poly&&n.poly.paths)for(t=0;t<n.poly.paths.length;t++){for(i=[],r=0;r<n.poly.paths[t].length;r++)i.push(new google.maps.LatLng(n.poly.paths[t][r].lat,n.poly.paths[t][r].lng));o.push(new google.maps.MVCArray(i))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(o)});this.setColors(n.poly);break;case"polyline":if(n.poly&&n.poly.path)for(t=0;t<n.poly.path.length;t++)i.push(new google.maps.LatLng(n.poly.path[t].lat,n.poly.path[t].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(i)});this.setColors(n.poly);break;case"circle":e=new google.maps.LatLng(n.point.lat,n.point.lng);this.overlay=new google.maps.Circle({center:e,radius:parseFloat(n.poly.radius)});this.setColors(n.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport});this.setColors(n.poly);break;case"kml":s=n.kml&&n.kml.url?n.kml.url:"";this.overlay=new google.maps.KmlLayer(s,{preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:e=new google.maps.LatLng(n.point.lat,n.point.lng);this.overlay=new google.maps.Marker({position:e})}},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)})))},getZIndex:function(){return this.type?this.overlay.zIndex:this.overlay.getZIndex()},setZIndex:function(n){this.type?this.overlay.zIndex=n:this.overlay.setZIndex(n)},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(n){var t=this.map.getMap(),i=this.getBounds();if(typeof n=="number"){t.setCenter(this.getPosition());t.setZoom(n);return}i?(t.fitBounds(i),t.setCenter(this.getPosition())):(t.setCenter(this.getPosition()),t.setZoom(parseInt(mappl10n.options.poiZoom)))},open:function(n){this.map.openInfoWindow(this,n)},isPoly:function(){return jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])!=-1},getBounds:function(){var n;if(!this.map.editable&&this.viewport)return this.viewport;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?this.viewport:null}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(){mapp.load=function(){if(typeof mapp!="undefined"&&mapp.data)while(mapp.data.length){var n=mapp.data.pop(),t=new mapp.Map(n);window[n.name]=t;t.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.46.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
- "POT-Creation-Date: 2017-09-06 15:07:25+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -97,43 +97,43 @@ msgstr ""
97
  msgid "Size"
98
  msgstr ""
99
 
100
- #: languages/texts.php:20 mappress.php:132
101
  msgid "Version"
102
  msgstr ""
103
 
104
- #: languages/texts.php:21 mappress.php:140
105
  msgid "Documentation"
106
  msgstr ""
107
 
108
- #: languages/texts.php:22 mappress.php:141
109
  msgid "Support"
110
  msgstr ""
111
 
112
- #: languages/texts.php:23 mappress.php:143
113
  msgid "Upgrade to MapPress Pro"
114
  msgstr ""
115
 
116
- #: languages/texts.php:24 mappress.php:415
117
  msgid "MapPress database tables are missing. Please deactivate the plugin and activate it again to fix this."
118
  msgstr ""
119
 
120
- #: languages/texts.php:25 mappress.php:420
121
  msgid "WARNING: MapPress now requires WordPress 3.2 or higher. Please upgrade before using MapPress."
122
  msgstr ""
123
 
124
- #: languages/texts.php:26 mappress.php:425
125
  msgid "WARNING: MapPress is not compfatible with the WP-Geo plugin. Please deactivate or uninstall WP-Geo before using MapPress."
126
  msgstr ""
127
 
128
- #: languages/texts.php:27 mappress.php:432
129
  msgid "A Google Maps API key is required"
130
  msgstr ""
131
 
132
- #: languages/texts.php:28 mappress.php:432
133
  msgid "Please update your"
134
  msgstr ""
135
 
136
- #: languages/texts.php:29 mappress.php:432
137
  msgid "MapPress Settings"
138
  msgstr ""
139
 
@@ -651,15 +651,15 @@ msgstr ""
651
  msgid "Reset Defaults"
652
  msgstr ""
653
 
654
- #: languages/texts.php:160 mappress.php:126
655
  msgid "Settings"
656
  msgstr ""
657
 
658
- #: languages/texts.php:161 pro/mappress_updater.php:127
659
  msgid "download it now"
660
  msgstr ""
661
 
662
- #: languages/texts.php:162 pro/mappress_updater.php:131
663
  msgid "A PRO Version update is available for manual installation: %s"
664
  msgstr ""
665
 
@@ -1201,6 +1201,14 @@ msgstr ""
1201
  msgid "or "
1202
  msgstr ""
1203
 
 
 
 
 
 
 
 
 
1204
  #: pro/mappress_widget.php:124
1205
  msgid "Example: initialopeninfo=\"true\""
1206
  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.46.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
+ "POT-Creation-Date: 2017-09-07 15:07:25+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
97
  msgid "Size"
98
  msgstr ""
99
 
100
+ #: languages/texts.php:20 mappress.php:134
101
  msgid "Version"
102
  msgstr ""
103
 
104
+ #: languages/texts.php:21 mappress.php:142
105
  msgid "Documentation"
106
  msgstr ""
107
 
108
+ #: languages/texts.php:22 mappress.php:143
109
  msgid "Support"
110
  msgstr ""
111
 
112
+ #: languages/texts.php:23 mappress.php:145
113
  msgid "Upgrade to MapPress Pro"
114
  msgstr ""
115
 
116
+ #: languages/texts.php:24 mappress.php:417
117
  msgid "MapPress database tables are missing. Please deactivate the plugin and activate it again to fix this."
118
  msgstr ""
119
 
120
+ #: languages/texts.php:25 mappress.php:422
121
  msgid "WARNING: MapPress now requires WordPress 3.2 or higher. Please upgrade before using MapPress."
122
  msgstr ""
123
 
124
+ #: languages/texts.php:26 mappress.php:427
125
  msgid "WARNING: MapPress is not compfatible with the WP-Geo plugin. Please deactivate or uninstall WP-Geo before using MapPress."
126
  msgstr ""
127
 
128
+ #: languages/texts.php:27 mappress.php:434
129
  msgid "A Google Maps API key is required"
130
  msgstr ""
131
 
132
+ #: languages/texts.php:28 mappress.php:434
133
  msgid "Please update your"
134
  msgstr ""
135
 
136
+ #: languages/texts.php:29 mappress.php:434
137
  msgid "MapPress Settings"
138
  msgstr ""
139
 
651
  msgid "Reset Defaults"
652
  msgstr ""
653
 
654
+ #: languages/texts.php:160 mappress.php:128
655
  msgid "Settings"
656
  msgstr ""
657
 
658
+ #: languages/texts.php:161 pro/mappress_updater.php:136
659
  msgid "download it now"
660
  msgstr ""
661
 
662
+ #: languages/texts.php:162 pro/mappress_updater.php:140
663
  msgid "A PRO Version update is available for manual installation: %s"
664
  msgstr ""
665
 
1201
  msgid "or "
1202
  msgstr ""
1203
 
1204
+ #: pro/mappress_updater.php:104
1205
+ msgid "Communication error"
1206
+ msgstr ""
1207
+
1208
+ #: pro/mappress_updater.php:107
1209
+ msgid "JSON error"
1210
+ msgstr ""
1211
+
1212
  #: pro/mappress_widget.php:124
1213
  msgid "Example: initialopeninfo=\"true\""
1214
  msgstr ""
languages/texts.php CHANGED
@@ -294,6 +294,8 @@ __("Sort POI list by title");
294
  __("Styled Maps Wizard");
295
  __("JSON from Google's %s");
296
  __("or ");
 
 
297
  __("Example: initialopeninfo=\"true\"");
298
  __("Menu");
299
  __("Set center/zoom");
294
  __("Styled Maps Wizard");
295
  __("JSON from Google's %s");
296
  __("or ");
297
+ __("Communication error");
298
+ __("JSON error");
299
  __("Example: initialopeninfo=\"true\"");
300
  __("Menu");
301
  __("Set center/zoom");
mappress.php CHANGED
@@ -4,7 +4,7 @@ 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.46.1
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.46.1';
38
 
39
  static
40
  $baseurl,
@@ -100,12 +100,14 @@ class Mappress {
100
 
101
  static function debugging() {
102
  global $wpdb;
103
- $posts_table = $wpdb->prefix . 'mappress_posts';
104
 
105
  if (isset($_GET['mp_info'])) {
106
  echo "<b>Plugin version</b> " . self::get_version_string();
107
  foreach(array('language', 'wpurl', 'url') as $info)
108
  printf("<br/>%s : %s", $info, get_bloginfo($info));
 
 
 
109
  die();
110
  }
111
 
@@ -545,6 +547,7 @@ class Mappress {
545
  $language = ($language) ? "&language=$language" : '';
546
 
547
  wp_enqueue_script("mappress-gmaps", "https://maps.googleapis.com/maps/api/js?{$apiversion}{$language}{$libstring}{$apikey}", null, null, $footer);
 
548
 
549
  if ($type == 'editor')
550
  wp_enqueue_script('mappress_editor', $js . "/mappress_editor$min.js", array('jquery', 'jquery-ui-position'), $version, $footer);
@@ -552,10 +555,7 @@ class Mappress {
552
  if ($type == 'settings')
553
  wp_enqueue_script('mappress_settings', $js . "/mappress_settings$min.js", array('postbox', 'jquery', 'jquery-ui-position'), $version, $footer);
554
 
555
- if ($min) {
556
- wp_enqueue_script('mappress', $js . "/mappress.min.js", array('jquery'), $version, $footer);
557
- } else {
558
- wp_enqueue_script('mappress', $js . "/mappress.js", array('jquery', 'underscore'), $version, $footer);
559
  foreach(array('directions', 'geocoding', 'icons', 'infobox', 'lib', 'places', 'poi', 'widgets', 'loader') as $script)
560
  wp_enqueue_script($script, $js . "/mappress_{$script}.js", null, $version, $footer);
561
  }
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.46.2
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.46.2';
38
 
39
  static
40
  $baseurl,
100
 
101
  static function debugging() {
102
  global $wpdb;
 
103
 
104
  if (isset($_GET['mp_info'])) {
105
  echo "<b>Plugin version</b> " . self::get_version_string();
106
  foreach(array('language', 'wpurl', 'url') as $info)
107
  printf("<br/>%s : %s", $info, get_bloginfo($info));
108
+ $results = $wpdb->get_results("SELECT postid, mapid FROM $posts_table");
109
+ foreach($results as $result)
110
+ echo $result->postid . '=>' . $result.mapid;
111
  die();
112
  }
113
 
547
  $language = ($language) ? "&language=$language" : '';
548
 
549
  wp_enqueue_script("mappress-gmaps", "https://maps.googleapis.com/maps/api/js?{$apiversion}{$language}{$libstring}{$apikey}", null, null, $footer);
550
+ wp_enqueue_script('mappress', $js . "/mappress$min.js", array('jquery', 'underscore'), $version, $footer);
551
 
552
  if ($type == 'editor')
553
  wp_enqueue_script('mappress_editor', $js . "/mappress_editor$min.js", array('jquery', 'jquery-ui-position'), $version, $footer);
555
  if ($type == 'settings')
556
  wp_enqueue_script('mappress_settings', $js . "/mappress_settings$min.js", array('postbox', 'jquery', 'jquery-ui-position'), $version, $footer);
557
 
558
+ if (!$min) {
 
 
 
559
  foreach(array('directions', 'geocoding', 'icons', 'infobox', 'lib', 'places', 'poi', 'widgets', 'loader') as $script)
560
  wp_enqueue_script($script, $js . "/mappress_{$script}.js", null, $version, $footer);
561
  }
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.46.1
8
 
9
  MapPress is the most popular and easiest way to create great-looking Google Maps and driving directions in your blog.
10
 
@@ -86,6 +86,10 @@ Please see the plugin documentation pages:
86
 
87
  == Changelog ==
88
 
 
 
 
 
89
  = 2.46.1 =
90
  * Added: updated French translation, thank you to Serge
91
  * Fixed: directions were showing 'null' if empty
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.46.2
8
 
9
  MapPress is the most popular and easiest way to create great-looking Google Maps and driving directions in your blog.
10
 
86
 
87
  == Changelog ==
88
 
89
+ = 2.46.2 =
90
+ * Fixed: Pro version automatic updater communications errors
91
+ * Fixed: icon picker was not working on MapPress settings page
92
+
93
  = 2.46.1 =
94
  * Added: updated French translation, thank you to Serge
95
  * Fixed: directions were showing 'null' if empty