Version Description
Download this release
Release Info
Developer | webaware |
Plugin | Flexible Map |
Version | 1.9.2 |
Comparing to | |
See all releases |
Code changes from version 1.9.1 to 1.9.2
- css/styles.css +6 -0
- flexible-map.php +3 -3
- includes/class.FlxMapAdmin.php +3 -3
- includes/class.FlxMapPlugin.php +1 -1
- js/.jshintrc +2 -1
- js/flexible-map.js +3 -2
- js/flexible-map.min.js +3 -2
- languages/flexible-map.pot +15 -22
- readme.md +3 -3
- readme.txt +95 -54
css/styles.css
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
/* stop some themes from messing up Google Maps' styling (e.g. twentyeleven, twentytwelve, twentythirteen...) */
|
|
|
2 |
|
3 |
.flxmap-container * {
|
4 |
-webkit-box-sizing: content-box;
|
@@ -59,3 +60,8 @@
|
|
59 |
}
|
60 |
|
61 |
}
|
|
|
|
|
|
|
|
|
|
1 |
/* stop some themes from messing up Google Maps' styling (e.g. twentyeleven, twentytwelve, twentythirteen...) */
|
2 |
+
/* http://flexible-map.webaware.net.au/ */
|
3 |
|
4 |
.flxmap-container * {
|
5 |
-webkit-box-sizing: content-box;
|
60 |
}
|
61 |
|
62 |
}
|
63 |
+
|
64 |
+
/* fix vertical copyright message on IE8 in some themes */
|
65 |
+
.flxmap-container .gm-style-cc > div {
|
66 |
+
word-wrap: normal;
|
67 |
+
}
|
flexible-map.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Flexible Map
|
4 |
Plugin URI: http://flexible-map.webaware.net.au/
|
5 |
Description: Embed Google Maps in pages and posts, either by centre coodinates or street address, or by URL to a Google Earth KML file.
|
6 |
-
Version: 1.9.
|
7 |
Author: WebAware
|
8 |
Author URI: http://webaware.com.au/
|
9 |
Text Domain: flexible-map
|
@@ -11,7 +11,7 @@ Domain Path: /languages/
|
|
11 |
*/
|
12 |
|
13 |
/*
|
14 |
-
copyright (c) 2011-
|
15 |
|
16 |
This program is free software; you can redistribute it and/or
|
17 |
modify it under the terms of the GNU General Public License
|
@@ -36,7 +36,7 @@ if (!defined('ABSPATH')) {
|
|
36 |
define('FLXMAP_PLUGIN_FILE', __FILE__);
|
37 |
define('FLXMAP_PLUGIN_ROOT', dirname(__FILE__) . '/');
|
38 |
define('FLXMAP_PLUGIN_NAME', basename(dirname(__FILE__)) . '/' . basename(__FILE__));
|
39 |
-
define('FLXMAP_PLUGIN_VERSION', '1.9.
|
40 |
|
41 |
// shortcode tags
|
42 |
define('FLXMAP_PLUGIN_TAG_MAP', 'flexiblemap');
|
3 |
Plugin Name: Flexible Map
|
4 |
Plugin URI: http://flexible-map.webaware.net.au/
|
5 |
Description: Embed Google Maps in pages and posts, either by centre coodinates or street address, or by URL to a Google Earth KML file.
|
6 |
+
Version: 1.9.2
|
7 |
Author: WebAware
|
8 |
Author URI: http://webaware.com.au/
|
9 |
Text Domain: flexible-map
|
11 |
*/
|
12 |
|
13 |
/*
|
14 |
+
copyright (c) 2011-2015 WebAware Pty Ltd (email : support@webaware.com.au)
|
15 |
|
16 |
This program is free software; you can redistribute it and/or
|
17 |
modify it under the terms of the GNU General Public License
|
36 |
define('FLXMAP_PLUGIN_FILE', __FILE__);
|
37 |
define('FLXMAP_PLUGIN_ROOT', dirname(__FILE__) . '/');
|
38 |
define('FLXMAP_PLUGIN_NAME', basename(dirname(__FILE__)) . '/' . basename(__FILE__));
|
39 |
+
define('FLXMAP_PLUGIN_VERSION', '1.9.2');
|
40 |
|
41 |
// shortcode tags
|
42 |
define('FLXMAP_PLUGIN_TAG_MAP', 'flexiblemap');
|
includes/class.FlxMapAdmin.php
CHANGED
@@ -23,9 +23,9 @@ class FlxMapAdmin {
|
|
23 |
public function addPluginDetailsLinks($links, $file) {
|
24 |
// add settings link
|
25 |
if ($file == FLXMAP_PLUGIN_NAME) {
|
26 |
-
$links[] = sprintf('<a href="
|
27 |
-
$links[] = sprintf('<a href="
|
28 |
-
$links[] = sprintf('<a href="
|
29 |
$links[] = sprintf('<a href="http://shop.webaware.com.au/downloads/flexible-map/" target="_blank">%s</a>', _x('Donate', 'plugin details links', 'flexible-map'));
|
30 |
}
|
31 |
|
23 |
public function addPluginDetailsLinks($links, $file) {
|
24 |
// add settings link
|
25 |
if ($file == FLXMAP_PLUGIN_NAME) {
|
26 |
+
$links[] = sprintf('<a href="https://wordpress.org/support/plugin/wp-flexible-map" target="_blank">%s</a>', _x('Get Help', 'plugin details links', 'flexible-map'));
|
27 |
+
$links[] = sprintf('<a href="https://wordpress.org/plugins/wp-flexible-map/" target="_blank">%s</a>', _x('Rating', 'plugin details links', 'flexible-map'));
|
28 |
+
$links[] = sprintf('<a href="https://translate.webaware.com.au/projects/flexible-map" target="_blank">%s</a>', _x('Translate', 'plugin details links', 'flexible-map'));
|
29 |
$links[] = sprintf('<a href="http://shop.webaware.com.au/downloads/flexible-map/" target="_blank">%s</a>', _x('Donate', 'plugin details links', 'flexible-map'));
|
30 |
}
|
31 |
|
includes/class.FlxMapPlugin.php
CHANGED
@@ -80,7 +80,7 @@ class FlxMapPlugin {
|
|
80 |
public function enqueueScripts() {
|
81 |
// allow others to override the Google Maps API URL
|
82 |
$protocol = is_ssl() ? 'https' : 'http';
|
83 |
-
$args = apply_filters('flexmap_google_maps_api_args', array('v' => '3.
|
84 |
$apiURL = apply_filters('flexmap_google_maps_api_url', add_query_arg($args, "$protocol://maps.google.com/maps/api/js"));
|
85 |
if (!empty($apiURL)) {
|
86 |
wp_register_script('google-maps', $apiURL, false, null, true);
|
80 |
public function enqueueScripts() {
|
81 |
// allow others to override the Google Maps API URL
|
82 |
$protocol = is_ssl() ? 'https' : 'http';
|
83 |
+
$args = apply_filters('flexmap_google_maps_api_args', array('v' => '3.19', 'sensor' => 'false'));
|
84 |
$apiURL = apply_filters('flexmap_google_maps_api_url', add_query_arg($args, "$protocol://maps.google.com/maps/api/js"));
|
85 |
if (!empty($apiURL)) {
|
86 |
wp_register_script('google-maps', $apiURL, false, null, true);
|
js/.jshintrc
CHANGED
@@ -10,6 +10,7 @@
|
|
10 |
"browser": true,
|
11 |
"globals": {
|
12 |
"flxmap": false,
|
13 |
-
"google": false
|
|
|
14 |
}
|
15 |
}
|
10 |
"browser": true,
|
11 |
"globals": {
|
12 |
"flxmap": false,
|
13 |
+
"google": false,
|
14 |
+
"module": false
|
15 |
}
|
16 |
}
|
js/flexible-map.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
/*!
|
2 |
JavaScript for the WordPress plugin wp-flexible-map
|
3 |
-
copyright (c) 2011-
|
|
|
4 |
*/
|
5 |
|
6 |
function FlexibleMap() {
|
@@ -770,7 +771,7 @@ FlexibleMap.prototype = (function() {
|
|
770 |
panel.appendChild(form);
|
771 |
|
772 |
// hack to fix IE<=7 name weirdness for dynamically created form elements;
|
773 |
-
// see
|
774 |
if (typeof form.elements.from == "undefined") {
|
775 |
form.elements.from = from;
|
776 |
}
|
1 |
/*!
|
2 |
JavaScript for the WordPress plugin wp-flexible-map
|
3 |
+
copyright (c) 2011-2015 WebAware Pty Ltd, released under LGPL v2.1
|
4 |
+
http://flexible-map.webaware.net.au/
|
5 |
*/
|
6 |
|
7 |
function FlexibleMap() {
|
771 |
panel.appendChild(form);
|
772 |
|
773 |
// hack to fix IE<=7 name weirdness for dynamically created form elements;
|
774 |
+
// see https://msdn.microsoft.com/en-us/library/ms534184.aspx but have a hanky ready
|
775 |
if (typeof form.elements.from == "undefined") {
|
776 |
form.elements.from = from;
|
777 |
}
|
js/flexible-map.min.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
/*!
|
2 |
JavaScript for the WordPress plugin wp-flexible-map
|
3 |
-
copyright (c) 2011-
|
|
|
4 |
*/
|
5 |
-
;function FlexibleMap(){var f,d,b,g,a,e,c=false;this.getMap=function(){return f};this.getCenter=function(){return d};this.setCenter=function(h){d=h;f.setCenter(d)};this.setMarkerLocation=function(h){b=h};this.getMarkerLocation=function(){return b};this.setMarkerPoint=function(h){g=h};this.getMarkerPoint=function(){return g};this.setMarkerInfowin=function(h){a=h};this.getMarkerInfowin=function(){return a};this.getKmlLayer=function(){return e};this.redrawOnce=function(){if(!c){c=true;this.redraw()}};this.showMap=function(h,k){d=new google.maps.LatLng(k[0],k[1]);var i,j={small:google.maps.ZoomControlStyle.SMALL,large:google.maps.ZoomControlStyle.LARGE,"default":google.maps.ZoomControlStyle.DEFAULT},l=j.small;if(this.zoomControlStyle in j){l=j[this.zoomControlStyle]}i={mapTypeId:this.mapTypeId,mapTypeControl:this.mapTypeControl,scaleControl:this.scaleControl,panControl:this.panControl,streetViewControl:this.streetViewControl,zoomControl:this.zoomControl,zoomControlOptions:{style:l},draggable:this.draggable,disableDoubleClickZoom:!this.dblclickZoom,scrollwheel:this.scrollwheel,center:d,zoom:this.zoom};if(this.mapTypeIds){i.mapTypeControlOptions={mapTypeIds:this.mapTypeIds.split(",")}}f=new google.maps.Map(document.getElementById(h),i);if(this.mapTypeId in this.mapTypes){f.mapTypes.set(this.mapTypeId,this.mapTypes[this.mapTypeId]._styled_map)}return f};this.loadKmlMap=function(h){e=new google.maps.KmlLayer({map:f,url:h});google.maps.event.addListenerOnce(e,"defaultviewport_changed",function(){d=e.getDefaultViewport().getCenter()});return e};if(!this.localised&&"flxmap" in window){this.localise()}this.mapTypeId=google.maps.MapTypeId.ROADMAP;this.mapTypeControl=true;this.scaleControl=false;this.panControl=false;this.zoomControl=true;this.zoomControlStyle="small";this.streetViewControl=false;this.scrollwheel=false;this.draggable=true;this.dblclickZoom=true;this.zoom=16;this.markerTitle="";this.markerDescription="";this.markerHTML="";this.markerLink="";this.markerIcon="";this.markerShowInfo=true;this.markerDirections=false;this.markerDirectionsShow=false;this.markerDirectionsDefault="";this.markerAddress="";this.targetFix=true;this.dirService=false;this.dirRenderer=false;this.dirDraggable=false;this.dirSuppressMarkers=false;this.dirShowSteps=true;this.dirShowSearch=true;this.region="";this.locale="en";this.localeActive=false;this.kmlcache="none"}FlexibleMap.prototype=(function(){var d,b,e;if(document.addEventListener){d=function(g,f,h){g.addEventListener(f,h,false)};b=function(f){f.stopPropagation();f.preventDefault()}}else{if(document.attachEvent){d=function(f,g,h){f.attachEvent("on"+g,function(){h.call(f,window.event)})};b=function(f){f.cancelBubble=true;f.returnValue=0}}}if(typeof MutationObserver!=="undefined"){e=function(k,f){var i=document.getElementById(f),g=i.parentNode,h;function j(l){var m=window.getComputedStyle(l);return m.display==="none"}if(j(g)){h=new MutationObserver(function(l,m){if(!j(g)){k.redrawOnce();m.disconnect()}});h.observe(g,{attributes:true,attributeFilter:["style"]})}}}else{e=function(){}}var a=(function(){function f(h){var i=h.charCodeAt(0),g=i.toString(16);if(i<256){return"\\x"+("00"+g).slice(-2)}return"\\u"+("0000"+g).slice(-4)}return function(g){return g.replace(/[\\\/"'&<>\x00-\x1f\x7f-\xa0\u2000-\u200f\u2028-\u202f]/g,f)}})();function c(g,j){var f,h,k,i=/^(\d+)\s*(minute|hour|day)s?$/.exec(j);if(i){f=(new Date()).getTime();k=+i[1];switch(i[2]){case"minute":if(k<5){k=5}h=f/(60000*k);break;case"hour":h=f/(3600000*k);break;case"day":h=f/(86400000*k);break;default:h=false;break}if(h){h=Math.floor(h);g+=(g.indexOf("?")>-1?"&":"?")+"nocache="+h}}return g}return{constructor:FlexibleMap,i18n:{},mapTypes:{},localised:false,localise:function(){var g,f;if("i18n" in flxmap){FlexibleMap.prototype.i18n=flxmap.i18n}if("mapTypes" in flxmap){f=flxmap.mapTypes;for(g in f){f[g]._styled_map=new google.maps.StyledMapType(f[g].styles,f[g].options)}FlexibleMap.prototype.mapTypes=f}FlexibleMap.prototype.localised=true},setlocale:function(f){this.locale=f;if(f in this.i18n){this.localeActive=f}else{f=f.substr(0,2);if(f in this.i18n){this.localeActive=f}else{this.localeActive=false}}return this.localeActive},gettext:function(g){var f=this.localeActive;if(f&&g in this.i18n[f]){return this.i18n[f][g]}return g},showKML:function(f,i,j){if(typeof j!="undefined"){this.zoom=j}var h=this,g=document.getElementById(f),m=g.getAttribute("data-flxmap"),l=this.showMap(f,[0,0]),k=this.loadKmlMap(c(i,this.kmlcache));e(this,f);if(typeof j!="undefined"){google.maps.event.addListenerOnce(l,"zoom_changed",function(){l.setZoom(j);h.zoom=j})}if(this.markerDirections||this.markerDirectionsShow){this.startDirService(l)}google.maps.event.addListener(k,"click",function(s){var q=s.featureData;if(!q._flxmapOnce){q._flxmapOnce=true;if(h.targetFix){var p=/ target="_blank"/ig;q.description=q.description.replace(p,"");q.infoWindowHtml=q.infoWindowHtml.replace(p,"")}if(h.markerDirections){var o=s.latLng,r=o.lat()+","+o.lng()+",'"+a(q.name)+"',true",n='<br /><a href="#" data-flxmap-fix-opera="1" onclick="'+m+".showDirections("+r+'); return false;">'+h.gettext("Directions")+"</a>";q.infoWindowHtml=q.infoWindowHtml.replace(/<\/div><\/div>$/i,n+"</div></div>")}}});if(window.opera&&this.markerDirections){d(g,"click",function(n){if(n.target.getAttribute("data-flxmap-fix-opera")){b(n)}})}},showMarker:function(k,j,o){var h=this.showMap(k,j),f=new google.maps.LatLng(o[0],o[1]),s=new google.maps.Marker({map:h,position:f,icon:this.markerIcon});this.setMarkerPoint(s);this.setMarkerLocation(f);e(this,k);if(!this.markerTitle){this.markerTitle=this.markerAddress}if(this.markerTitle){var n,p,u,l,m,r,t=this,g=document.createElement("DIV");g.className="flxmap-infowin";s.setTitle(this.markerTitle);m=document.createElement("DIV");m.className="flxmap-marker-title";m.appendChild(document.createTextNode(this.markerTitle));g.appendChild(m);if(this.markerHTML){m=document.createElement("DIV");m.innerHTML=this.markerHTML;g.appendChild(m)}if(this.markerDescription||this.markerLink){m=document.createElement("DIV");m.className="flxmap-marker-link";if(this.markerDescription){u=this.markerDescription.split("\n");for(n=0,p=u.length;n<p;n++){if(n>0){m.appendChild(document.createElement("BR"))}m.appendChild(document.createTextNode(u[n]))}if(this.markerLink){m.appendChild(document.createElement("BR"))}}if(this.markerLink){r=document.createElement("A");r.href=this.markerLink;r.appendChild(document.createTextNode(this.gettext("Click for details")));m.appendChild(r)}g.appendChild(m)}if(this.markerDirections){m=document.createElement("DIV");m.className="flxmap-directions-link";r=document.createElement("A");r.href="#";r.dataLatitude=o[0];r.dataLongitude=o[1];r.dataTitle=this.markerTitle;d(r,"click",function(i){b(i);t.showDirections(this.dataLatitude,this.dataLongitude,this.dataTitle,true)});r.appendChild(document.createTextNode(this.gettext("Directions")));m.appendChild(r);g.appendChild(m)}if(this.markerDirections||this.markerDirectionsShow){this.startDirService(h);if(this.markerDirectionsShow){this.showDirections(o[0],o[1],this.markerTitle,false)}}l=new google.maps.InfoWindow({content:g});this.setMarkerInfowin(l);if(this.markerShowInfo){google.maps.event.addListenerOnce(h,"tilesloaded",function(){l.open(h,s)})}google.maps.event.addListener(s,"click",function(){l.open(h,s)});var q=function(){t.updateGoogleLink()};google.maps.event.addListener(h,"idle",q);google.maps.event.addListener(h,"center_changed",q);google.maps.event.addListenerOnce(h,"tilesloaded",q)}},showAddress:function(f,g){var h=this,i=new google.maps.Geocoder();this.markerAddress=g;if(this.markerTitle===""){this.markerTitle=g}i.geocode({address:g,region:this.region},function(l,k){if(k==google.maps.GeocoderStatus.OK){var j=l[0].geometry.location,m=[j.lat(),j.lng()];h.showMarker(f,m,m)}else{window.alert("Map address returns error: "+k)}})},updateGoogleLink:function(){if("querySelectorAll" in document){try{var m=this.getMap().getDiv(),g=this.getMarkerLocation(),j=m.querySelectorAll("a[href*='maps.google.com/maps']:not([href*='mps_dialog']):not([href*='&q='])"),h=0,f=j.length,k=encodeURIComponent((this.markerAddress?this.markerAddress:this.markerTitle)+" @"+g.lat()+","+g.lng());for(;h<f;h++){j[h].href+="&mrt=loc&iwloc=A&q="+k}}catch(l){}}},redraw:function(){var h=this.getMap(),g=this.getKmlLayer();google.maps.event.trigger(h,"resize");if(g){h.fitBounds(g.getDefaultViewport())}else{h.setCenter(this.getCenter());h.setZoom(this.zoom);var f=this.getMarkerInfowin();if(f){f.open(h,this.getMarkerPoint())}}},startDirService:function(f){if(!this.dirService){this.dirService=new google.maps.DirectionsService()}if(!this.dirRenderer){this.dirRenderer=new google.maps.DirectionsRenderer({map:f,draggable:this.dirDraggable,suppressMarkers:this.dirSuppressMarkers,panel:this.dirShowSteps?document.getElementById(this.markerDirectionsDiv):null})}},showDirections:function(m,i,l,f){var g=this;function k(){var n=document.getElementById(g.markerDirectionsDiv),q=document.createElement("form"),o,r,s;while(!!(r=n.lastChild)){n.removeChild(r)}r=document.createElement("p");r.appendChild(document.createTextNode(g.gettext("From")+": "));s=document.createElement("input");s.type="text";s.name="from";s.value=g.markerDirectionsDefault;r.appendChild(s);o=document.createElement("input");o.type="submit";o.value=g.gettext("Get directions");r.appendChild(o);q.appendChild(r);n.appendChild(q);if(typeof q.elements.from=="undefined"){q.elements.from=s}if(f){s.focus()}d(q,"submit",function(p){b(p);var t=this.elements.from.value;if(/\S/.test(t)){j(t)}})}function j(p){var n=(g.markerAddress==="")?new google.maps.LatLng(m,i):g.markerAddress,o={origin:p,region:g.region||"",destination:n,travelMode:google.maps.DirectionsTravelMode.DRIVING};g.dirService.route(o,h)}function h(p,n){var o=google.maps.DirectionsStatus;switch(n){case o.OK:g.dirRenderer.setDirections(p);break;case o.ZERO_RESULTS:window.alert("No route could be found between the origin and destination.");break;case o.OVER_QUERY_LIMIT:window.alert("The webpage has gone over the requests limit in too short a period of time.");break;case o.REQUEST_DENIED:window.alert("The webpage is not allowed to use the directions service.");break;case o.INVALID_REQUEST:window.alert("Invalid directions request.");break;case o.NOT_FOUND:window.alert("Origin or destination was not found.");break;default:window.alert("A directions request could not be processed due to a server error. The request may succeed if you try again.");break}}if(this.markerDirectionsDiv&&this.dirShowSearch){k()}if(this.markerDirectionsDefault){j(this.markerDirectionsDefault)}}}})();
|
1 |
/*!
|
2 |
JavaScript for the WordPress plugin wp-flexible-map
|
3 |
+
copyright (c) 2011-2015 WebAware Pty Ltd, released under LGPL v2.1
|
4 |
+
http://flexible-map.webaware.net.au/
|
5 |
*/
|
6 |
+
function FlexibleMap(){"use strict";var a,b,c,d,e,f,g=!1;this.getMap=function(){return a},this.getCenter=function(){return b},this.setCenter=function(c){b=c,a.setCenter(b)},this.setMarkerLocation=function(a){c=a},this.getMarkerLocation=function(){return c},this.setMarkerPoint=function(a){d=a},this.getMarkerPoint=function(){return d},this.setMarkerInfowin=function(a){e=a},this.getMarkerInfowin=function(){return e},this.getKmlLayer=function(){return f},this.redrawOnce=function(){g||(g=!0,this.redraw())},this.showMap=function(c,d){b=new google.maps.LatLng(d[0],d[1]);var e,f={small:google.maps.ZoomControlStyle.SMALL,large:google.maps.ZoomControlStyle.LARGE,"default":google.maps.ZoomControlStyle.DEFAULT},g=f.small;return this.zoomControlStyle in f&&(g=f[this.zoomControlStyle]),e={mapTypeId:this.mapTypeId,mapTypeControl:this.mapTypeControl,scaleControl:this.scaleControl,panControl:this.panControl,streetViewControl:this.streetViewControl,zoomControl:this.zoomControl,zoomControlOptions:{style:g},draggable:this.draggable,disableDoubleClickZoom:!this.dblclickZoom,scrollwheel:this.scrollwheel,center:b,zoom:this.zoom},this.mapTypeIds&&(e.mapTypeControlOptions={mapTypeIds:this.mapTypeIds.split(",")}),a=new google.maps.Map(document.getElementById(c),e),this.mapTypeId in this.mapTypes&&a.mapTypes.set(this.mapTypeId,this.mapTypes[this.mapTypeId]._styled_map),a},this.loadKmlMap=function(c){return f=new google.maps.KmlLayer({map:a,url:c}),google.maps.event.addListenerOnce(f,"defaultviewport_changed",function(){b=f.getDefaultViewport().getCenter()}),f},!this.localised&&"flxmap"in window&&this.localise(),this.mapTypeId=google.maps.MapTypeId.ROADMAP,this.mapTypeControl=!0,this.scaleControl=!1,this.panControl=!1,this.zoomControl=!0,this.zoomControlStyle="small",this.streetViewControl=!1,this.scrollwheel=!1,this.draggable=!0,this.dblclickZoom=!0,this.zoom=16,this.markerTitle="",this.markerDescription="",this.markerHTML="",this.markerLink="",this.markerIcon="",this.markerShowInfo=!0,this.markerDirections=!1,this.markerDirectionsShow=!1,this.markerDirectionsDefault="",this.markerAddress="",this.targetFix=!0,this.dirService=!1,this.dirRenderer=!1,this.dirDraggable=!1,this.dirSuppressMarkers=!1,this.dirShowSteps=!0,this.dirShowSearch=!0,this.region="",this.locale="en",this.localeActive=!1,this.kmlcache="none"}FlexibleMap.prototype=function(){"use strict";function a(a,b){var c,d,e,f=/^(\d+)\s*(minute|hour|day)s?$/.exec(b);if(f){switch(c=(new Date).getTime(),e=+f[1],f[2]){case"minute":5>e&&(e=5),d=c/(6e4*e);break;case"hour":d=c/(36e5*e);break;case"day":d=c/(864e5*e);break;default:d=!1}d&&(d=Math.floor(d),a+=(a.indexOf("?")>-1?"&":"?")+"nocache="+d)}return a}var b,c,d;document.addEventListener?(b=function(a,b,c){a.addEventListener(b,c,!1)},c=function(a){a.stopPropagation(),a.preventDefault()}):document.attachEvent&&(b=function(a,b,c){a.attachEvent("on"+b,function(){c.call(a,window.event)})},c=function(a){a.cancelBubble=!0,a.returnValue=0}),d="undefined"!=typeof MutationObserver?function(a,b){function c(a){var b=window.getComputedStyle(a);return"none"===b.display}var d,e=document.getElementById(b),f=e.parentNode;c(f)&&(d=new MutationObserver(function(b,d){c(f)||(a.redrawOnce(),d.disconnect())}),d.observe(f,{attributes:!0,attributeFilter:["style"]}))}:function(){};var e=function(){function a(a){var b=a.charCodeAt(0),c=b.toString(16);return 256>b?"\\x"+("00"+c).slice(-2):"\\u"+("0000"+c).slice(-4)}return function(b){return b.replace(/[\\\/"'&<>\x00-\x1f\x7f-\xa0\u2000-\u200f\u2028-\u202f]/g,a)}}();return{constructor:FlexibleMap,i18n:{},mapTypes:{},localised:!1,localise:function(){var a,b;if("i18n"in flxmap&&(FlexibleMap.prototype.i18n=flxmap.i18n),"mapTypes"in flxmap){b=flxmap.mapTypes;for(a in b)b[a]._styled_map=new google.maps.StyledMapType(b[a].styles,b[a].options);FlexibleMap.prototype.mapTypes=b}FlexibleMap.prototype.localised=!0},setlocale:function(a){return this.locale=a,a in this.i18n?this.localeActive=a:(a=a.substr(0,2),this.localeActive=a in this.i18n?a:!1),this.localeActive},gettext:function(a){var b=this.localeActive;return b&&a in this.i18n[b]?this.i18n[b][a]:a},showKML:function(f,g,h){"undefined"!=typeof h&&(this.zoom=h);var i=this,j=document.getElementById(f),k=j.getAttribute("data-flxmap"),l=this.showMap(f,[0,0]),m=this.loadKmlMap(a(g,this.kmlcache));d(this,f),"undefined"!=typeof h&&google.maps.event.addListenerOnce(l,"zoom_changed",function(){l.setZoom(h),i.zoom=h}),(this.markerDirections||this.markerDirectionsShow)&&this.startDirService(l),google.maps.event.addListener(m,"click",function(a){var b=a.featureData;if(!b._flxmapOnce){if(b._flxmapOnce=!0,i.targetFix){var c=/ target="_blank"/gi;b.description=b.description.replace(c,""),b.infoWindowHtml=b.infoWindowHtml.replace(c,"")}if(i.markerDirections){var d=a.latLng,f=d.lat()+","+d.lng()+",'"+e(b.name)+"',true",g='<br /><a href="#" data-flxmap-fix-opera="1" onclick="'+k+".showDirections("+f+'); return false;">'+i.gettext("Directions")+"</a>";b.infoWindowHtml=b.infoWindowHtml.replace(/<\/div><\/div>$/i,g+"</div></div>")}}}),window.opera&&this.markerDirections&&b(j,"click",function(a){a.target.getAttribute("data-flxmap-fix-opera")&&c(a)})},showMarker:function(a,e,f){var g=this.showMap(a,e),h=new google.maps.LatLng(f[0],f[1]),i=new google.maps.Marker({map:g,position:h,icon:this.markerIcon});if(this.setMarkerPoint(i),this.setMarkerLocation(h),d(this,a),this.markerTitle||(this.markerTitle=this.markerAddress),this.markerTitle){var j,k,l,m,n,o,p=this,q=document.createElement("DIV");if(q.className="flxmap-infowin",i.setTitle(this.markerTitle),n=document.createElement("DIV"),n.className="flxmap-marker-title",n.appendChild(document.createTextNode(this.markerTitle)),q.appendChild(n),this.markerHTML&&(n=document.createElement("DIV"),n.innerHTML=this.markerHTML,q.appendChild(n)),this.markerDescription||this.markerLink){if(n=document.createElement("DIV"),n.className="flxmap-marker-link",this.markerDescription){for(l=this.markerDescription.split("\n"),j=0,k=l.length;k>j;j++)j>0&&n.appendChild(document.createElement("BR")),n.appendChild(document.createTextNode(l[j]));this.markerLink&&n.appendChild(document.createElement("BR"))}this.markerLink&&(o=document.createElement("A"),o.href=this.markerLink,o.appendChild(document.createTextNode(this.gettext("Click for details"))),n.appendChild(o)),q.appendChild(n)}this.markerDirections&&(n=document.createElement("DIV"),n.className="flxmap-directions-link",o=document.createElement("A"),o.href="#",o.dataLatitude=f[0],o.dataLongitude=f[1],o.dataTitle=this.markerTitle,b(o,"click",function(a){c(a),p.showDirections(this.dataLatitude,this.dataLongitude,this.dataTitle,!0)}),o.appendChild(document.createTextNode(this.gettext("Directions"))),n.appendChild(o),q.appendChild(n)),(this.markerDirections||this.markerDirectionsShow)&&(this.startDirService(g),this.markerDirectionsShow&&this.showDirections(f[0],f[1],this.markerTitle,!1)),m=new google.maps.InfoWindow({content:q}),this.setMarkerInfowin(m),this.markerShowInfo&&google.maps.event.addListenerOnce(g,"tilesloaded",function(){m.open(g,i)}),google.maps.event.addListener(i,"click",function(){m.open(g,i)});var r=function(){p.updateGoogleLink()};google.maps.event.addListener(g,"idle",r),google.maps.event.addListener(g,"center_changed",r),google.maps.event.addListenerOnce(g,"tilesloaded",r)}},showAddress:function(a,b){var c=this,d=new google.maps.Geocoder;this.markerAddress=b,""===this.markerTitle&&(this.markerTitle=b),d.geocode({address:b,region:this.region},function(b,d){if(d==google.maps.GeocoderStatus.OK){var e=b[0].geometry.location,f=[e.lat(),e.lng()];c.showMarker(a,f,f)}else window.alert("Map address returns error: "+d)})},updateGoogleLink:function(){if("querySelectorAll"in document)try{for(var a=this.getMap().getDiv(),b=this.getMarkerLocation(),c=a.querySelectorAll("a[href*='maps.google.com/maps']:not([href*='mps_dialog']):not([href*='&q='])"),d=0,e=c.length,f=encodeURIComponent((this.markerAddress?this.markerAddress:this.markerTitle)+" @"+b.lat()+","+b.lng());e>d;d++)c[d].href+="&mrt=loc&iwloc=A&q="+f}catch(g){}},redraw:function(){var a=this.getMap(),b=this.getKmlLayer();if(google.maps.event.trigger(a,"resize"),b)a.fitBounds(b.getDefaultViewport());else{a.setCenter(this.getCenter()),a.setZoom(this.zoom);var c=this.getMarkerInfowin();c&&c.open(a,this.getMarkerPoint())}},startDirService:function(a){this.dirService||(this.dirService=new google.maps.DirectionsService),this.dirRenderer||(this.dirRenderer=new google.maps.DirectionsRenderer({map:a,draggable:this.dirDraggable,suppressMarkers:this.dirSuppressMarkers,panel:this.dirShowSteps?document.getElementById(this.markerDirectionsDiv):null}))},showDirections:function(a,d,e,f){function g(){for(var a,d,e,g=document.getElementById(j.markerDirectionsDiv),i=document.createElement("form");d=g.lastChild;)g.removeChild(d);d=document.createElement("p"),d.appendChild(document.createTextNode(j.gettext("From")+": ")),e=document.createElement("input"),e.type="text",e.name="from",e.value=j.markerDirectionsDefault,d.appendChild(e),a=document.createElement("input"),a.type="submit",a.value=j.gettext("Get directions"),d.appendChild(a),i.appendChild(d),g.appendChild(i),"undefined"==typeof i.elements.from&&(i.elements.from=e),f&&e.focus(),b(i,"submit",function(a){c(a);var b=this.elements.from.value;/\S/.test(b)&&h(b)})}function h(b){var c=""===j.markerAddress?new google.maps.LatLng(a,d):j.markerAddress,e={origin:b,region:j.region||"",destination:c,travelMode:google.maps.DirectionsTravelMode.DRIVING};j.dirService.route(e,i)}function i(a,b){var c=google.maps.DirectionsStatus;switch(b){case c.OK:j.dirRenderer.setDirections(a);break;case c.ZERO_RESULTS:window.alert("No route could be found between the origin and destination.");break;case c.OVER_QUERY_LIMIT:window.alert("The webpage has gone over the requests limit in too short a period of time.");break;case c.REQUEST_DENIED:window.alert("The webpage is not allowed to use the directions service.");break;case c.INVALID_REQUEST:window.alert("Invalid directions request.");break;case c.NOT_FOUND:window.alert("Origin or destination was not found.");break;default:window.alert("A directions request could not be processed due to a server error. The request may succeed if you try again.")}}var j=this;this.markerDirectionsDiv&&this.dirShowSearch&&g(),this.markerDirectionsDefault&&h(this.markerDirectionsDefault)}}}();
|
languages/flexible-map.pot
CHANGED
@@ -1,59 +1,52 @@
|
|
1 |
-
# copyright (c) 2014 WebAware Pty Ltd
|
2 |
# This file is distributed under the same license as the plugin package.
|
|
|
|
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Flexible Map\n"
|
6 |
-
"Report-Msgid-Bugs-To: \n"
|
7 |
-
"POT-Creation-Date:
|
8 |
-
"PO-Revision-Date:
|
9 |
"Last-Translator: Ross McKay <rmckay@webaware.com.au>\n"
|
10 |
"Language-Team: \n"
|
11 |
"Language: en_US\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
-
|
16 |
-
|
17 |
-
"esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
|
18 |
-
"X-Poedit-Basepath: .\n"
|
19 |
-
"X-Poedit-SourceCharset: UTF-8\n"
|
20 |
-
"X-Textdomain-Support: yes\n"
|
21 |
-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
22 |
-
"X-Generator: Poedit 1.5.4\n"
|
23 |
-
"X-Poedit-SearchPath-0: ..\n"
|
24 |
-
|
25 |
-
#: ../includes/class.FlxMapAdmin.php:26
|
26 |
msgctxt "plugin details links"
|
27 |
msgid "Get Help"
|
28 |
msgstr ""
|
29 |
|
30 |
-
#:
|
31 |
msgctxt "plugin details links"
|
32 |
msgid "Rating"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#:
|
36 |
msgctxt "plugin details links"
|
37 |
msgid "Translate"
|
38 |
msgstr ""
|
39 |
|
40 |
-
#:
|
41 |
msgctxt "plugin details links"
|
42 |
msgid "Donate"
|
43 |
msgstr ""
|
44 |
|
45 |
-
#:
|
46 |
msgid "Click for details"
|
47 |
msgstr ""
|
48 |
|
49 |
-
#:
|
50 |
msgid "Directions"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#:
|
54 |
msgid "From"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#:
|
58 |
msgid "Get directions"
|
59 |
msgstr ""
|
1 |
+
# copyright (c) 2014-2015 WebAware Pty Ltd
|
2 |
# This file is distributed under the same license as the plugin package.
|
3 |
+
#
|
4 |
+
#, fuzzy
|
5 |
msgid ""
|
6 |
msgstr ""
|
7 |
"Project-Id-Version: Flexible Map\n"
|
8 |
+
"Report-Msgid-Bugs-To: translate@webaware.com.au\n"
|
9 |
+
"POT-Creation-Date: 2015-03-21 13:32+1100\n"
|
10 |
+
"PO-Revision-Date: 2015-03-21 13:32+1100\n"
|
11 |
"Last-Translator: Ross McKay <rmckay@webaware.com.au>\n"
|
12 |
"Language-Team: \n"
|
13 |
"Language: en_US\n"
|
14 |
"MIME-Version: 1.0\n"
|
15 |
"Content-Type: text/plain; charset=UTF-8\n"
|
16 |
"Content-Transfer-Encoding: 8bit\n"
|
17 |
+
|
18 |
+
#: includes/class.FlxMapAdmin.php:26
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
msgctxt "plugin details links"
|
20 |
msgid "Get Help"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: includes/class.FlxMapAdmin.php:27
|
24 |
msgctxt "plugin details links"
|
25 |
msgid "Rating"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: includes/class.FlxMapAdmin.php:28
|
29 |
msgctxt "plugin details links"
|
30 |
msgid "Translate"
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: includes/class.FlxMapAdmin.php:29
|
34 |
msgctxt "plugin details links"
|
35 |
msgid "Donate"
|
36 |
msgstr ""
|
37 |
|
38 |
+
#: includes/declare-strings.php:9
|
39 |
msgid "Click for details"
|
40 |
msgstr ""
|
41 |
|
42 |
+
#: includes/declare-strings.php:10
|
43 |
msgid "Directions"
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: includes/declare-strings.php:11
|
47 |
msgid "From"
|
48 |
msgstr ""
|
49 |
|
50 |
+
#: includes/declare-strings.php:12
|
51 |
msgid "Get directions"
|
52 |
msgstr ""
|
readme.md
CHANGED
@@ -5,8 +5,8 @@ Embed Google Maps in pages and posts, either by centre coordinates or street add
|
|
5 |
* [Home](http://flexible-map.webaware.net.au/)
|
6 |
* [GitHub](https://github.com/webaware/flexible-map)
|
7 |
* [Readme](https://github.com/webaware/flexible-map/blob/master/readme.txt)
|
8 |
-
* [Download](
|
9 |
* [Documentation](http://flexible-map.webaware.net.au/)
|
10 |
-
* [Support](
|
11 |
-
* [Translate](
|
12 |
* [Donate](http://shop.webaware.com.au/downloads/flexible-map/)
|
5 |
* [Home](http://flexible-map.webaware.net.au/)
|
6 |
* [GitHub](https://github.com/webaware/flexible-map)
|
7 |
* [Readme](https://github.com/webaware/flexible-map/blob/master/readme.txt)
|
8 |
+
* [Download](https://wordpress.org/plugins/wp-flexible-map/)
|
9 |
* [Documentation](http://flexible-map.webaware.net.au/)
|
10 |
+
* [Support](https://wordpress.org/support/plugin/wp-flexible-map)
|
11 |
+
* [Translate](https://translate.webaware.com.au/projects/flexible-map)
|
12 |
* [Donate](http://shop.webaware.com.au/downloads/flexible-map/)
|
readme.txt
CHANGED
@@ -2,12 +2,12 @@
|
|
2 |
Contributors: webaware
|
3 |
Plugin Name: WP Flexible Map
|
4 |
Plugin URI: http://flexible-map.webaware.net.au/
|
5 |
-
Author URI: http://
|
6 |
-
Donate link: http://shop.webaware.com.au/
|
7 |
Tags: google, map, maps, google maps, shortcode, google maps shortcode, kml
|
8 |
Requires at least: 3.2.1
|
9 |
-
Tested up to: 4.
|
10 |
-
Stable tag: 1.9.
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
@@ -46,18 +46,18 @@ Thanks for sponsoring new features on WP Flexible Maps!
|
|
46 |
|
47 |
Many thanks to the generous efforts of our translators:
|
48 |
|
49 |
-
* Czech (cs) -- [caslavak](
|
50 |
* Dutch (nl) -- [Ivan Beemster](http://www.lijndiensten.com/)
|
51 |
-
* French (fr) -- [mister klucha](
|
52 |
* German (de) -- [Carib Design](http://www.caribdesign.com/)
|
53 |
-
* Greek (el) -- [Pantelis Orfanos](
|
54 |
* Hungarian (hu) -- Krisztián Vörös
|
55 |
* Norwegian: Bokmål (nb_NO) -- [neonnero](http://www.neonnero.com/)
|
56 |
* Norwegian: Nynorsk (nn_NO) -- [neonnero](http://www.neonnero.com/)
|
57 |
-
* Spanish (es) -- [edurramos](
|
58 |
* Welsh (cy) -- [Dylan](https://profiles.wordpress.org/dtom-ct-wp/)
|
59 |
|
60 |
-
The initial translations for all other languages were made using Google Translate, so it's likely that some will be truly awful! If you'd like to help out by translating this plugin, please [sign up for an account and dig in](
|
61 |
|
62 |
== Installation ==
|
63 |
|
@@ -172,7 +172,7 @@ then something on your website is stripping the query strings on scripts. It's p
|
|
172 |
|
173 |
There are none! You just need to add some attributes to your shortcode telling the map what to do.
|
174 |
|
175 |
-
Of course, in WordPress there is a plugin for everything :) so if you *want* settings, please install the [Flexible Map Options plugin](
|
176 |
|
177 |
= Can I add multiple markers to a map? =
|
178 |
|
@@ -214,7 +214,7 @@ function force_flexmap_map_language($args) {
|
|
214 |
|
215 |
= You've translated my language badly / it's missing =
|
216 |
|
217 |
-
The initial translations were made using Google Translate, so it's likely that some will be truly awful! If you'd like to help out by translating this plugin, please [sign up for an account and dig in](
|
218 |
|
219 |
= The map is broken in tabs / accordions =
|
220 |
|
@@ -250,7 +250,7 @@ jQuery("body").bind("tabsshow", function(event, ui) {
|
|
250 |
});
|
251 |
</script>`
|
252 |
|
253 |
-
For tabs in jQuery Tools, see [this support topic](
|
254 |
|
255 |
= How can I get access to the map object? =
|
256 |
|
@@ -306,10 +306,17 @@ Either turn off CloudFlare Rocketscript :) or install the [Flxmap No Rocketscrip
|
|
306 |
|
307 |
== Changelog ==
|
308 |
|
309 |
-
= 1.9.
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
* fixed: zoom control styling / hiding was broken in v1.9.0
|
311 |
|
312 |
-
= 1.9.0
|
|
|
313 |
* fixed: maps broken when hidden in tabs / accordions (not for IE 10 and earlier; uses MutationObserver)
|
314 |
* fixed: strip spaces from map coordinates
|
315 |
* fixed: suppress border radius on images within map containers
|
@@ -318,25 +325,31 @@ Either turn off CloudFlare Rocketscript :) or install the [Flxmap No Rocketscrip
|
|
318 |
* added: `maptypes` attribute for selecting which map types can be picked by visitors
|
319 |
* changed: refactored JavaScript for localised strings
|
320 |
|
321 |
-
= 1.8.3
|
|
|
322 |
* fixed: CSS for directions in twentyfifteen theme and others that toss table-layout:fixed around willy nilly
|
323 |
|
324 |
-
= 1.8.2
|
|
|
325 |
* added: Welsh translation (thanks, [Dylan](https://profiles.wordpress.org/dtom-ct-wp/)!)
|
326 |
|
327 |
-
= 1.8.1
|
|
|
328 |
* fixed: Hungarian translation (thanks, Krisztián Vörös!)
|
329 |
* changed: bump version of Google Maps API to 3.17
|
330 |
|
331 |
-
= 1.8.0
|
332 |
-
|
|
|
333 |
* fixed: Norwegian translations (thanks, [neonnero](http://www.neonnero.com/)!)
|
334 |
-
* changed: localisation uses standard .mo files now; if you'd like to help translate, please [sign up for an account and dig in](
|
|
|
|
|
335 |
|
336 |
-
= 1.7.3.1 [2014-03-22] =
|
337 |
* fixed: infowindow width on some Webkit browsers, and IE10/11
|
338 |
|
339 |
-
= 1.7.3
|
|
|
340 |
* fixed: German translation (thanks, [Carib Design](http://www.caribdesign.com/)!)
|
341 |
* fixed: some themes (e.g. Evolve) mess up Google Maps directions markers
|
342 |
* fixed: CSS for infowindows with Google Maps Visual Refresh / API v3.15
|
@@ -346,17 +359,20 @@ Either turn off CloudFlare Rocketscript :) or install the [Flxmap No Rocketscrip
|
|
346 |
* added: WordPress filter `flexmap_shortcode_script`
|
347 |
* removed: `visualrefresh` attribute doesn't do anything any more (Google Maps API has adopted Visual Refresh as standard)
|
348 |
|
349 |
-
= 1.7.2
|
350 |
-
|
|
|
351 |
* fixed: clean up JSHint warnings
|
352 |
* changed: Slovenian translation refresh from Google Translate (human translators wanted!)
|
353 |
* changed: plugin homepage, better documentation and examples, will develop as time permits!
|
354 |
|
355 |
-
= 1.7.1
|
|
|
356 |
* fixed: Google link was showing marker at centre, not at marker location when marker != centre
|
357 |
|
358 |
-
= 1.7.0
|
359 |
-
|
|
|
360 |
* fixed: Dutch translation (thanks, [Ivan Beemster](http://www.lijndiensten.com/)!)
|
361 |
* fixed: KML map zoom sometimes doesn't happen on first page visit
|
362 |
* fixed: some themes (e.g. twentythirteen) mess up Google Maps directions markers
|
@@ -368,108 +384,133 @@ Either turn off CloudFlare Rocketscript :) or install the [Flxmap No Rocketscrip
|
|
368 |
* added: default CSS sets info window text color to #333
|
369 |
* changed: bump version of Google Maps API to 3.13
|
370 |
|
371 |
-
= 1.6.5
|
|
|
372 |
* fixed: stop twentythirteen theme stuffing up Google Maps infowindows with its too-promiscuous box-sizing rules
|
373 |
* added: `dirdraggable` and `dirnomarkers` attributes
|
374 |
|
375 |
-
= 1.6.4
|
|
|
376 |
* fixed: can set directions=false and showdirections=true
|
377 |
-
* fixed: space before colon in fr translation (thanks, [mister klucha](
|
378 |
* added: load unminified script if SCRIPT_DEBUG is defined / true
|
379 |
* changed: clicking directions link sets focus on From: address again
|
380 |
* changed: bump version of Google Maps API to 3.12
|
381 |
|
382 |
-
= 1.6.3
|
383 |
-
|
|
|
|
|
|
|
384 |
|
385 |
-
= 1.6.2 [2013-03-04] =
|
386 |
* fixed: CSS fix for themes that muck up Google Maps images by specifying background colour on images without being selective
|
387 |
* added: icon attribute to set marker icon on centre / address maps
|
388 |
|
389 |
-
= 1.6.1
|
|
|
390 |
* fixed: infowindow auto-pans on load, to prevent the top of the bubble being cropped
|
391 |
* added: WordPress filter `flexmap_google_maps_api_args` for filtering array of arguments before building Google Maps API URL
|
392 |
* added: function flexmap_show_map() accepts an attribute "echo", and returns a string without output to screen when "echo"=>"false"
|
393 |
* changed: all scripts now loaded through wp_enqueue_scripts, including language scripts (thanks to a [tip from toscho](http://wordpress.stackexchange.com/a/38335/24260))
|
394 |
* changed: bump version of Google Maps API to 3.11
|
395 |
|
396 |
-
= 1.6.0
|
|
|
397 |
* added: themes can call function flexmap_load_scripts() to force load of scripts, e.g. on single-page AJAX websites
|
398 |
* added: can add HTML block to infowindow, e.g. images
|
399 |
* fixed: no auto-focus on directions search field, thus no auto-scroll page to last directions search field!
|
400 |
|
401 |
-
= 1.5.3
|
|
|
402 |
* fixed: when attributes showdirections or directionsfrom were specified, but not directions, the directions panel was not added to page and a JavaScript error was generated
|
403 |
* changed: bump version of Google Maps API to 3.10
|
404 |
|
405 |
-
= 1.5.2
|
|
|
406 |
* fixed: KML maps broken; KMLLayer status_changed event unreliable, use defaultviewport_changed event instead (possible Google Maps API change)
|
407 |
|
408 |
-
= 1.5.1
|
|
|
409 |
* changed: tighten up FlexibleMap API to keep private members private (in case they change later)
|
410 |
|
411 |
-
= 1.5.0
|
|
|
412 |
* added: new shortcode attribute "id" which will be used for the container div, instead of the random unique div id
|
413 |
* added: FlexibleMap object is accessible via global variable with name derived from container div id (e.g. if you need to access the Google Maps map object in your own scripts)
|
414 |
* added: redraw() and redrawOnce() methods, for when the map needs to be redrawn correctly (e.g. when initially hidden then revealed)
|
415 |
* added: KML maps support directions (sponsored by [Roger Los](http://www.rogerlos.com/) -- thanks!)
|
416 |
|
417 |
-
= 1.4.1
|
|
|
418 |
* fixed: targetfix was not stopping KML marker links opening in new window/tab since Google Maps API 3.9
|
419 |
|
420 |
-
= 1.4.0
|
|
|
421 |
* changed: bump version of Google Maps API to 3.9
|
422 |
* added: allow CSS units in ch, rem, vh, vw, vmin, vmax
|
423 |
|
424 |
-
= 1.3.1
|
|
|
425 |
* fixed: width/height in digits (no units) defaults to pixels (sorry folks, I thought I tested that, but missed it somehow!)
|
426 |
|
427 |
-
= 1.3.0
|
|
|
428 |
* fixed: Norwegian translation had incorrect file name
|
429 |
* fixed: Malaysian translation had incorrect index (was overwriting Macedonian translation)
|
430 |
* added: filters so that theme and plugin developers can modify the behaviour of this plugin
|
431 |
* added: width and height can be any valid CSS units, not just pixels
|
432 |
|
433 |
-
= 1.2.0
|
|
|
434 |
* added: option showdirections, to show the directions search when the map loads
|
435 |
* added: option directionsfrom, to set the default from: location, and immediately search for directions when showdirections is set
|
436 |
|
437 |
-
= 1.1.2
|
|
|
438 |
* fixed: some themes set box-shadow on all images, now forceably fixed for Google Maps images
|
439 |
* added: option to control whether links on KML maps open in new window
|
440 |
|
441 |
-
= 1.1.1
|
|
|
442 |
* fixed: instructions updated to reflect recent changes
|
443 |
|
444 |
-
= 1.1.0
|
|
|
445 |
* added: locale-specific messages (using translations from Google Translate) e.g. Directions link
|
446 |
* wanted: translators to help me add new translations, and clean up the messages I got from Google Translate!
|
447 |
* fixed: use region to help refine street address searches
|
448 |
|
449 |
-
= 1.0.6
|
|
|
450 |
* fixed: use plugin_dir_url() to get url base, and protocol-relative url to load Google Maps API (SSL compatible)
|
451 |
|
452 |
-
= 1.0.5
|
|
|
453 |
* fixed: CSS fixes for themes that muck up Google Maps images (e.g. twentyeleven)
|
454 |
* added: infowindow styles now in enqueued stylesheet
|
455 |
|
456 |
-
= 1.0.4
|
|
|
457 |
* fixed: use LatLng methods to access latitude/longitude, instead of (ever changing) Google Maps API private members
|
458 |
* added: tooltip on markers in non-KML maps
|
459 |
* added: options to disable pan control, zoom control, drag to pan, double-click to zoom
|
460 |
|
461 |
-
= 1.0.3
|
|
|
462 |
* fixed: address query updated to work with Google Maps v3.8 (so using address for centre marker works again)
|
463 |
* fixed: tied Google Maps API to v3.8 so newer versions don't break plugin, and will keep updated as API changes
|
464 |
|
465 |
-
= 1.0.2
|
|
|
466 |
* added: address attribute as alternative to center coordinates
|
467 |
* added: use address attribute for directions, if given (so that directions match address)
|
468 |
* changed: readme improved a little
|
469 |
* changed: refactored code for DRY (don't repeat yourself)
|
470 |
|
471 |
-
= 1.0.1
|
|
|
472 |
* fixed: directions bugs in JavaScript for Opera, IE
|
473 |
|
474 |
-
= 1.0.0
|
|
|
475 |
* final cleanup for public release
|
2 |
Contributors: webaware
|
3 |
Plugin Name: WP Flexible Map
|
4 |
Plugin URI: http://flexible-map.webaware.net.au/
|
5 |
+
Author URI: http://webaware.com.au/
|
6 |
+
Donate link: http://shop.webaware.com.au/donations/?donation_for=Flexible+Map
|
7 |
Tags: google, map, maps, google maps, shortcode, google maps shortcode, kml
|
8 |
Requires at least: 3.2.1
|
9 |
+
Tested up to: 4.3
|
10 |
+
Stable tag: 1.9.2
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
46 |
|
47 |
Many thanks to the generous efforts of our translators:
|
48 |
|
49 |
+
* Czech (cs) -- [caslavak](https://profiles.wordpress.org/caslavak/)
|
50 |
* Dutch (nl) -- [Ivan Beemster](http://www.lijndiensten.com/)
|
51 |
+
* French (fr) -- [mister klucha](https://profiles.wordpress.org/mister-klucha/)
|
52 |
* German (de) -- [Carib Design](http://www.caribdesign.com/)
|
53 |
+
* Greek (el) -- [Pantelis Orfanos](https://profiles.wordpress.org/ironwiller/)
|
54 |
* Hungarian (hu) -- Krisztián Vörös
|
55 |
* Norwegian: Bokmål (nb_NO) -- [neonnero](http://www.neonnero.com/)
|
56 |
* Norwegian: Nynorsk (nn_NO) -- [neonnero](http://www.neonnero.com/)
|
57 |
+
* Spanish (es) -- [edurramos](https://profiles.wordpress.org/edurramos/)
|
58 |
* Welsh (cy) -- [Dylan](https://profiles.wordpress.org/dtom-ct-wp/)
|
59 |
|
60 |
+
The initial translations for all other languages were made using Google Translate, so it's likely that some will be truly awful! If you'd like to help out by translating this plugin, please [sign up for an account and dig in](https://translate.webaware.com.au/projects/flexible-map).
|
61 |
|
62 |
== Installation ==
|
63 |
|
172 |
|
173 |
There are none! You just need to add some attributes to your shortcode telling the map what to do.
|
174 |
|
175 |
+
Of course, in WordPress there is a plugin for everything :) so if you *want* settings, please install the [Flexible Map Options plugin](https://wordpress.org/plugins/wp-flexible-map-options/). That plugin lets you set some defaults so that if you use the same attributes over and over, you can put them all in one place.
|
176 |
|
177 |
= Can I add multiple markers to a map? =
|
178 |
|
214 |
|
215 |
= You've translated my language badly / it's missing =
|
216 |
|
217 |
+
The initial translations were made using Google Translate, so it's likely that some will be truly awful! If you'd like to help out by translating this plugin, please [sign up for an account and dig in](https://translate.webaware.com.au/projects/flexible-map).
|
218 |
|
219 |
= The map is broken in tabs / accordions =
|
220 |
|
250 |
});
|
251 |
</script>`
|
252 |
|
253 |
+
For tabs in jQuery Tools, see [this support topic](https://wordpress.org/support/topic/tabs-map#post-3784706).
|
254 |
|
255 |
= How can I get access to the map object? =
|
256 |
|
306 |
|
307 |
== Changelog ==
|
308 |
|
309 |
+
= 1.9.2, 2015-03-21 =
|
310 |
+
|
311 |
+
* fixed: sometimes vertical copyright message on IE8 with some themes
|
312 |
+
* changed: bump version of Google Maps API to 3.19 (resolves some Safari styling issues)
|
313 |
+
|
314 |
+
= 1.9.1, 2014-12-29 =
|
315 |
+
|
316 |
* fixed: zoom control styling / hiding was broken in v1.9.0
|
317 |
|
318 |
+
= 1.9.0, 2014-12-24 =
|
319 |
+
|
320 |
* fixed: maps broken when hidden in tabs / accordions (not for IE 10 and earlier; uses MutationObserver)
|
321 |
* fixed: strip spaces from map coordinates
|
322 |
* fixed: suppress border radius on images within map containers
|
325 |
* added: `maptypes` attribute for selecting which map types can be picked by visitors
|
326 |
* changed: refactored JavaScript for localised strings
|
327 |
|
328 |
+
= 1.8.3, 2014-12-17 =
|
329 |
+
|
330 |
* fixed: CSS for directions in twentyfifteen theme and others that toss table-layout:fixed around willy nilly
|
331 |
|
332 |
+
= 1.8.2, 2014-12-06 =
|
333 |
+
|
334 |
* added: Welsh translation (thanks, [Dylan](https://profiles.wordpress.org/dtom-ct-wp/)!)
|
335 |
|
336 |
+
= 1.8.1, 2014-10-05 =
|
337 |
+
|
338 |
* fixed: Hungarian translation (thanks, Krisztián Vörös!)
|
339 |
* changed: bump version of Google Maps API to 3.17
|
340 |
|
341 |
+
= 1.8.0, 2014-08-31 =
|
342 |
+
|
343 |
+
* fixed: Czech translation (thanks, [caslavak](https://profiles.wordpress.org/caslavak/)!)
|
344 |
* fixed: Norwegian translations (thanks, [neonnero](http://www.neonnero.com/)!)
|
345 |
+
* changed: localisation uses standard .mo files now; if you'd like to help translate, please [sign up for an account and dig in](https://translate.webaware.com.au/projects/flexible-map).
|
346 |
+
|
347 |
+
= 1.7.3.1, 2014-03-22 =
|
348 |
|
|
|
349 |
* fixed: infowindow width on some Webkit browsers, and IE10/11
|
350 |
|
351 |
+
= 1.7.3, 2014-03-16 =
|
352 |
+
|
353 |
* fixed: German translation (thanks, [Carib Design](http://www.caribdesign.com/)!)
|
354 |
* fixed: some themes (e.g. Evolve) mess up Google Maps directions markers
|
355 |
* fixed: CSS for infowindows with Google Maps Visual Refresh / API v3.15
|
359 |
* added: WordPress filter `flexmap_shortcode_script`
|
360 |
* removed: `visualrefresh` attribute doesn't do anything any more (Google Maps API has adopted Visual Refresh as standard)
|
361 |
|
362 |
+
= 1.7.2, 2014-01-01 =
|
363 |
+
|
364 |
+
* fixed: Spanish translation (thanks, [edurramos](https://profiles.wordpress.org/edurramos/)!)
|
365 |
* fixed: clean up JSHint warnings
|
366 |
* changed: Slovenian translation refresh from Google Translate (human translators wanted!)
|
367 |
* changed: plugin homepage, better documentation and examples, will develop as time permits!
|
368 |
|
369 |
+
= 1.7.1, 2013-10-13 =
|
370 |
+
|
371 |
* fixed: Google link was showing marker at centre, not at marker location when marker != centre
|
372 |
|
373 |
+
= 1.7.0, 2013-10-12 =
|
374 |
+
|
375 |
+
* fixed: Greek translation (thanks, [Pantelis Orfanos](https://profiles.wordpress.org/ironwiller/)!)
|
376 |
* fixed: Dutch translation (thanks, [Ivan Beemster](http://www.lijndiensten.com/)!)
|
377 |
* fixed: KML map zoom sometimes doesn't happen on first page visit
|
378 |
* fixed: some themes (e.g. twentythirteen) mess up Google Maps directions markers
|
384 |
* added: default CSS sets info window text color to #333
|
385 |
* changed: bump version of Google Maps API to 3.13
|
386 |
|
387 |
+
= 1.6.5, 2013-07-19 =
|
388 |
+
|
389 |
* fixed: stop twentythirteen theme stuffing up Google Maps infowindows with its too-promiscuous box-sizing rules
|
390 |
* added: `dirdraggable` and `dirnomarkers` attributes
|
391 |
|
392 |
+
= 1.6.4, 2013-06-14 =
|
393 |
+
|
394 |
* fixed: can set directions=false and showdirections=true
|
395 |
+
* fixed: space before colon in fr translation (thanks, [mister klucha](https://wordpress.org/support/profile/mister-klucha)!)
|
396 |
* added: load unminified script if SCRIPT_DEBUG is defined / true
|
397 |
* changed: clicking directions link sets focus on From: address again
|
398 |
* changed: bump version of Google Maps API to 3.12
|
399 |
|
400 |
+
= 1.6.3, 2013-03-14 =
|
401 |
+
|
402 |
+
* fixed: HTML description now works for address-based maps (thanks, [John Sundberg](https://profiles.wordpress.org/bhwebworks/)!)
|
403 |
+
|
404 |
+
= 1.6.2, 2013-03-04 =
|
405 |
|
|
|
406 |
* fixed: CSS fix for themes that muck up Google Maps images by specifying background colour on images without being selective
|
407 |
* added: icon attribute to set marker icon on centre / address maps
|
408 |
|
409 |
+
= 1.6.1, 2013-01-29 =
|
410 |
+
|
411 |
* fixed: infowindow auto-pans on load, to prevent the top of the bubble being cropped
|
412 |
* added: WordPress filter `flexmap_google_maps_api_args` for filtering array of arguments before building Google Maps API URL
|
413 |
* added: function flexmap_show_map() accepts an attribute "echo", and returns a string without output to screen when "echo"=>"false"
|
414 |
* changed: all scripts now loaded through wp_enqueue_scripts, including language scripts (thanks to a [tip from toscho](http://wordpress.stackexchange.com/a/38335/24260))
|
415 |
* changed: bump version of Google Maps API to 3.11
|
416 |
|
417 |
+
= 1.6.0, 2012-12-30 =
|
418 |
+
|
419 |
* added: themes can call function flexmap_load_scripts() to force load of scripts, e.g. on single-page AJAX websites
|
420 |
* added: can add HTML block to infowindow, e.g. images
|
421 |
* fixed: no auto-focus on directions search field, thus no auto-scroll page to last directions search field!
|
422 |
|
423 |
+
= 1.5.3, 2012-11-30 =
|
424 |
+
|
425 |
* fixed: when attributes showdirections or directionsfrom were specified, but not directions, the directions panel was not added to page and a JavaScript error was generated
|
426 |
* changed: bump version of Google Maps API to 3.10
|
427 |
|
428 |
+
= 1.5.2, 2012-10-12 =
|
429 |
+
|
430 |
* fixed: KML maps broken; KMLLayer status_changed event unreliable, use defaultviewport_changed event instead (possible Google Maps API change)
|
431 |
|
432 |
+
= 1.5.1, 2012-09-30 =
|
433 |
+
|
434 |
* changed: tighten up FlexibleMap API to keep private members private (in case they change later)
|
435 |
|
436 |
+
= 1.5.0, 2012-09-29 =
|
437 |
+
|
438 |
* added: new shortcode attribute "id" which will be used for the container div, instead of the random unique div id
|
439 |
* added: FlexibleMap object is accessible via global variable with name derived from container div id (e.g. if you need to access the Google Maps map object in your own scripts)
|
440 |
* added: redraw() and redrawOnce() methods, for when the map needs to be redrawn correctly (e.g. when initially hidden then revealed)
|
441 |
* added: KML maps support directions (sponsored by [Roger Los](http://www.rogerlos.com/) -- thanks!)
|
442 |
|
443 |
+
= 1.4.1, 2012-09-11 =
|
444 |
+
|
445 |
* fixed: targetfix was not stopping KML marker links opening in new window/tab since Google Maps API 3.9
|
446 |
|
447 |
+
= 1.4.0, 2012-08-22 =
|
448 |
+
|
449 |
* changed: bump version of Google Maps API to 3.9
|
450 |
* added: allow CSS units in ch, rem, vh, vw, vmin, vmax
|
451 |
|
452 |
+
= 1.3.1, 2012-07-13 =
|
453 |
+
|
454 |
* fixed: width/height in digits (no units) defaults to pixels (sorry folks, I thought I tested that, but missed it somehow!)
|
455 |
|
456 |
+
= 1.3.0, 2012-07-12 =
|
457 |
+
|
458 |
* fixed: Norwegian translation had incorrect file name
|
459 |
* fixed: Malaysian translation had incorrect index (was overwriting Macedonian translation)
|
460 |
* added: filters so that theme and plugin developers can modify the behaviour of this plugin
|
461 |
* added: width and height can be any valid CSS units, not just pixels
|
462 |
|
463 |
+
= 1.2.0, 2012-06-29 =
|
464 |
+
|
465 |
* added: option showdirections, to show the directions search when the map loads
|
466 |
* added: option directionsfrom, to set the default from: location, and immediately search for directions when showdirections is set
|
467 |
|
468 |
+
= 1.1.2, 2012-05-20 =
|
469 |
+
|
470 |
* fixed: some themes set box-shadow on all images, now forceably fixed for Google Maps images
|
471 |
* added: option to control whether links on KML maps open in new window
|
472 |
|
473 |
+
= 1.1.1, 2012-04-15 =
|
474 |
+
|
475 |
* fixed: instructions updated to reflect recent changes
|
476 |
|
477 |
+
= 1.1.0, 2012-04-15 =
|
478 |
+
|
479 |
* added: locale-specific messages (using translations from Google Translate) e.g. Directions link
|
480 |
* wanted: translators to help me add new translations, and clean up the messages I got from Google Translate!
|
481 |
* fixed: use region to help refine street address searches
|
482 |
|
483 |
+
= 1.0.6, 2012-04-06 =
|
484 |
+
|
485 |
* fixed: use plugin_dir_url() to get url base, and protocol-relative url to load Google Maps API (SSL compatible)
|
486 |
|
487 |
+
= 1.0.5, 2012-03-17 =
|
488 |
+
|
489 |
* fixed: CSS fixes for themes that muck up Google Maps images (e.g. twentyeleven)
|
490 |
* added: infowindow styles now in enqueued stylesheet
|
491 |
|
492 |
+
= 1.0.4, 2012-03-06 =
|
493 |
+
|
494 |
* fixed: use LatLng methods to access latitude/longitude, instead of (ever changing) Google Maps API private members
|
495 |
* added: tooltip on markers in non-KML maps
|
496 |
* added: options to disable pan control, zoom control, drag to pan, double-click to zoom
|
497 |
|
498 |
+
= 1.0.3, 2012-02-27 =
|
499 |
+
|
500 |
* fixed: address query updated to work with Google Maps v3.8 (so using address for centre marker works again)
|
501 |
* fixed: tied Google Maps API to v3.8 so newer versions don't break plugin, and will keep updated as API changes
|
502 |
|
503 |
+
= 1.0.2, 2012-02-04 =
|
504 |
+
|
505 |
* added: address attribute as alternative to center coordinates
|
506 |
* added: use address attribute for directions, if given (so that directions match address)
|
507 |
* changed: readme improved a little
|
508 |
* changed: refactored code for DRY (don't repeat yourself)
|
509 |
|
510 |
+
= 1.0.1, 2012-01-26 =
|
511 |
+
|
512 |
* fixed: directions bugs in JavaScript for Opera, IE
|
513 |
|
514 |
+
= 1.0.0, 2012-01-08 =
|
515 |
+
|
516 |
* final cleanup for public release
|