Version Description
- Fixed: maps were not saving attributes correctly including title, size and map type
- Fixed: maps with one POI were not setting zoom correctly
- Fixed: setting for default poi zoom was not saving
- Fixed: setting for POI click ('mashupClick') was ignored if used in shortcode
- Changed: directions 'to' is added by default for all POIs
- Removed: setting for no directions (directions="none")
- Removed: POI links ('poiLinks') setting removed
Download this release
Release Info
Developer | chrisvrichardson |
Plugin | MapPress Easy Google Maps |
Version | 2.45.1 |
Comparing to | |
See all releases |
Code changes from version 2.45 to 2.45.1
- css/mappress.css +0 -16
- js/mappress.min.js +1 -1
- js/mappress_editor.min.js +1 -1
- languages/mappress-google-maps-for-wordpress.pot +74 -78
- languages/texts.php +0 -1
- mappress.php +16 -16
- mappress_settings.php +3 -18
- readme.txt +16 -6
css/mappress.css
CHANGED
@@ -34,22 +34,6 @@
|
|
34 |
padding: 0px ;
|
35 |
}
|
36 |
|
37 |
-
/* Links for the map */
|
38 |
-
.mapp-map-links {
|
39 |
-
background-color: #F0F0F0;
|
40 |
-
border-top: 1px solid lightgray;
|
41 |
-
border-bottom: 1px solid lightgray;
|
42 |
-
}
|
43 |
-
|
44 |
-
.mapp-map-links a {
|
45 |
-
margin: 2px 15px 2px 5px;
|
46 |
-
text-decoration: none;
|
47 |
-
}
|
48 |
-
|
49 |
-
.mapp-map-links a:hover {
|
50 |
-
text-decoration: underline;
|
51 |
-
}
|
52 |
-
|
53 |
.mapp-hidden {
|
54 |
display: none;
|
55 |
}
|
34 |
padding: 0px ;
|
35 |
}
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
.mapp-hidden {
|
38 |
display: none;
|
39 |
}
|
js/mappress.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var mapp=window.mapp||{};+function(n){mapp.Map=function(t){function et(n,t){n=n.split(" ");for(var i=0;i<n.length;i++)google.maps.event.addListener(u,n[i],t)}function tt(t,i){i=typeof i!="undefined"?i:!(u.getMapTypeId()==t);this.editable&&i&&(n.inArray(t,["roadmap","satellite","terrain","hybrid"])!=-1||typeof mappl10n.options.styles[t]!="undefined")||(t="roadmap");u.setMapTypeId(t)}function c(t){var e,r;if(i.menu.toggle(t),i.menu.is(":visible")){n("[data-mapp-type]",i.menu).removeClass("mapp-active");n('[data-mapp-type="'+u.getMapTypeId()+'"]',i.menu).addClass("mapp-active");for(layer in o)e=!!o[layer].getMap(),n('[data-mapp-layer="'+layer+'"]',i.menu).toggleClass("mapp-active",e);r=!!(f.center&&f.zoom);n('[data-mapp-action="viewport-set"]',i.menu).toggle(!r);n('[data-mapp-action="viewport-reset"]',i.menu).toggle(r)}}function ot(){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[v]!="undefined"&&u.setOptions({styles:n[v]})}function st(){var t;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;u.controls[t].push(i.get(0))});i.menu.on("mouseleave",function(){t=setTimeout(function(){c(!1)},700)});i.menu.on("mouseenter",function(){clearTimeout(t)})}function ht(){var i,t,r;for(o={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer},f.layers=n.makeArray(f.layers),i=0;i<f.layers.length;i++)t=n.trim(f.layers[i]),r=t.split(".").pop(),o[t]?it(t):r=="kml"||r=="kmz"?o[t]=new google.maps.KmlLayer({map:u,preserveViewport:!0,url:t}):r=="json"&&(o[t]=new google.maps.Data({map:u}).loadGeoJson(t))}function it(t,i){i=typeof i!="undefined"?i:o[t].getMap()==null;n.each(["traffic","bicycling","transit"],function(n,t){o[t].setMap(null)});t&&o[t].setMap(i?u:null)}var l=t.height,a=t.mapid,v=t.mapTypeId?t.mapTypeId:"roadmap",rt=t.metaKey,e=t.name,ct=t.options,k=t.query,y=t.title,p=t.width,lt=t.options.adaptive,d=t.options.from,ut=t.options.initialOpenDirections,w=t.options.initialOpenInfo,at=t.options.mashupClick,vt=t.options.radius,g=t.options.search,nt=t.options.to;this.center=t.center;this.editable=t.options.editable;this.iw=null;this.layers=t.options.layers;this.places=null;this.poi;this.zoom=t.zoom?parseInt(t.zoom,10):null;var f=this,i={},o={},s=null,b=null,u=null,r=[],ft=!1,h;this.display=function(){if(i.layout=n("#"+e+"_layout"),i.canvas=n("#"+e),i.dir=n("#"+e+"_directions"),i.list=n("#"+e+"_poi_list"),i.dialog=n("#"+e+"_dialog"),i.controls=n(".mapp-controls","#"+e+"_controls"),i.menu=n(".mapp-menu",i.controls),!i.canvas.length)return mapp.lib.log("MapPress: Missing map name or container for map: "+e);u=new google.maps.Map(i.canvas.get(0),{mapTypeId:"roadmap",zoom:1});h=google.maps.Marker.MAX_ZINDEX;i.dir.append(n("#"+e+"_directions_").contents());i.list.append(n("#"+e+"_poi_list_").contents());this.places=new mapp.Places(null,{gmap:u});google.maps.event.addListener(this.places,"search",function(n){f.search(n)});var o={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||k)};u.setOptions(o);ot();st();ht();tt(v,!0);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.list.on("click","tr",function(t){if(!n(t.target).is("a")){var u=n("tr",i.list).index(n(this));f.openInfoWindow(r[u])}});if(et("click drag",function(){f.closeInfoWindow()}),mappl10n.options.iwType=="ib"||this.editable?this.iw=new mapp.InfoBox(this):mappl10n.options.iwType=="iw"&&(this.iw=new google.maps.InfoWindow),b=new mapp.Geocoder(f.getMap()),mappl10n.options.directions!="none"&&(s=new mapp.Directions(f,mappl10n.options.directions,b,mappl10n.options.directionsServer,mappl10n.options.directionsUnits)),k){g?this.places.parse(g):this.ajaxQuery();return}google.maps.event.addListenerOnce(u,"idle",function(){f.initCenter()});this.setPois(t.pois);this.renderList()};this.action=function(n,t,i){switch(n){case"center":c(!1);this.closeInfoWindow();this.recenter();break;case"geolocate":this.places.geolocate();break;case"layer":it(t);c(!1);break;case"menu":c(t);break;case"open":var f=i.attr("data-mapp-id");this.openInfoWindow(r[f]);break;case"type":tt(t);break;case"viewport-set":this.center=u.getCenter();this.zoom=u.getZoom();break;case"viewport-reset":this.center=this.zoom=null;this.recenter();break;default:return!0}};this.setDialog=function(n){n=n?n:'<span class="mapp-spinner"><\/span>'+mappl10n.loading;n='<div class="mapp-dialog-inner">'+n+"<\/div>";i.dialog.html(n);i.dialog.show()};this.hideDialog=function(){i.dialog.hide()};this.show=function(){i.layout.show();this.display()};this.closeInfoWindow=function(){this.iw.close()};this.openDirections=function(n,t,i){var r,u;typeof n=="object"?(r=n.address?n.address:n.getPosition().toUrlValue(),n.open()):r=n;typeof t=="object"?(u=t.address?t.address:t.getPosition().toUrlValue(),t.open()):u=t;s.open(r,u,i)};this.poiSelect=function(t){if(this.poi=t,n("[data-mapp-id]",i.list).removeClass("mapp-selected"),t){var f=n.inArray(t,r),u=n('[data-mapp-id="'+f+'"]',i.list);u.addClass("mapp-selected");mapp.lib.scrollTo(i.list,u);h++;t.setZIndex(h)}};this.getMap=function(){return u};this.getGeocoder=function(){return b};this.getName=function(){return e};this.getMapid=function(){return a};this.getTitle=function(){return y};this.setTitle=function(n){y=n};this.getWidth=function(){return p};this.getHeight=function(){return l};this.renderList=function(){this.editable&&(i.list.html(mapp.lib.template("poi-list",{pois:r})),google.maps.event.trigger(this,"rendered"))};this.getPoi=function(n){return typeof n=="string"&&(n=parseInt(n,10)),r[n]};this.getPoiById=function(n){for(var t=0;t<r.length;t++)if(r[t].postid==n)return r[t];return null};this.getPois=function(){return r};this.addPoi=function(n){r.unshift(n);n.setMap(this);f.renderList();this.poiSelect(n)};this.removePoi=function(t){var i=n.inArray(t,r);i!=-1&&(r[i].setMap(null),r.splice(i,1),f.renderList())};this.setPois=function(n){for(var i,t=0;t<r.length;t++)r[t].setMap(null);for(r=[],t=0;t<n.length;t++)i=new mapp.Poi,i.fromJSON(n[t]),r.push(i),i.setMap(this),i.setZIndex(h+n.length-1-t);h+=n.length-1};this.showPois=function(){for(var n=0;n<r.length;n++)r[n].setVisible(!0)};this.hidePois=function(){for(var n=0;n<r.length;n++)r[n].setVisible(!1)};this.sortPois=function(n){for(var u,t=Array(),i=0;i<n.length;i++){if(u=parseInt(n[i]),isNaN(u))return!1;t.push(r[u])}if(t.length!=r.length)return!1;r=t;this.renderList()};this.openInfoWindow=function(n,t){if(this.iw){if(s&&s.close(),this.iw.close(),this.poiSelect(n),!this.editable){if(mappl10n.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(u,i)}};this.resize=function(n,t){var r=u.getCenter();n&&t&&(i.canvas.width(n),i.canvas.height(t),p=n,l=t);google.maps.event.trigger(u,"resize");u.setCenter(r);ft=!0;return};this.initCenter=function(){this.closeInfoWindow();google.maps.event.addListenerOnce(u,"idle",function(){f.initWindows()});this.recenter()};this.initWindows=function(){var r,t,i;s&&ut?(t=n.trim(d),i=d==null&&nt==null?"0":n.trim(nt),t=n.isNumeric(t)?this.getPoi(t):t,i=n.isNumeric(i)?this.getPoi(i):i,typeof t=="object"?t.center(!1):typeof i=="object"&&i.center(!1),f.openDirections(t,i,!1)):w&&(r=n.isNumeric(w)?f.getPoi(w):f.getPoi(0),r&&r.open())};this.recenter=function(){var f=this.center?new google.maps.LatLng(this.center.lat,this.center.lng):null,t=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null,n,i;if(f){u.setCenter(f);u.setZoom(t?t:1);return}if(r.length==0){u.setCenter(new google.maps.LatLng(0,0));u.setZoom(1);return}if(r.length==1){r[0].center(t);return}for(bounds=new google.maps.LatLngBounds,n=0;n<r.length;n++)i=r[n].getBounds(),bounds=i?bounds.union(i):bounds.extend(r[n].getPosition());u.fitBounds(bounds)};this.toJSON=function(){for(var t={center:this.center,height:l,mapid:a,mapTypeId:u.getMapTypeId(),metaKey:rt,pois:[],title:y,width:p,zoom:this.zoom},n=0;n<r.length;n++)t.pois.push(r[n].toJSON());return t};this.ajaxSave=function(n){mapp.lib.ajax({type:"POST",data:{action:"mapp_save",map:this.toJSON(),postid:mappl10n.options.postid},callback:function(t){t.status=="OK"&&(a=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||{};mapp.Directions=function(n,t,i,r,u){function p(){jQuery(".mapp-dir-swap",f).click(function(){var n=jQuery(".mapp-dir-daddr",f).val(),t=jQuery(".mapp-dir-saddr",f).val();return jQuery(".mapp-dir-saddr",f).val(n),jQuery(".mapp-dir-daddr",f).val(t),jQuery(".mapp-dir-get",f).click(),!1});jQuery(".mapp-dir-get",f).click(function(){return s.getDirections(),!1});jQuery(".mapp-dir-print",f).click(function(){s.printDirections()});jQuery(".mapp-dir-close",f).click(function(){return s.close(),!1});jQuery(".mapp-travelmode",f).click(function(){return jQuery(".mapp-travelmode",f).removeClass("mapp-travelmode-on"),jQuery(this).addClass("mapp-travelmode-on"),s.getDirections(),!1});jQuery(".mapp-myloc",f).click(function(){return c.geolocate(function(n){n?(jQuery(".mapp-dir-saddr",f).val("("+n.coords.latitude+", "+n.coords.longitude+")"),jQuery(".mapp-dir-get",f).click()):alert(mappl10n.no_geolocate)}),!1})}function w(n,t,i){var u=jQuery(".mapp-travelmode-on > span",f).hasClass("mapp-dir-walk")?google.maps.DirectionsTravelMode.WALKING:jQuery(".mapp-travelmode-on > span",f).hasClass("mapp-dir-transit")?google.maps.DirectionsTravelMode.TRANSIT:jQuery(".mapp-travelmode-on > span",f).hasClass("mapp-dir-bike")?google.maps.DirectionsTravelMode.BICYCLING:google.maps.DirectionsTravelMode.DRIVING;var o={travelMode:u,transitOptions:{departureTime:null},provideRouteAlternatives:!0,origin:n,destination:t,unitSystem:y},r=jQuery(".mapp-dir-renderer",f).get(0);jQuery(".mapp-dir-renderer",f).empty();l||(l=new google.maps.DirectionsService);l.route(o,function(n,t){switch(t){case google.maps.DirectionsStatus.OK:h.hidePois();e?(e.setDirections(n),e.setMap(a),e.setPanel(r)):e=new google.maps.DirectionsRenderer({map:a,panel:r,directions:n,hideRouteList:!1,draggable:!0});break;case google.maps.DirectionsStatus.NOT_FOUND:alert(mappl10n.dir_not_found);break;case google.maps.DirectionsStatus.ZERO_RESULTS:alert(mappl10n.dir_zero_results);break;default:alert(mappl10n.dir_default+t)}i()})}var h=n,v=t,c=i,o=r,y=u,f=jQuery("#"+n.getName()+"_directions"),e,l,a=n.getMap(),s=this;o.toLowerCase().indexOf("http")==-1&&(o="https://"+o);p();this.open=function(n,t,i){if(v=="google"){this.openGoogle(n,t);return}jQuery(f).show();jQuery(".mapp-dir-saddr",f).val(n);jQuery(".mapp-dir-daddr",f).val(t);(i||typeof i=="undefined")&&(jQuery(".mapp-dir-get",f).focus(),jQuery(".mapp-dir-saddr",f).focus())};this.close=function(){jQuery(f).hide();e&&(e.setPanel(null),e.getMap()&&(e.setMap(null),h.showPois()))};this.getDirections=function(){h.closeInfoWindow();jQuery(".mapp-spinner",f).show();var n=jQuery(".mapp-dir-saddr",f),t=jQuery(".mapp-dir-daddr",f),i=jQuery(".mapp-dir-saddr-err",f),r=jQuery(".mapp-dir-daddr-err",f);c.geocodeField(n,i,function(n){c.geocodeField(t,r,function(t){n&&t?w(n,t,function(){jQuery(".mapp-spinner",f).hide();return}):jQuery(".mapp-spinner",f).hide()})})};this.printDirections=function(){var t,n=jQuery(".mapp-travelmode-on > span",f);t=n.hasClass("mapp-dir-walk")?"w":n.hasClass("mapp-dir-bike")?"b":n.hasClass("mapp-dir-transit")?"r":"d";this.openGoogle(jQuery(".mapp-dir-saddr",f).val(),jQuery(".mapp-dir-daddr",f).val(),t)};this.openGoogle=function(n,t,i){var r=o;r+="?saddr="+encodeURIComponent(n);r+="&daddr="+encodeURIComponent(t);i&&(r+="&dirflg="+i);window.open(r)}};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 u=n.extend({disableAutoPan:!1,border:20},i),f=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){f=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(f.position),t={width:n(l.getDiv()).width(),height:n(l.getDiv()).height()},v=n(".mapp-ib-body",r);if(!u.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-u.border&&(i=t.width-u.border-s/2);i-s/2<u.border&&(i=s/2+u.border);o-h+f.anchorPoint.y-a<u.border&&(o=h-f.anchorPoint.y+u.border+a);o>t.height&&(o=t.height);l.panBy(c.x-i,c.y-o);h>t.height+f.anchorPoint.y-2*u.border&&(h=t.height+f.anchorPoint.y-2*u.border,r.css({"max-height":h}));r.css({left:i-s/2,bottom:t.height-o-f.anchorPoint.y+a});e.css({left:i,bottom:t.height-o-f.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}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();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(){var t=0;n("script").each(function(i,r){n(r).attr("src")=="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&key=AIzaSyAEPgklOaWW2F_KkSifR_JuYIsM6ONdlCM"&&t++});t>1&&mapp.lib.alert("ERROR: Google Maps API key loaded multiple times, 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;if(!n){t.setCenter(this.getPosition());return}if(typeof n=="number"){t.setCenter(this.getPosition());t.setZoom(n);return}i=this.getBounds();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)},zoomIn:function(){var n=this.map.getMap(),r=n.getZoom(),t=this.getBounds(),i=Math.min(r+2,21);t&&n.fitBounds(t);i>n.getZoom()&&n.setZoom(i);n.setCenter(this.getPosition())},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")},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 g(n,t){n=n.split(" ");for(var i=0;i<n.length;i++)google.maps.event.addListener(u,n[i],t)}function p(t,i){i=typeof i!="undefined"?i:!(u.getMapTypeId()==t);i&&(n.inArray(t,["roadmap","satellite","terrain","hybrid"])!=-1||typeof mappl10n.options.styles[t]!="undefined")||(t="roadmap");u.setMapTypeId(t)}function h(t){var o,r;if(i.menu.toggle(t),i.menu.is(":visible")){n("[data-mapp-type]",i.menu).removeClass("mapp-active");n('[data-mapp-type="'+u.getMapTypeId()+'"]',i.menu).addClass("mapp-active");for(layer in e)o=!!e[layer].getMap(),n('[data-mapp-layer="'+layer+'"]',i.menu).toggleClass("mapp-active",o);r=!!(f.center&&f.zoom);n('[data-mapp-action="viewport-set"]',i.menu).toggle(!r);n('[data-mapp-action="viewport-reset"]',i.menu).toggle(r)}}function nt(){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 tt(){var t;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;u.controls[t].push(i.get(0))});i.menu.on("mouseleave",function(){t=setTimeout(function(){h(!1)},700)});i.menu.on("mouseenter",function(){clearTimeout(t)})}function it(){var i,t,r;for(e={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer},f.layers=n.makeArray(f.layers),i=0;i<f.layers.length;i++)t=n.trim(f.layers[i]),r=t.split(".").pop(),e[t]?w(t):r=="kml"||r=="kmz"?e[t]=new google.maps.KmlLayer({map:u,preserveViewport:!0,url:t}):r=="json"&&(e[t]=new google.maps.Data({map:u}).loadGeoJson(t))}function w(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?u:null)}var rt=t.options.adaptive,a=t.options.from,b=t.options.initialOpenDirections,c=t.options.initialOpenInfo,k=t.options.mashupClick,ut=t.options,ft=t.options.radius,v=t.options.search,y=t.options.to;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.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;var f=this,i={},e={},o=null,l=null,u=null,r=[],d=!1,s;this.display=function(){if(i.layout=n("#"+this.name+"_layout"),i.canvas=n("#"+this.name),i.dir=n("#"+this.name+"_directions"),i.list=n("#"+this.name+"_poi_list"),i.dialog=n("#"+this.name+"_dialog"),i.controls=n(".mapp-controls","#"+this.name+"_controls"),i.menu=n(".mapp-menu",i.controls),!i.canvas.length)return mapp.lib.log("MapPress: Missing map name or container for map: "+this.name);u=new google.maps.Map(i.canvas.get(0),{mapTypeId:"roadmap",zoom:1});s=google.maps.Marker.MAX_ZINDEX;i.dir.append(n("#"+this.name+"_directions_").contents());i.list.append(n("#"+this.name+"_poi_list_").contents());this.places=new mapp.Places(null,{gmap:u});google.maps.event.addListener(this.places,"search",function(n){f.search(n)});var e={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)};u.setOptions(e);nt();tt();it();p(this.mapTypeId,!0);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.list.on("click","tr",function(t){if(!n(t.target).is("a")){var u=n("tr",i.list).index(n(this));f.openInfoWindow(r[u])}});if(g("click drag",function(){f.closeInfoWindow()}),mappl10n.options.iwType=="ib"||this.editable?this.iw=new mapp.InfoBox(this):mappl10n.options.iwType=="iw"&&(this.iw=new google.maps.InfoWindow),l=new mapp.Geocoder(f.getMap()),mappl10n.options.directions!="none"&&(o=new mapp.Directions(f,mappl10n.options.directions,l,mappl10n.options.directionsServer,mappl10n.options.directionsUnits)),this.query){v?this.places.parse(v):this.ajaxQuery();return}google.maps.event.addListenerOnce(u,"idle",function(){f.initCenter()});this.setPois(t.pois);this.renderList()};this.action=function(n,t,i){switch(n){case"center":h(!1);this.closeInfoWindow();this.recenter();break;case"geolocate":this.places.geolocate();break;case"layer":w(t);h(!1);break;case"menu":h(t);break;case"open":var f=i.attr("data-mapp-id");this.openInfoWindow(r[f]);break;case"type":p(t);break;case"viewport-set":this.center=u.getCenter();this.zoom=u.getZoom();break;case"viewport-reset":this.center=this.zoom=null;this.recenter();break;default:return!0}};this.setDialog=function(n){n=n?n:'<span class="mapp-spinner"><\/span>'+mappl10n.loading;n='<div class="mapp-dialog-inner">'+n+"<\/div>";i.dialog.html(n);i.dialog.show()};this.hideDialog=function(){i.dialog.hide()};this.show=function(){i.layout.show();this.display()};this.closeInfoWindow=function(){this.iw.close()};this.openDirections=function(n,t,i){var r,u;typeof n=="object"?(r=n.address?n.address:n.getPosition().toUrlValue(),n.open()):r=n;typeof t=="object"?(u=t.address?t.address:t.getPosition().toUrlValue(),t.open()):u=t;o.open(r,u,i)};this.poiSelect=function(t){if(this.poi=t,n("[data-mapp-id]",i.list).removeClass("mapp-selected"),t){var f=n.inArray(t,r),u=n('[data-mapp-id="'+f+'"]',i.list);u.addClass("mapp-selected");mapp.lib.scrollTo(i.list,u);s++;t.setZIndex(s)}};this.getMap=function(){return u};this.getGeocoder=function(){return l};this.renderList=function(){this.editable&&(i.list.html(mapp.lib.template("poi-list",{pois:r})),google.maps.event.trigger(this,"rendered"))};this.getPoi=function(n){return typeof n=="string"&&(n=parseInt(n,10)),r[n]};this.getPoiById=function(n){for(var t=0;t<r.length;t++)if(r[t].postid==n)return r[t];return null};this.getPois=function(){return r};this.addPoi=function(n){r.unshift(n);n.setMap(this);f.renderList();this.poiSelect(n)};this.removePoi=function(t){var i=n.inArray(t,r);i!=-1&&(r[i].setMap(null),r.splice(i,1),f.renderList())};this.setPois=function(n){for(var i,t=0;t<r.length;t++)r[t].setMap(null);for(r=[],t=0;t<n.length;t++)i=new mapp.Poi,i.fromJSON(n[t]),r.push(i),i.setMap(this),i.setZIndex(s+n.length-1-t);s+=n.length-1};this.showPois=function(){for(var n=0;n<r.length;n++)r[n].setVisible(!0)};this.hidePois=function(){for(var n=0;n<r.length;n++)r[n].setVisible(!1)};this.sortPois=function(n){for(var u,t=Array(),i=0;i<n.length;i++){if(u=parseInt(n[i]),isNaN(u))return!1;t.push(r[u])}if(t.length!=r.length)return!1;r=t;this.renderList()};this.openInfoWindow=function(n,t){if(this.iw){if(o&&o.close(),this.iw.close(),this.poiSelect(n),!this.editable){if(k=="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(u,i)}};this.resize=function(n,t){var r=u.getCenter();n&&t&&(i.canvas.width(n),i.canvas.height(t),this.width=n,this.height=t);google.maps.event.trigger(u,"resize");u.setCenter(r);d=!0;return};this.initCenter=function(){this.closeInfoWindow();google.maps.event.addListenerOnce(u,"idle",function(){f.initWindows()});this.recenter()};this.initWindows=function(){var r,t,i;o&&b?(t=n.trim(a),i=a==null&&y==null?"0":n.trim(y),t=n.isNumeric(t)?this.getPoi(t):t,i=n.isNumeric(i)?this.getPoi(i):i,typeof t=="object"?t.center(!1):typeof i=="object"&&i.center(!1),f.openDirections(t,i,!1)):c&&(r=n.isNumeric(c)?f.getPoi(c):f.getPoi(0),r&&r.open())};this.recenter=function(){var f=this.center?new google.maps.LatLng(this.center.lat,this.center.lng):null,t=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null,n,i;if(f){u.setCenter(f);u.setZoom(t?t:1);return}if(r.length==0){u.setCenter(new google.maps.LatLng(0,0));u.setZoom(1);return}if(r.length==1){r[0].center(t);return}for(bounds=new google.maps.LatLngBounds,n=0;n<r.length;n++)i=r[n].getBounds(),bounds=i?bounds.union(i):bounds.extend(r[n].getPosition());u.fitBounds(bounds)};this.toJSON=function(){for(var t={center:this.center,height:this.height,mapid:this.mapid,mapTypeId:u.getMapTypeId(),metaKey:this.metaKey,pois:[],title:this.title,width:this.width,zoom:this.zoom},n=0;n<r.length;n++)t.pois.push(r[n].toJSON());return t};this.ajaxSave=function(n){mapp.lib.ajax({type:"POST",data:{action:"mapp_save",map:this.toJSON(),postid:mappl10n.options.postid},callback:function(t){t.status=="OK"&&(this.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||{};mapp.Directions=function(n,t,i,r,u){function p(){jQuery(".mapp-dir-swap",f).click(function(){var n=jQuery(".mapp-dir-daddr",f).val(),t=jQuery(".mapp-dir-saddr",f).val();return jQuery(".mapp-dir-saddr",f).val(n),jQuery(".mapp-dir-daddr",f).val(t),jQuery(".mapp-dir-get",f).click(),!1});jQuery(".mapp-dir-get",f).click(function(){return s.getDirections(),!1});jQuery(".mapp-dir-print",f).click(function(){s.printDirections()});jQuery(".mapp-dir-close",f).click(function(){return s.close(),!1});jQuery(".mapp-travelmode",f).click(function(){return jQuery(".mapp-travelmode",f).removeClass("mapp-travelmode-on"),jQuery(this).addClass("mapp-travelmode-on"),s.getDirections(),!1});jQuery(".mapp-myloc",f).click(function(){return c.geolocate(function(n){n?(jQuery(".mapp-dir-saddr",f).val("("+n.coords.latitude+", "+n.coords.longitude+")"),jQuery(".mapp-dir-get",f).click()):alert(mappl10n.no_geolocate)}),!1})}function w(n,t,i){var u=jQuery(".mapp-travelmode-on > span",f).hasClass("mapp-dir-walk")?google.maps.DirectionsTravelMode.WALKING:jQuery(".mapp-travelmode-on > span",f).hasClass("mapp-dir-transit")?google.maps.DirectionsTravelMode.TRANSIT:jQuery(".mapp-travelmode-on > span",f).hasClass("mapp-dir-bike")?google.maps.DirectionsTravelMode.BICYCLING:google.maps.DirectionsTravelMode.DRIVING;var o={travelMode:u,transitOptions:{departureTime:null},provideRouteAlternatives:!0,origin:n,destination:t,unitSystem:y},r=jQuery(".mapp-dir-renderer",f).get(0);jQuery(".mapp-dir-renderer",f).empty();l||(l=new google.maps.DirectionsService);l.route(o,function(n,t){switch(t){case google.maps.DirectionsStatus.OK:h.hidePois();e?(e.setDirections(n),e.setMap(a),e.setPanel(r)):e=new google.maps.DirectionsRenderer({map:a,panel:r,directions:n,hideRouteList:!1,draggable:!0});break;case google.maps.DirectionsStatus.NOT_FOUND:alert(mappl10n.dir_not_found);break;case google.maps.DirectionsStatus.ZERO_RESULTS:alert(mappl10n.dir_zero_results);break;default:alert(mappl10n.dir_default+t)}i()})}var h=n,v=t,c=i,o=r,y=u,f=jQuery("#"+n.name+"_directions"),e,l,a=n.getMap(),s=this;o.toLowerCase().indexOf("http")==-1&&(o="https://"+o);p();this.open=function(n,t,i){if(v=="google"){this.openGoogle(n,t);return}jQuery(f).show();jQuery(".mapp-dir-saddr",f).val(n);jQuery(".mapp-dir-daddr",f).val(t);(i||typeof i=="undefined")&&(jQuery(".mapp-dir-get",f).focus(),jQuery(".mapp-dir-saddr",f).focus())};this.close=function(){jQuery(f).hide();e&&(e.setPanel(null),e.getMap()&&(e.setMap(null),h.showPois()))};this.getDirections=function(){h.closeInfoWindow();jQuery(".mapp-spinner",f).show();var n=jQuery(".mapp-dir-saddr",f),t=jQuery(".mapp-dir-daddr",f),i=jQuery(".mapp-dir-saddr-err",f),r=jQuery(".mapp-dir-daddr-err",f);c.geocodeField(n,i,function(n){c.geocodeField(t,r,function(t){n&&t?w(n,t,function(){jQuery(".mapp-spinner",f).hide();return}):jQuery(".mapp-spinner",f).hide()})})};this.printDirections=function(){var t,n=jQuery(".mapp-travelmode-on > span",f);t=n.hasClass("mapp-dir-walk")?"w":n.hasClass("mapp-dir-bike")?"b":n.hasClass("mapp-dir-transit")?"r":"d";this.openGoogle(jQuery(".mapp-dir-saddr",f).val(),jQuery(".mapp-dir-daddr",f).val(),t)};this.openGoogle=function(n,t,i){var r=o;r+="?saddr="+encodeURIComponent(n);r+="&daddr="+encodeURIComponent(t);i&&(r+="&dirflg="+i);window.open(r)}};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 u=n.extend({disableAutoPan:!1,border:20},i),f=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){f=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(f.position),t={width:n(l.getDiv()).width(),height:n(l.getDiv()).height()},v=n(".mapp-ib-body",r);if(!u.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-u.border&&(i=t.width-u.border-s/2);i-s/2<u.border&&(i=s/2+u.border);o-h+f.anchorPoint.y-a<u.border&&(o=h-f.anchorPoint.y+u.border+a);o>t.height&&(o=t.height);l.panBy(c.x-i,c.y-o);h>t.height+f.anchorPoint.y-2*u.border&&(h=t.height+f.anchorPoint.y-2*u.border,r.css({"max-height":h}));r.css({left:i-s/2,bottom:t.height-o-f.anchorPoint.y+a});e.css({left:i,bottom:t.height-o-f.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}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();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(){var t=0;n("script").each(function(i,r){n(r).attr("src")=="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&key=AIzaSyAEPgklOaWW2F_KkSifR_JuYIsM6ONdlCM"&&t++});t>1&&mapp.lib.alert("ERROR: Google Maps API key loaded multiple times, 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")},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()
|
js/mappress_editor.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var mapp=window.mapp||{};+function(n){mapp.Media=function(){function f(r){t=r;n(".mapp-edit").empty();n(".mapp-edit").append(u.clone());var f=t.
|
1 |
+
var mapp=window.mapp||{};+function(n){mapp.Media=function(){function f(r){t=r;n(".mapp-edit").empty();n(".mapp-edit").append(u.clone());var f=t.mapid;f?n("#mapp_m_mapid").text(f):n("#mapp_m_mapid").text("");n("#mapp_m_title").val(t.title);n("#mapp_m_width").val(t.width);n("#mapp_m_height").val(t.height);n(".mapp-viewport").prop("checked",!!(t.center&&t.zoom));n("#mapp_m_edit_panel").show();n("#mapp_m_list_panel").hide();i=new mapp.Editor(t)}function e(){i.close();t=null;i=null;n("#mapp_m_edit_panel").hide();n("#mapp_m_list_panel").show()}function s(){mapp.Map.ajaxCreate("mapp0",r,function(n){f(n)})}function h(n){mapp.Map.ajaxGet(n,"mapp0",r,function(n){f(n)})}function c(n){var t='[mappress mapid="'+n+'"]';send_to_editor(t)}function o(){if(t){var i=n.trim(n("#mapp_m_title").val());i=i!=""?i:mappl10n.untitled;t.title=i;t.width=n("#mapp_m_width").val();t.height=n("#mapp_m_height").val();n(".mapp-viewport").prop("checked")?(t.center=t.getMap().getCenter().toJSON(),t.zoom=t.getMap().getZoom()):t.center=t.zoom=null;t.ajaxSave(function(t){t.list&&n("#mapp_m_maplist").html(t.list);e()})}}function l(t){confirm(mappl10n.delete_map_prompt)&&(n("#mapp_m_maplist tr[data-mapid='"+t+"']").remove(),mapp.Map.ajaxDelete(t))}var i,t,u,a=n(".mapp-m-panel"),v=this,r;u=n(".mapp-edit").contents().detach();r={directions:"none",editable:!0,initialOpenInfo:!1};n("#mapp_m_list_panel").show();n("#mapp_m_add_map").click(function(n){s();n.preventDefault()});n("#mapp_m_maplist").on("click","tr",function(t){var i=n(this).attr("data-mapid");n(t.target).hasClass("mapp-maplist-edit")&&h(i);n(t.target).hasClass("mapp-maplist-delete")&&l(i);n(t.target).hasClass("mapp-maplist-insert")&&c(i);t.preventDefault()});n(".mapp-m-size").click(function(t){var i=n(this).data("width"),r=n(this).data("height");n("#mapp_m_width").val(i);n("#mapp_m_height").val(r);t.preventDefault()});n("#publish, #post-preview").click(function(){o()});n("#mapp_m_save").click(function(n){o();n.preventDefault()});n("#mapp_m_title").keydown(function(t){t.which==13&&(t.preventDefault(),n("#mapp_m_save").click())});n("#mapp_m_cancel").click(function(n){e();n.preventDefault()});n("#mapp_m_insert").click(function(n){var i=t.mapid,r='[mappress mapid="'+t.mapid+'"]';i?send_to_editor(r):alert(mappl10n.save_first);n.preventDefault()});this.getMap=function(){return t}}}(jQuery);+function(n){mapp.Editor=function(t){function o(){i.display();r=new mapp.PoiEditor(i);google.maps.event.addListener(i,"rendered",function(){n(".mapp-list",e).toggle(!!i.getPois().length);i.resize()});n("#mapp_e_poi_list").on("click","[data-mapp-action]",function(t){var i=n(this).attr("data-mapp-action");me.action(i,n(this).attr("data-mapp-"+i),n(this));t.preventDefault()});n(".mapp-list",e).sortable({axis:"y",cursor:"move",delay:200,update:function(){i.sortPois(n(this).sortable("toArray",{attribute:"data-mapp-id"}))}});_geocoder=new mapp.Geocoder(i.getMap());_geocoder.autocompleteField("#mapp_e_saddr","#mapp_e_saddr_err","#mapp_e_search","#mapp_e_myloc",s);n("#mapp_e_recenter").click(function(n){i.closeInfoWindow();i.autoCenter(!0);n.preventDefault()});google.maps.event.addListener(i.getMap(),"click",function(t){n("#mapp_e_latlng").text(t.latLng.toUrlValue())})}function s(n){if(n){if(n.geometry){var t=mapp.Geocoder.parseAddress(n.formatted_address),i=n.name?n.name:t.firstLine,f=n.name?t.firstLine+", "+t.secondLine:t.secondLine,e=new mapp.Poi({address:n.formatted_address,body:f,iconid:r.lastIcon,overlay:new google.maps.Marker({position:n.geometry.location}),title:i,type:null,viewport:n.geometry.viewport?n.geometry.viewport:null});u(e,!0);return}if(n instanceof google.maps.LatLng)return h(n);alert("Internal error, unable to add location")}}function h(n){poi=new mapp.Poi({body:"",iconid:r.lastIcon,overlay:new google.maps.Marker({position:n}),title:n.toUrlValue(6)});u(poi,!0)}function u(n,t){i.closeInfoWindow();f&&f.setDrawingMode(null);i.addPoi(n);t&&n.center(!0)}var f,i=t,r,e=n(".mapp-edit");this.close=function(){i.closeInfoWindow()};o.apply(this)};mapp.PoiEditor=function(t){function h(){u=i.iw.getContent();google.maps.event.addListener(i,"open",f.render);google.maps.event.addListener(i.iw,"domready",f.domReady);google.maps.event.addListener(i.iw,"closed",function(){tinyMCE.get("mapp-poi-body")&&s()});u.on("click","[data-mapp-action]",function(t){t.preventDefault();var r=n(this).attr("data-mapp-action");switch(r){case"poi-cancel":i.closeInfoWindow();break;case"poi-html":s();e=!1;break;case"poi-remove":f.remove();break;case"poi-save":f.save();break;case"poi-visual":o();e=!0}});u.on("keydown",function(t){t.which==13&&t.target!=n("#mapp-poi-body")&&(t.preventDefault(),f.save())});u.on("change","[data-mapp-iconpicker]",function(){r.setIcon(n("[data-mapp-iconpicker]").attr("data-mapp-iconid"));this.lastIcon=r.iconid;i.renderList()});u.on("change","[data-mapp-colorpicker]",function(){var t=n("[data-mapp-colorpicker]").attr("data-mapp-color"),u=n("[data-mapp-colorpicker]").attr("data-mapp-opacity"),f=n("[data-mapp-colorpicker]").attr("data-mapp-weight"),e=r.type=="polyline"?{strokeColor:t,strokeOpacity:u/100,strokeWeight:f}:{fillColor:t,fillOpacity:u/100,strokeColor:t,strokeWeight:f,strokeOpacity:1};r.setColors(e);i.renderList()})}function c(){typeof tinyMCE!="undefined"&&typeof tinyMCE.init!="undefined"&&(l(),e&&o())}function l(){var t="en",n,i;typeof tinyMCEPreInit!="undefined"&&typeof window.tinyMCEPreInit.mceInit!="undefined"&&typeof window.tinyMCEPreInit.mceInit.content!="undefined"&&(n=window.tinyMCEPreInit.mceInit.content,t=typeof n.language!="undefined"?n.language:"en");i={mode:"none",height:"75px",convert_urls:!1,language:t,menubar:!1,plugins:"wordpress,paste,wplink,textcolor,image",relative_urls:!1,remove_script_host:!1,statusbar:!1,theme:"modern",toolbar1:"bold,italic,link,unlink,image",toolbar2:"",toolbar3:"",toolbar4:""};tinyMCE.init(i)}function o(){tinyMCE.execCommand("mceAddEditor",!1,"mapp-poi-body")}function s(){tinyMCE.execCommand("mceRemoveEditor",!1,"mapp-poi-body")}var e=!0,i=t,r,u,f;this.lastIcon=null;f=this;this.render=function(){var t;r=i.poi;r.isPoly()&&(t=r.getColors(),t=r.type=="polyline"?{color:t.strokeColor,opacity:t.strokeOpacity*100,weight:t.strokeWeight}:{color:t.fillColor,opacity:t.fillOpacity*100,weight:t.strokeWeight});u.html(mapp.lib.template("poi-edit",{poi:r,colors:t}));n("[data-mapp-iconpicker]").trigger("refresh");n("[data-mapp-colorpicker]").trigger("refresh")};this.domReady=function(){c()};this.remove=function(){confirm(mappl10n.delete_prompt)&&(i.closeInfoWindow(),i.removePoi(r))};this.save=function(){tinyMCE.get("mapp-poi-body")&&tinyMCE.get("mapp-poi-body").save();r.title=n(".mapp-poi-title").val();r.body=n(".mapp-poi-body").val();i.renderList();i.closeInfoWindow()};h.apply(this)}}(jQuery)
|
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.45\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
|
7 |
-
"POT-Creation-Date: 2017-08-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -171,7 +171,7 @@ msgid "Unknown error, unable to return directions. Status code = "
|
|
171 |
msgstr ""
|
172 |
|
173 |
#: languages/texts.php:35 mappress.php:573 mappress_poi.php:180
|
174 |
-
#: mappress_poi.php:201 mappress_settings.php:
|
175 |
msgid "Directions"
|
176 |
msgstr ""
|
177 |
|
@@ -199,8 +199,8 @@ msgstr ""
|
|
199 |
msgid "Transit"
|
200 |
msgstr ""
|
201 |
|
202 |
-
#: languages/texts.php:42 mappress.php:578
|
203 |
-
#: pro/
|
204 |
msgid "Zoom"
|
205 |
msgstr ""
|
206 |
|
@@ -264,19 +264,19 @@ msgstr ""
|
|
264 |
msgid "Smaller map"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: languages/texts.php:59
|
268 |
msgid "Directions to"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: languages/texts.php:60
|
272 |
msgid "Directions from"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: languages/texts.php:61 mappress_settings.php:
|
276 |
msgid "Basic Settings"
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: languages/texts.php:62 mappress_settings.php:
|
280 |
msgid "Post types"
|
281 |
msgstr ""
|
282 |
|
@@ -316,7 +316,7 @@ msgstr ""
|
|
316 |
msgid "Map controls"
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: languages/texts.php:72 mappress_settings.php:
|
320 |
msgid "Map Settings"
|
321 |
msgstr ""
|
322 |
|
@@ -324,19 +324,19 @@ msgstr ""
|
|
324 |
msgid "Map links"
|
325 |
msgstr ""
|
326 |
|
327 |
-
#: languages/texts.php:74 mappress_settings.php:
|
328 |
msgid "Map alignment"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: languages/texts.php:75 mappress_settings.php:
|
332 |
msgid "Open first POI"
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: languages/texts.php:76 mappress_settings.php:
|
336 |
msgid "POI Settings"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: languages/texts.php:77
|
340 |
msgid "POI links"
|
341 |
msgstr ""
|
342 |
|
@@ -344,39 +344,39 @@ msgstr ""
|
|
344 |
msgid "Tooltips"
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: languages/texts.php:79 mappress_settings.php:
|
348 |
msgid "Default zoom"
|
349 |
msgstr ""
|
350 |
|
351 |
-
#: languages/texts.php:80 mappress_settings.php:
|
352 |
msgid "Mashups"
|
353 |
msgstr ""
|
354 |
|
355 |
-
#: languages/texts.php:81 mappress_settings.php:
|
356 |
msgid "Icons"
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: languages/texts.php:82 mappress_settings.php:
|
360 |
msgid "Styled Maps"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: languages/texts.php:83 mappress_settings.php:
|
364 |
msgid "Geocoding"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: languages/texts.php:84 mappress_settings.php:
|
368 |
msgid "Localization"
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: languages/texts.php:85 mappress_settings.php:
|
372 |
msgid "Language"
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: languages/texts.php:86 mappress_settings.php:
|
376 |
msgid "Country"
|
377 |
msgstr ""
|
378 |
|
379 |
-
#: languages/texts.php:87 mappress_settings.php:
|
380 |
msgid "Directions server"
|
381 |
msgstr ""
|
382 |
|
@@ -384,19 +384,19 @@ msgstr ""
|
|
384 |
msgid "Directions units"
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: languages/texts.php:89 mappress_settings.php:
|
388 |
msgid "Miscellaneous"
|
389 |
msgstr ""
|
390 |
|
391 |
-
#: languages/texts.php:90 mappress_settings.php:
|
392 |
msgid "Map sizes"
|
393 |
msgstr ""
|
394 |
|
395 |
-
#: languages/texts.php:91 mappress_settings.php:
|
396 |
msgid "Scripts"
|
397 |
msgstr ""
|
398 |
|
399 |
-
#: languages/texts.php:92 mappress_settings.php:
|
400 |
msgid "Adaptive display"
|
401 |
msgstr ""
|
402 |
|
@@ -408,20 +408,20 @@ msgstr ""
|
|
408 |
msgid "Use the settings below to automatically create maps from custom fields."
|
409 |
msgstr ""
|
410 |
|
411 |
-
#: languages/texts.php:95 mappress_settings.php:
|
412 |
msgid "Recenter maps when window is resized"
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: languages/texts.php:96 mappress_settings.php:
|
416 |
#: pro/mappress_pro_settings.php:130
|
417 |
msgid "more info"
|
418 |
msgstr ""
|
419 |
|
420 |
-
#: languages/texts.php:97 mappress_settings.php:
|
421 |
msgid "Required to display maps"
|
422 |
msgstr ""
|
423 |
|
424 |
-
#: languages/texts.php:98 mappress_settings.php:
|
425 |
msgid "Output scripts in footer"
|
426 |
msgstr ""
|
427 |
|
@@ -469,7 +469,7 @@ msgstr ""
|
|
469 |
msgid "Use a specific %s for map controls and geocoding"
|
470 |
msgstr ""
|
471 |
|
472 |
-
#: languages/texts.php:110 mappress_settings.php:
|
473 |
msgid "Default"
|
474 |
msgstr ""
|
475 |
|
@@ -545,27 +545,27 @@ msgstr ""
|
|
545 |
msgid "Road map"
|
546 |
msgstr ""
|
547 |
|
548 |
-
#: languages/texts.php:129 pro/mappress_widget.php:
|
549 |
msgid "Satellite"
|
550 |
msgstr ""
|
551 |
|
552 |
-
#: languages/texts.php:130 pro/mappress_widget.php:
|
553 |
msgid "Terrain"
|
554 |
msgstr ""
|
555 |
|
556 |
-
#: languages/texts.php:131 pro/mappress_widget.php:
|
557 |
msgid "Hybrid"
|
558 |
msgstr ""
|
559 |
|
560 |
-
#: languages/texts.php:132 mappress_settings.php:
|
561 |
msgid "Google"
|
562 |
msgstr ""
|
563 |
|
564 |
-
#: languages/texts.php:133 mappress_settings.php:
|
565 |
msgid "Inline"
|
566 |
msgstr ""
|
567 |
|
568 |
-
#: languages/texts.php:134 mappress_settings.php:
|
569 |
msgid "None"
|
570 |
msgstr ""
|
571 |
|
@@ -589,27 +589,27 @@ msgstr ""
|
|
589 |
msgid "Default alignment"
|
590 |
msgstr ""
|
591 |
|
592 |
-
#: languages/texts.php:140 mappress_settings.php:
|
593 |
msgid "Center"
|
594 |
msgstr ""
|
595 |
|
596 |
-
#: languages/texts.php:141 mappress_settings.php:
|
597 |
msgid "Left"
|
598 |
msgstr ""
|
599 |
|
600 |
-
#: languages/texts.php:142 mappress_settings.php:
|
601 |
msgid "Right"
|
602 |
msgstr ""
|
603 |
|
604 |
-
#: languages/texts.php:143
|
605 |
msgid "Default zoom for POIs entered by lat/lng"
|
606 |
msgstr ""
|
607 |
|
608 |
-
#: languages/texts.php:144 mappress_settings.php:
|
609 |
msgid "Top of post"
|
610 |
msgstr ""
|
611 |
|
612 |
-
#: languages/texts.php:145 mappress_settings.php:
|
613 |
msgid "Bottom of post"
|
614 |
msgstr ""
|
615 |
|
@@ -621,7 +621,7 @@ msgstr ""
|
|
621 |
msgid "Load %s"
|
622 |
msgstr ""
|
623 |
|
624 |
-
#: languages/texts.php:148 mappress_settings.php:
|
625 |
msgid "Default size"
|
626 |
msgstr ""
|
627 |
|
@@ -645,11 +645,11 @@ msgstr ""
|
|
645 |
msgid "%s on WordPress.org"
|
646 |
msgstr ""
|
647 |
|
648 |
-
#: languages/texts.php:154 mappress_settings.php:
|
649 |
msgid "Thanks for your support!"
|
650 |
msgstr ""
|
651 |
|
652 |
-
#: languages/texts.php:155 mappress_settings.php:
|
653 |
msgid "Easy Google Maps"
|
654 |
msgstr ""
|
655 |
|
@@ -657,15 +657,15 @@ msgstr ""
|
|
657 |
msgid "Like this plugin?"
|
658 |
msgstr ""
|
659 |
|
660 |
-
#: languages/texts.php:157 mappress_settings.php:
|
661 |
msgid "Sample Map"
|
662 |
msgstr ""
|
663 |
|
664 |
-
#: languages/texts.php:158 mappress_settings.php:
|
665 |
msgid "Save Changes"
|
666 |
msgstr ""
|
667 |
|
668 |
-
#: languages/texts.php:159 mappress_settings.php:
|
669 |
msgid "Reset Defaults"
|
670 |
msgstr ""
|
671 |
|
@@ -921,7 +921,7 @@ msgstr ""
|
|
921 |
msgid "Map Zoom"
|
922 |
msgstr ""
|
923 |
|
924 |
-
#: languages/texts.php:222 pro/mappress_widget.php:
|
925 |
msgid "Map"
|
926 |
msgstr ""
|
927 |
|
@@ -945,39 +945,39 @@ msgstr ""
|
|
945 |
msgid "Force Resize"
|
946 |
msgstr ""
|
947 |
|
948 |
-
#: languages/texts.php:228 pro/mappress_widget.php:
|
949 |
msgid "Widget title"
|
950 |
msgstr ""
|
951 |
|
952 |
-
#: languages/texts.php:229 pro/mappress_widget.php:
|
953 |
msgid "Map size"
|
954 |
msgstr ""
|
955 |
|
956 |
-
#: languages/texts.php:230 pro/mappress_widget.php:
|
957 |
msgid "Show"
|
958 |
msgstr ""
|
959 |
|
960 |
-
#: languages/texts.php:231 pro/mappress_widget.php:
|
961 |
msgid "Current posts"
|
962 |
msgstr ""
|
963 |
|
964 |
-
#: languages/texts.php:232 pro/mappress_widget.php:
|
965 |
msgid "Hide if empty"
|
966 |
msgstr ""
|
967 |
|
968 |
-
#: languages/texts.php:233 pro/mappress_widget.php:
|
969 |
msgid "All posts"
|
970 |
msgstr ""
|
971 |
|
972 |
-
#: languages/texts.php:234 pro/mappress_widget.php:
|
973 |
msgid "Custom query"
|
974 |
msgstr ""
|
975 |
|
976 |
-
#: languages/texts.php:235 pro/mappress_widget.php:
|
977 |
msgid "Learn about queries"
|
978 |
msgstr ""
|
979 |
|
980 |
-
#: languages/texts.php:236 pro/mappress_widget.php:
|
981 |
msgid "Show POI list"
|
982 |
msgstr ""
|
983 |
|
@@ -985,11 +985,11 @@ msgstr ""
|
|
985 |
msgid "Link POIs to posts"
|
986 |
msgstr ""
|
987 |
|
988 |
-
#: languages/texts.php:238 pro/mappress_widget.php:
|
989 |
msgid "Map type"
|
990 |
msgstr ""
|
991 |
|
992 |
-
#: languages/texts.php:239 pro/mappress_widget.php:
|
993 |
msgid "Other Settings"
|
994 |
msgstr ""
|
995 |
|
@@ -1041,51 +1041,47 @@ msgstr ""
|
|
1041 |
msgid "Chris Richardson"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
-
#: mappress_settings.php:
|
1045 |
msgid "License"
|
1046 |
msgstr ""
|
1047 |
|
1048 |
-
#: mappress_settings.php:
|
1049 |
msgid "Google API key"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
-
#: mappress_settings.php:
|
1053 |
msgid "Automatic display"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
-
#: mappress_settings.php:
|
1057 |
msgid "Google Server API key"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
-
#: mappress_settings.php:
|
1061 |
msgid "Country code"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
-
#: mappress_settings.php:
|
1065 |
msgid "%s for searching"
|
1066 |
msgstr ""
|
1067 |
|
1068 |
-
#: mappress_settings.php:
|
1069 |
msgid "%s for map controls"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
-
#: mappress_settings.php:
|
1073 |
-
msgid "Default zoom for street addresses"
|
1074 |
-
msgstr ""
|
1075 |
-
|
1076 |
-
#: mappress_settings.php:270
|
1077 |
msgid "Width (px or %)"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
-
#: mappress_settings.php:
|
1081 |
msgid "Height (px)"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
-
#: mappress_settings.php:
|
1085 |
msgid "rate it 5 Stars"
|
1086 |
msgstr ""
|
1087 |
|
1088 |
-
#: mappress_settings.php:
|
1089 |
msgid "Please %s on WordPress.org."
|
1090 |
msgstr ""
|
1091 |
|
@@ -1189,7 +1185,7 @@ msgstr ""
|
|
1189 |
msgid "or "
|
1190 |
msgstr ""
|
1191 |
|
1192 |
-
#: pro/mappress_widget.php:
|
1193 |
msgid "Example: initialopeninfo=\"true\""
|
1194 |
msgstr ""
|
1195 |
|
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.45.1\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
|
7 |
+
"POT-Creation-Date: 2017-08-25 15:36:43+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
171 |
msgstr ""
|
172 |
|
173 |
#: languages/texts.php:35 mappress.php:573 mappress_poi.php:180
|
174 |
+
#: mappress_poi.php:201 mappress_settings.php:104
|
175 |
msgid "Directions"
|
176 |
msgstr ""
|
177 |
|
199 |
msgid "Transit"
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: languages/texts.php:42 mappress.php:578 pro/mappress_pro_settings.php:244
|
203 |
+
#: pro/mappress_widget.php:94
|
204 |
msgid "Zoom"
|
205 |
msgstr ""
|
206 |
|
264 |
msgid "Smaller map"
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: languages/texts.php:59
|
268 |
msgid "Directions to"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: languages/texts.php:60
|
272 |
msgid "Directions from"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: languages/texts.php:61 mappress_settings.php:97
|
276 |
msgid "Basic Settings"
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: languages/texts.php:62 mappress_settings.php:99
|
280 |
msgid "Post types"
|
281 |
msgstr ""
|
282 |
|
316 |
msgid "Map controls"
|
317 |
msgstr ""
|
318 |
|
319 |
+
#: languages/texts.php:72 mappress_settings.php:102
|
320 |
msgid "Map Settings"
|
321 |
msgstr ""
|
322 |
|
324 |
msgid "Map links"
|
325 |
msgstr ""
|
326 |
|
327 |
+
#: languages/texts.php:74 mappress_settings.php:103
|
328 |
msgid "Map alignment"
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: languages/texts.php:75 mappress_settings.php:108 mappress_settings.php:233
|
332 |
msgid "Open first POI"
|
333 |
msgstr ""
|
334 |
|
335 |
+
#: languages/texts.php:76 mappress_settings.php:106
|
336 |
msgid "POI Settings"
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: languages/texts.php:77
|
340 |
msgid "POI links"
|
341 |
msgstr ""
|
342 |
|
344 |
msgid "Tooltips"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: languages/texts.php:79 mappress_settings.php:107
|
348 |
msgid "Default zoom"
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: languages/texts.php:80 mappress_settings.php:111
|
352 |
msgid "Mashups"
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: languages/texts.php:81 mappress_settings.php:112
|
356 |
msgid "Icons"
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: languages/texts.php:82 mappress_settings.php:113
|
360 |
msgid "Styled Maps"
|
361 |
msgstr ""
|
362 |
|
363 |
+
#: languages/texts.php:83 mappress_settings.php:114
|
364 |
msgid "Geocoding"
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: languages/texts.php:84 mappress_settings.php:118
|
368 |
msgid "Localization"
|
369 |
msgstr ""
|
370 |
|
371 |
+
#: languages/texts.php:85 mappress_settings.php:119 mappress_settings.php:237
|
372 |
msgid "Language"
|
373 |
msgstr ""
|
374 |
|
375 |
+
#: languages/texts.php:86 mappress_settings.php:120
|
376 |
msgid "Country"
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: languages/texts.php:87 mappress_settings.php:121
|
380 |
msgid "Directions server"
|
381 |
msgstr ""
|
382 |
|
384 |
msgid "Directions units"
|
385 |
msgstr ""
|
386 |
|
387 |
+
#: languages/texts.php:89 mappress_settings.php:123
|
388 |
msgid "Miscellaneous"
|
389 |
msgstr ""
|
390 |
|
391 |
+
#: languages/texts.php:90 mappress_settings.php:124
|
392 |
msgid "Map sizes"
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: languages/texts.php:91 mappress_settings.php:125
|
396 |
msgid "Scripts"
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: languages/texts.php:92 mappress_settings.php:126
|
400 |
msgid "Adaptive display"
|
401 |
msgstr ""
|
402 |
|
408 |
msgid "Use the settings below to automatically create maps from custom fields."
|
409 |
msgstr ""
|
410 |
|
411 |
+
#: languages/texts.php:95 mappress_settings.php:180
|
412 |
msgid "Recenter maps when window is resized"
|
413 |
msgstr ""
|
414 |
|
415 |
+
#: languages/texts.php:96 mappress_settings.php:196
|
416 |
#: pro/mappress_pro_settings.php:130
|
417 |
msgid "more info"
|
418 |
msgstr ""
|
419 |
|
420 |
+
#: languages/texts.php:97 mappress_settings.php:197
|
421 |
msgid "Required to display maps"
|
422 |
msgstr ""
|
423 |
|
424 |
+
#: languages/texts.php:98 mappress_settings.php:229
|
425 |
msgid "Output scripts in footer"
|
426 |
msgstr ""
|
427 |
|
469 |
msgid "Use a specific %s for map controls and geocoding"
|
470 |
msgstr ""
|
471 |
|
472 |
+
#: languages/texts.php:110 mappress_settings.php:185
|
473 |
msgid "Default"
|
474 |
msgstr ""
|
475 |
|
545 |
msgid "Road map"
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: languages/texts.php:129 pro/mappress_widget.php:112
|
549 |
msgid "Satellite"
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: languages/texts.php:130 pro/mappress_widget.php:113
|
553 |
msgid "Terrain"
|
554 |
msgstr ""
|
555 |
|
556 |
+
#: languages/texts.php:131 pro/mappress_widget.php:111
|
557 |
msgid "Hybrid"
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: languages/texts.php:132 mappress_settings.php:218
|
561 |
msgid "Google"
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: languages/texts.php:133 mappress_settings.php:219
|
565 |
msgid "Inline"
|
566 |
msgstr ""
|
567 |
|
568 |
+
#: languages/texts.php:134 mappress_settings.php:204
|
569 |
msgid "None"
|
570 |
msgstr ""
|
571 |
|
589 |
msgid "Default alignment"
|
590 |
msgstr ""
|
591 |
|
592 |
+
#: languages/texts.php:140 mappress_settings.php:186
|
593 |
msgid "Center"
|
594 |
msgstr ""
|
595 |
|
596 |
+
#: languages/texts.php:141 mappress_settings.php:187
|
597 |
msgid "Left"
|
598 |
msgstr ""
|
599 |
|
600 |
+
#: languages/texts.php:142 mappress_settings.php:188
|
601 |
msgid "Right"
|
602 |
msgstr ""
|
603 |
|
604 |
+
#: languages/texts.php:143 mappress_settings.php:245
|
605 |
msgid "Default zoom for POIs entered by lat/lng"
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: languages/texts.php:144 mappress_settings.php:202
|
609 |
msgid "Top of post"
|
610 |
msgstr ""
|
611 |
|
612 |
+
#: languages/texts.php:145 mappress_settings.php:203
|
613 |
msgid "Bottom of post"
|
614 |
msgstr ""
|
615 |
|
621 |
msgid "Load %s"
|
622 |
msgstr ""
|
623 |
|
624 |
+
#: languages/texts.php:148 mappress_settings.php:255
|
625 |
msgid "Default size"
|
626 |
msgstr ""
|
627 |
|
645 |
msgid "%s on WordPress.org"
|
646 |
msgstr ""
|
647 |
|
648 |
+
#: languages/texts.php:154 mappress_settings.php:289
|
649 |
msgid "Thanks for your support!"
|
650 |
msgstr ""
|
651 |
|
652 |
+
#: languages/texts.php:155 mappress_settings.php:296
|
653 |
msgid "Easy Google Maps"
|
654 |
msgstr ""
|
655 |
|
657 |
msgid "Like this plugin?"
|
658 |
msgstr ""
|
659 |
|
660 |
+
#: languages/texts.php:157 mappress_settings.php:308
|
661 |
msgid "Sample Map"
|
662 |
msgstr ""
|
663 |
|
664 |
+
#: languages/texts.php:158 mappress_settings.php:329
|
665 |
msgid "Save Changes"
|
666 |
msgstr ""
|
667 |
|
668 |
+
#: languages/texts.php:159 mappress_settings.php:330
|
669 |
msgid "Reset Defaults"
|
670 |
msgstr ""
|
671 |
|
921 |
msgid "Map Zoom"
|
922 |
msgstr ""
|
923 |
|
924 |
+
#: languages/texts.php:222 pro/mappress_widget.php:110
|
925 |
msgid "Map"
|
926 |
msgstr ""
|
927 |
|
945 |
msgid "Force Resize"
|
946 |
msgstr ""
|
947 |
|
948 |
+
#: languages/texts.php:228 pro/mappress_widget.php:64
|
949 |
msgid "Widget title"
|
950 |
msgstr ""
|
951 |
|
952 |
+
#: languages/texts.php:229 pro/mappress_widget.php:69
|
953 |
msgid "Map size"
|
954 |
msgstr ""
|
955 |
|
956 |
+
#: languages/texts.php:230 pro/mappress_widget.php:75
|
957 |
msgid "Show"
|
958 |
msgstr ""
|
959 |
|
960 |
+
#: languages/texts.php:231 pro/mappress_widget.php:76
|
961 |
msgid "Current posts"
|
962 |
msgstr ""
|
963 |
|
964 |
+
#: languages/texts.php:232 pro/mappress_widget.php:77
|
965 |
msgid "Hide if empty"
|
966 |
msgstr ""
|
967 |
|
968 |
+
#: languages/texts.php:233 pro/mappress_widget.php:79
|
969 |
msgid "All posts"
|
970 |
msgstr ""
|
971 |
|
972 |
+
#: languages/texts.php:234 pro/mappress_widget.php:80
|
973 |
msgid "Custom query"
|
974 |
msgstr ""
|
975 |
|
976 |
+
#: languages/texts.php:235 pro/mappress_widget.php:83
|
977 |
msgid "Learn about queries"
|
978 |
msgstr ""
|
979 |
|
980 |
+
#: languages/texts.php:236 pro/mappress_widget.php:88
|
981 |
msgid "Show POI list"
|
982 |
msgstr ""
|
983 |
|
985 |
msgid "Link POIs to posts"
|
986 |
msgstr ""
|
987 |
|
988 |
+
#: languages/texts.php:238 pro/mappress_widget.php:107
|
989 |
msgid "Map type"
|
990 |
msgstr ""
|
991 |
|
992 |
+
#: languages/texts.php:239 pro/mappress_widget.php:121
|
993 |
msgid "Other Settings"
|
994 |
msgstr ""
|
995 |
|
1041 |
msgid "Chris Richardson"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
+
#: mappress_settings.php:95
|
1045 |
msgid "License"
|
1046 |
msgstr ""
|
1047 |
|
1048 |
+
#: mappress_settings.php:98
|
1049 |
msgid "Google API key"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: mappress_settings.php:100
|
1053 |
msgid "Automatic display"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
+
#: mappress_settings.php:115
|
1057 |
msgid "Google Server API key"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
+
#: mappress_settings.php:211
|
1061 |
msgid "Country code"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
+
#: mappress_settings.php:213
|
1065 |
msgid "%s for searching"
|
1066 |
msgstr ""
|
1067 |
|
1068 |
+
#: mappress_settings.php:239
|
1069 |
msgid "%s for map controls"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
+
#: mappress_settings.php:255
|
|
|
|
|
|
|
|
|
1073 |
msgid "Width (px or %)"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
+
#: mappress_settings.php:255
|
1077 |
msgid "Height (px)"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
+
#: mappress_settings.php:286
|
1081 |
msgid "rate it 5 Stars"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
+
#: mappress_settings.php:288
|
1085 |
msgid "Please %s on WordPress.org."
|
1086 |
msgstr ""
|
1087 |
|
1185 |
msgid "or "
|
1186 |
msgstr ""
|
1187 |
|
1188 |
+
#: pro/mappress_widget.php:124
|
1189 |
msgid "Example: initialopeninfo=\"true\""
|
1190 |
msgstr ""
|
1191 |
|
languages/texts.php
CHANGED
@@ -259,7 +259,6 @@ __("Google Server API key");
|
|
259 |
__("Country code");
|
260 |
__("%s for searching");
|
261 |
__("%s for map controls");
|
262 |
-
__("Default zoom for street addresses");
|
263 |
__("Width (px or %)");
|
264 |
__("Height (px)");
|
265 |
__("rate it 5 Stars");
|
259 |
__("Country code");
|
260 |
__("%s for searching");
|
261 |
__("%s for map controls");
|
|
|
262 |
__("Width (px or %)");
|
263 |
__("Height (px)");
|
264 |
__("rate it 5 Stars");
|
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.45
|
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/)
|
@@ -32,7 +32,7 @@ if (is_dir(dirname( __FILE__ ) . '/pro')) {
|
|
32 |
include_once dirname( __FILE__ ) . '/pro/mappress_widget.php';
|
33 |
}
|
34 |
class Mappress {
|
35 |
-
const VERSION = '2.45';
|
36 |
|
37 |
static
|
38 |
$baseurl,
|
@@ -57,29 +57,29 @@ class Mappress {
|
|
57 |
if (self::$pro)
|
58 |
self::$updater = new Mappress_Updater(self::$basename, 'mappress', self::VERSION, self::$options->license, self::$options->betas, self::$options->autoupdate);
|
59 |
|
60 |
-
add_action('admin_menu', array(
|
61 |
-
add_action('init', array(
|
62 |
-
add_action('plugins_loaded', array(
|
63 |
|
64 |
-
add_shortcode('mappress', array(
|
65 |
-
add_action('admin_notices', array(
|
66 |
|
67 |
// Post hooks
|
68 |
-
add_action('deleted_post', array(
|
69 |
|
70 |
// Filter to automatically add maps to post/page content
|
71 |
-
add_filter('the_content', array(
|
72 |
|
73 |
// Namespace
|
74 |
-
add_action('wp_head', array(
|
75 |
-
add_action('admin_head', array(
|
76 |
|
77 |
// Scripts and stylesheets
|
78 |
-
add_action('wp_enqueue_scripts', array(
|
79 |
-
add_action('admin_enqueue_scripts', array(
|
80 |
|
81 |
// Plugin action links
|
82 |
-
add_filter("plugin_action_links_" . self::$basename, array(
|
83 |
|
84 |
if (self::$pro) {
|
85 |
add_shortcode('mashup', array(__CLASS__, 'shortcode_mashup'));
|
@@ -88,7 +88,7 @@ class Mappress {
|
|
88 |
|
89 |
// Slow heartbeat
|
90 |
if (self::$debug)
|
91 |
-
add_filter( 'heartbeat_settings', array(
|
92 |
}
|
93 |
|
94 |
static function heartbeat_settings( $settings ) {
|
@@ -120,7 +120,7 @@ class Mappress {
|
|
120 |
}
|
121 |
}
|
122 |
|
123 |
-
function plugin_action_links($links, $file) {
|
124 |
$settings_link = "<a href='" . admin_url("admin.php?page=mappress") . "'>" . __('Settings', 'mappress-google-maps-for-wordpress') . "</a>";
|
125 |
array_unshift( $links, $settings_link );
|
126 |
return $links;
|
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.45.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/)
|
32 |
include_once dirname( __FILE__ ) . '/pro/mappress_widget.php';
|
33 |
}
|
34 |
class Mappress {
|
35 |
+
const VERSION = '2.45.1';
|
36 |
|
37 |
static
|
38 |
$baseurl,
|
57 |
if (self::$pro)
|
58 |
self::$updater = new Mappress_Updater(self::$basename, 'mappress', self::VERSION, self::$options->license, self::$options->betas, self::$options->autoupdate);
|
59 |
|
60 |
+
add_action('admin_menu', array(__CLASS__, 'admin_menu'));
|
61 |
+
add_action('init', array(__CLASS__, 'init'));
|
62 |
+
add_action('plugins_loaded', array(__CLASS__, 'plugins_loaded'));
|
63 |
|
64 |
+
add_shortcode('mappress', array(__CLASS__, 'shortcode_map'));
|
65 |
+
add_action('admin_notices', array(__CLASS__, 'admin_notices'));
|
66 |
|
67 |
// Post hooks
|
68 |
+
add_action('deleted_post', array(__CLASS__, 'deleted_post'));
|
69 |
|
70 |
// Filter to automatically add maps to post/page content
|
71 |
+
add_filter('the_content', array(__CLASS__, 'the_content'), 2);
|
72 |
|
73 |
// Namespace
|
74 |
+
add_action('wp_head', array(__CLASS__, 'wp_head'), 0);
|
75 |
+
add_action('admin_head', array(__CLASS__, 'wp_head'), 0);
|
76 |
|
77 |
// Scripts and stylesheets
|
78 |
+
add_action('wp_enqueue_scripts', array(__CLASS__, 'wp_enqueue_scripts'));
|
79 |
+
add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
|
80 |
|
81 |
// Plugin action links
|
82 |
+
add_filter("plugin_action_links_" . self::$basename, array(__CLASS__, 'plugin_action_links'), 10, 2);
|
83 |
|
84 |
if (self::$pro) {
|
85 |
add_shortcode('mashup', array(__CLASS__, 'shortcode_mashup'));
|
88 |
|
89 |
// Slow heartbeat
|
90 |
if (self::$debug)
|
91 |
+
add_filter( 'heartbeat_settings', array(__CLASS__, 'heartbeat_settings'));
|
92 |
}
|
93 |
|
94 |
static function heartbeat_settings( $settings ) {
|
120 |
}
|
121 |
}
|
122 |
|
123 |
+
static function plugin_action_links($links, $file) {
|
124 |
$settings_link = "<a href='" . admin_url("admin.php?page=mappress") . "'>" . __('Settings', 'mappress-google-maps-for-wordpress') . "</a>";
|
125 |
array_unshift( $links, $settings_link );
|
126 |
return $links;
|
mappress_settings.php
CHANGED
@@ -38,7 +38,6 @@ class Mappress_Options extends Mappress_Obj {
|
|
38 |
$metaKeys = array(),
|
39 |
$metaSyncSave = true,
|
40 |
$name,
|
41 |
-
$poiLinks = array('directions_to', 'zoom'),
|
42 |
$poiList = false,
|
43 |
$poiZoom = 15,
|
44 |
$postTypes = array('post', 'page'),
|
@@ -105,7 +104,6 @@ class Mappress_Settings {
|
|
105 |
$this->add_field('directions', __('Directions', 'mappress-google-maps-for-wordpress'), 'maps');
|
106 |
|
107 |
$this->add_section('pois', __('POI Settings', 'mappress-google-maps-for-wordpress'));
|
108 |
-
$this->add_field('poiLinks', __('POI links', 'mappress-google-maps-for-wordpress'), 'pois');
|
109 |
$this->add_field('poiZoom', __('Default zoom', 'mappress-google-maps-for-wordpress'), 'pois');
|
110 |
$this->add_field('initialOpenInfo', __('Open first POI', 'mappress-google-maps-for-wordpress'), 'pois');
|
111 |
|
@@ -138,8 +136,6 @@ class Mappress_Settings {
|
|
138 |
}
|
139 |
|
140 |
function validate($input) {
|
141 |
-
global $mappress;
|
142 |
-
|
143 |
// If reset defaults was clicked
|
144 |
if (isset($_POST['reset_defaults'])) {
|
145 |
$options = new Mappress_Options();
|
@@ -173,7 +169,6 @@ class Mappress_Settings {
|
|
173 |
$item = Mappress::string_to_boolean($item);
|
174 |
|
175 |
// For arrays passed as checkboxes set empty array for no selection
|
176 |
-
$input['poiLinks'] = (isset($input['poiLinks'])) ? $input['poiLinks'] : array();
|
177 |
$input['postTypes'] = (isset($input['postTypes'])) ? $input['postTypes'] : array();
|
178 |
|
179 |
foreach(array('apiKey', 'apiKeyServer') as $key)
|
@@ -221,8 +216,7 @@ class Mappress_Settings {
|
|
221 |
function set_directions($name) {
|
222 |
$directions_types = array(
|
223 |
'google' => __('Google', 'mappress-google-maps-for-wordpress'),
|
224 |
-
'inline' => __('Inline', 'mappress-google-maps-for-wordpress')
|
225 |
-
'none' => __('None', 'mappress-google-maps-for-wordpress')
|
226 |
);
|
227 |
echo Mappress_Controls::radios($name, $directions_types, $this->options->directions);
|
228 |
}
|
@@ -245,19 +239,10 @@ class Mappress_Settings {
|
|
245 |
echo ' ' . sprintf(__('%s for map controls', 'mappress-google-maps-for-wordpress'), $lang_link);
|
246 |
}
|
247 |
|
248 |
-
function set_poi_links($name) {
|
249 |
-
$labels = array(
|
250 |
-
'zoom' => __('Zoom', 'mappress-google-maps-for-wordpress'),
|
251 |
-
'directions_to' => __('Directions to', 'mappress-google-maps-for-wordpress'),
|
252 |
-
'directions_from' => __('Directions from', 'mappress-google-maps-for-wordpress')
|
253 |
-
);
|
254 |
-
echo Mappress_Controls::checkboxes($name, $labels, $this->options->poiLinks);
|
255 |
-
}
|
256 |
-
|
257 |
function set_poi_zoom($name) {
|
258 |
$zooms = array_combine(range(1, 17), range(1,17));
|
259 |
-
echo Mappress_Controls::select($name, $zooms, $this->options->poiZoom);
|
260 |
-
echo __("Default zoom for
|
261 |
}
|
262 |
|
263 |
function set_post_types($name) {
|
38 |
$metaKeys = array(),
|
39 |
$metaSyncSave = true,
|
40 |
$name,
|
|
|
41 |
$poiList = false,
|
42 |
$poiZoom = 15,
|
43 |
$postTypes = array('post', 'page'),
|
104 |
$this->add_field('directions', __('Directions', 'mappress-google-maps-for-wordpress'), 'maps');
|
105 |
|
106 |
$this->add_section('pois', __('POI Settings', 'mappress-google-maps-for-wordpress'));
|
|
|
107 |
$this->add_field('poiZoom', __('Default zoom', 'mappress-google-maps-for-wordpress'), 'pois');
|
108 |
$this->add_field('initialOpenInfo', __('Open first POI', 'mappress-google-maps-for-wordpress'), 'pois');
|
109 |
|
136 |
}
|
137 |
|
138 |
function validate($input) {
|
|
|
|
|
139 |
// If reset defaults was clicked
|
140 |
if (isset($_POST['reset_defaults'])) {
|
141 |
$options = new Mappress_Options();
|
169 |
$item = Mappress::string_to_boolean($item);
|
170 |
|
171 |
// For arrays passed as checkboxes set empty array for no selection
|
|
|
172 |
$input['postTypes'] = (isset($input['postTypes'])) ? $input['postTypes'] : array();
|
173 |
|
174 |
foreach(array('apiKey', 'apiKeyServer') as $key)
|
216 |
function set_directions($name) {
|
217 |
$directions_types = array(
|
218 |
'google' => __('Google', 'mappress-google-maps-for-wordpress'),
|
219 |
+
'inline' => __('Inline', 'mappress-google-maps-for-wordpress')
|
|
|
220 |
);
|
221 |
echo Mappress_Controls::radios($name, $directions_types, $this->options->directions);
|
222 |
}
|
239 |
echo ' ' . sprintf(__('%s for map controls', 'mappress-google-maps-for-wordpress'), $lang_link);
|
240 |
}
|
241 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
function set_poi_zoom($name) {
|
243 |
$zooms = array_combine(range(1, 17), range(1,17));
|
244 |
+
echo Mappress_Controls::select($name, $zooms, (int) $this->options->poiZoom);
|
245 |
+
echo __("Default zoom for POIs entered by lat/lng", 'mappress-google-maps-for-wordpress');
|
246 |
}
|
247 |
|
248 |
function set_post_types($name) {
|
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.45
|
8 |
|
9 |
MapPress is the most popular and easiest way to create great-looking Google Maps and driving directions in your blog.
|
10 |
|
@@ -15,6 +15,12 @@ The plugin will automatically insert a great-looking interactive map into your b
|
|
15 |
|
16 |
For even more features, try [MapPress Pro](http://wphostreviews.com/mappress)
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
= Key Features =
|
19 |
* MapPress is based on the latest Google maps API v3
|
20 |
* WordPress MultiSite compatible
|
@@ -35,11 +41,6 @@ For even more features, try [MapPress Pro](http://wphostreviews.com/mappress)
|
|
35 |
* Create mashups by taxonomy, tag, category, or post to show multiple locations on a single map
|
36 |
* Map widget to show a map or a mashup
|
37 |
|
38 |
-
[Home Page](http://www.wphostreviews.com/mappress)
|
39 |
-
[Documentation](http://www.wphostreviews.com/mappress-documentation)
|
40 |
-
[FAQ](http://www.wphostreviews.com/mappress-faq)
|
41 |
-
[Support](http://www.wphostreviews.com/mappress-faq)
|
42 |
-
|
43 |
== Screenshots ==
|
44 |
1. Options screen
|
45 |
2. More options
|
@@ -85,6 +86,15 @@ Please see the plugin documentation pages:
|
|
85 |
|
86 |
== Changelog ==
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
= 2.45 =
|
89 |
= Added: a new checkbox in the map editor allows you to choose whether to save the center and zoom. If unchecked, the map will auto-center when displayed.
|
90 |
* Added: POI list sorting can now be set via the settings screen, the default is no sort
|
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.45.1
|
8 |
|
9 |
MapPress is the most popular and easiest way to create great-looking Google Maps and driving directions in your blog.
|
10 |
|
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 =
|
25 |
* MapPress is based on the latest Google maps API v3
|
26 |
* WordPress MultiSite compatible
|
41 |
* Create mashups by taxonomy, tag, category, or post to show multiple locations on a single map
|
42 |
* Map widget to show a map or a mashup
|
43 |
|
|
|
|
|
|
|
|
|
|
|
44 |
== Screenshots ==
|
45 |
1. Options screen
|
46 |
2. More options
|
86 |
|
87 |
== Changelog ==
|
88 |
|
89 |
+
= 2.45.1 =
|
90 |
+
* Fixed: maps were not saving attributes correctly including title, size and map type
|
91 |
+
* Fixed: maps with one POI were not setting zoom correctly
|
92 |
+
* Fixed: setting for default poi zoom was not saving
|
93 |
+
* Fixed: setting for POI click ('mashupClick') was ignored if used in shortcode
|
94 |
+
* Changed: directions 'to' is added by default for all POIs
|
95 |
+
* Removed: setting for no directions (directions="none")
|
96 |
+
* Removed: POI links ('poiLinks') setting removed
|
97 |
+
|
98 |
= 2.45 =
|
99 |
= Added: a new checkbox in the map editor allows you to choose whether to save the center and zoom. If unchecked, the map will auto-center when displayed.
|
100 |
* Added: POI list sorting can now be set via the settings screen, the default is no sort
|