Flexible Map - Version 1.12.1

Version Description

bump version of Google Maps API to 3.26

=

Download this release

Release Info

Developer webaware
Plugin Icon 128x128 Flexible Map
Version 1.12.1
Comparing to
See all releases

Code changes from version 1.12.0 to 1.12.1

changelog.md CHANGED
@@ -2,14 +2,18 @@
2
 
3
  ## Changelog
4
 
 
 
 
 
5
  ### 1.12.0, 2016-06-27
6
 
7
- * added: support for [Google Maps API key](https://developers.google.com/maps/documentation/javascript/), required [since 2016-06-22 for new websites](http://googlegeodevelopers.blogspot.com.au/2016/06/building-for-scale-updates-to-google.html).
8
 
9
  ### 1.11.0, 2016-06-05
10
 
11
  * fixed: monitor changes to invisible containers, not just non-displayed containers (thanks, [zetoun17](https://profiles.wordpress.org/zetoun17/)!)
12
- * fixed: "FlexibleMap is not defined" error when `isajax="1"` used without calling `flexmap_load_scripts()` (per the [FAQ](https://en-au.wordpress.org/plugins/wp-flexible-map/faq/))
13
  * added: ask [Autoptimize](https://wordpress.org/plugins/autoptimize/) to leave our inline script alone, to reduce the number of cached script files
14
  * changed: use localisation from [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/wp-flexible-map) in preference to local plugin copy
15
  * changed: translations updated from translate.wordpress.org
2
 
3
  ## Changelog
4
 
5
+ ### 1.12.1, 2016-11-18
6
+
7
+ * changed: bump version of Google Maps API to 3.26
8
+
9
  ### 1.12.0, 2016-06-27
10
 
11
+ * added: support for [Google Maps API key](https://developers.google.com/maps/documentation/javascript/), required [since 2016-06-22 for new websites](https://googlegeodevelopers.blogspot.com.au/2016/06/building-for-scale-updates-to-google.html).
12
 
13
  ### 1.11.0, 2016-06-05
14
 
15
  * fixed: monitor changes to invisible containers, not just non-displayed containers (thanks, [zetoun17](https://profiles.wordpress.org/zetoun17/)!)
16
+ * fixed: "FlexibleMap is not defined" error when `isajax="1"` used without calling `flexmap_load_scripts()` (per the [FAQ](https://wordpress.org/plugins/wp-flexible-map/faq/))
17
  * added: ask [Autoptimize](https://wordpress.org/plugins/autoptimize/) to leave our inline script alone, to reduce the number of cached script files
18
  * changed: use localisation from [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/wp-flexible-map) in preference to local plugin copy
19
  * changed: translations updated from translate.wordpress.org
css/styles.css CHANGED
@@ -1,5 +1,5 @@
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;
1
  /* stop some themes from messing up Google Maps' styling (e.g. twentyeleven, twentytwelve, twentythirteen...) */
2
+ /* https://flexible-map.webaware.net.au/ */
3
 
4
  .flxmap-container * {
5
  -webkit-box-sizing: content-box;
flexible-map.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /*
3
  Plugin Name: Flexible Map
4
- Plugin URI: http://flexible-map.webaware.net.au/
5
- Description: Embed Google Maps shortcodes in pages and posts, either by centre coordinates or street address, or by URL to a Google Earth KML file. <a href="http://flexible-map.webaware.net.au/manual/getting-started/">Get started</a> with a simple shortcode. See the <a href="http://flexible-map.webaware.net.au/manual/attribute-reference/">complete attribute reference</a> for more details.
6
- Version: 1.12.0
7
  Author: WebAware
8
- Author URI: http://webaware.com.au/
9
  Text Domain: wp-flexible-map
10
  Domain Path: /languages/
11
  */
@@ -37,7 +37,7 @@ 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_OPTIONS', 'flexible_map');
40
- define('FLXMAP_PLUGIN_VERSION', '1.12.0');
41
 
42
  // shortcode tags
43
  define('FLXMAP_PLUGIN_TAG_MAP', 'flexiblemap');
1
  <?php
2
  /*
3
  Plugin Name: Flexible Map
4
+ Plugin URI: https://flexible-map.webaware.net.au/
5
+ Description: Embed Google Maps shortcodes in pages and posts, either by centre coordinates or street address, or by URL to a Google Earth KML file. <a href="https://flexible-map.webaware.net.au/manual/getting-started/">Get started</a> with a simple shortcode. See the <a href="https://flexible-map.webaware.net.au/manual/attribute-reference/">complete attribute reference</a> for more details.
6
+ Version: 1.12.1
7
  Author: WebAware
8
+ Author URI: https://shop.webaware.com.au/
9
  Text Domain: wp-flexible-map
10
  Domain Path: /languages/
11
  */
37
  define('FLXMAP_PLUGIN_ROOT', dirname(__FILE__) . '/');
38
  define('FLXMAP_PLUGIN_NAME', basename(dirname(__FILE__)) . '/' . basename(__FILE__));
39
  define('FLXMAP_PLUGIN_OPTIONS', 'flexible_map');
40
+ define('FLXMAP_PLUGIN_VERSION', '1.12.1');
41
 
42
  // shortcode tags
43
  define('FLXMAP_PLUGIN_TAG_MAP', 'flexiblemap');
includes/class.FlxMapAdmin.php CHANGED
@@ -71,11 +71,11 @@ class FlxMapAdmin {
71
  public function addPluginDetailsLinks($links, $file) {
72
  // add settings link
73
  if ($file == FLXMAP_PLUGIN_NAME) {
74
- $links[] = sprintf('<a href="http://flexible-map.webaware.net.au/manual/getting-started/" target="_blank">%s</a>', _x('Instructions', 'plugin details links', 'wp-flexible-map'));
75
  $links[] = sprintf('<a href="https://wordpress.org/support/plugin/wp-flexible-map" target="_blank">%s</a>', _x('Get Help', 'plugin details links', 'wp-flexible-map'));
76
  $links[] = sprintf('<a href="https://wordpress.org/plugins/wp-flexible-map/" target="_blank">%s</a>', _x('Rating', 'plugin details links', 'wp-flexible-map'));
77
  $links[] = sprintf('<a href="https://translate.wordpress.org/projects/wp-plugins/wp-flexible-map" target="_blank">%s</a>', _x('Translate', 'plugin details links', 'wp-flexible-map'));
78
- $links[] = sprintf('<a href="http://shop.webaware.com.au/donations/?donation_for=Flexible+Map" target="_blank">%s</a>', _x('Donate', 'plugin details links', 'wp-flexible-map'));
79
  }
80
 
81
  return $links;
71
  public function addPluginDetailsLinks($links, $file) {
72
  // add settings link
73
  if ($file == FLXMAP_PLUGIN_NAME) {
74
+ $links[] = sprintf('<a href="https://flexible-map.webaware.net.au/manual/getting-started/" target="_blank">%s</a>', _x('Instructions', 'plugin details links', 'wp-flexible-map'));
75
  $links[] = sprintf('<a href="https://wordpress.org/support/plugin/wp-flexible-map" target="_blank">%s</a>', _x('Get Help', 'plugin details links', 'wp-flexible-map'));
76
  $links[] = sprintf('<a href="https://wordpress.org/plugins/wp-flexible-map/" target="_blank">%s</a>', _x('Rating', 'plugin details links', 'wp-flexible-map'));
77
  $links[] = sprintf('<a href="https://translate.wordpress.org/projects/wp-plugins/wp-flexible-map" target="_blank">%s</a>', _x('Translate', 'plugin details links', 'wp-flexible-map'));
78
+ $links[] = sprintf('<a href="https://shop.webaware.com.au/donations/?donation_for=Flexible+Map" target="_blank">%s</a>', _x('Donate', 'plugin details links', 'wp-flexible-map'));
79
  }
80
 
81
  return $links;
includes/class.FlxMapPlugin.php CHANGED
@@ -85,7 +85,7 @@ class FlxMapPlugin {
85
  public function enqueueScripts() {
86
  $options = get_option(FLXMAP_PLUGIN_OPTIONS, array());
87
 
88
- $args = array('v' => '3.24');
89
  if (!empty($options['apiKey'])) {
90
  $args['key'] = $options['apiKey'];
91
  }
@@ -96,8 +96,8 @@ class FlxMapPlugin {
96
  wp_register_script('google-maps', $apiURL, false, null, true);
97
  }
98
 
99
- $min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
100
- $ver = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? time() : FLXMAP_PLUGIN_VERSION;
101
  wp_register_script('flxmap', "{$this->urlBase}js/flexible-map$min.js", array('google-maps'), $ver, true);
102
 
103
  // theme writers: you can remove this stylesheet by calling wp_dequeue_script('flxmap');
85
  public function enqueueScripts() {
86
  $options = get_option(FLXMAP_PLUGIN_OPTIONS, array());
87
 
88
+ $args = array('v' => '3.26');
89
  if (!empty($options['apiKey'])) {
90
  $args['key'] = $options['apiKey'];
91
  }
96
  wp_register_script('google-maps', $apiURL, false, null, true);
97
  }
98
 
99
+ $min = SCRIPT_DEBUG ? '' : '.min';
100
+ $ver = SCRIPT_DEBUG ? time() : FLXMAP_PLUGIN_VERSION;
101
  wp_register_script('flxmap', "{$this->urlBase}js/flexible-map$min.js", array('google-maps'), $ver, true);
102
 
103
  // theme writers: you can remove this stylesheet by calling wp_dequeue_script('flxmap');
js/flexible-map.js CHANGED
@@ -1,7 +1,6 @@
1
  /*!
2
  JavaScript for the WordPress plugin wp-flexible-map
3
- copyright (c) 2011-2016 WebAware Pty Ltd, released under LGPL v2.1
4
- http://flexible-map.webaware.net.au/
5
  */
6
 
7
  function FlexibleMap() {
1
  /*!
2
  JavaScript for the WordPress plugin wp-flexible-map
3
+ https://flexible-map.webaware.net.au/
 
4
  */
5
 
6
  function FlexibleMap() {
js/flexible-map.min.js CHANGED
@@ -1 +1,5 @@
 
 
 
 
1
  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.markerLinkTarget="",this.markerLinkText=!1,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.dirTravelMode="driving",this.dirUnitSystem=void 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||"hidden"===b.visibility}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&&b.description){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||this.markerHTML||this.markerDescription||this.markerLink||this.markerDirections){var j,k,l,m,n,o,p=this,q=document.createElement("DIV");if(q.className="flxmap-infowin",n=document.createElement("DIV"),n.className="flxmap-marker-title",this.markerTitle&&(n.appendChild(document.createTextNode(this.markerTitle)),i.setTitle(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,this.markerLinkTarget&&(o.target=this.markerLinkTarget),o.appendChild(document.createTextNode(this.markerLinkText||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],b(o,"click",function(a){c(a),p.showDirections(this.dataLatitude,this.dataLongitude,!0)}),o.appendChild(document.createTextNode(this.gettext("Directions"))),n.appendChild(o),q.appendChild(n)),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)}(this.markerDirections||this.markerDirectionsShow)&&(this.startDirService(g),this.markerDirectionsShow&&this.showDirections(f[0],f[1],!1))},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){function f(){for(var a,d,f,h=document.getElementById(i.markerDirectionsDiv),j=document.createElement("form");d=h.lastChild;)h.removeChild(d);d=document.createElement("p"),d.appendChild(document.createTextNode(i.gettext("From")+": ")),f=document.createElement("input"),f.type="text",f.name="from",f.value=i.markerDirectionsDefault,d.appendChild(f),a=document.createElement("input"),a.type="submit",a.value=i.gettext("Get directions"),d.appendChild(a),j.appendChild(d),h.appendChild(j),"undefined"==typeof j.elements.from&&(j.elements.from=f),e&&f.focus(),b(j,"submit",function(a){c(a);var b=this.elements.from.value;/\S/.test(b)&&g(b)})}function g(b){var c=""===i.markerAddress?new google.maps.LatLng(a,d):i.markerAddress,e={origin:b,destination:c};switch(i.region&&(e.region=i.region),i.dirTravelMode){case"bicycling":e.travelMode=google.maps.TravelMode.BICYCLING;break;case"driving":e.travelMode=google.maps.TravelMode.DRIVING;break;case"transit":e.travelMode=google.maps.TravelMode.TRANSIT;break;case"walking":e.travelMode=google.maps.TravelMode.WALKING}switch(i.dirUnitSystem){case"imperial":e.unitSystem=google.maps.UnitSystem.IMPERIAL;break;case"metric":e.unitSystem=google.maps.UnitSystem.METRIC}i.dirService.route(e,h)}function h(a,b){var c=google.maps.DirectionsStatus;switch(b){case c.OK:i.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 i=this;this.markerDirectionsDiv&&this.dirShowSearch&&f(),this.markerDirectionsDefault&&g(this.markerDirectionsDefault)}}}();
1
+ /*!
2
+ JavaScript for the WordPress plugin wp-flexible-map
3
+ https://flexible-map.webaware.net.au/
4
+ */
5
  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.markerLinkTarget="",this.markerLinkText=!1,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.dirTravelMode="driving",this.dirUnitSystem=void 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||"hidden"===b.visibility}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&&b.description){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||this.markerHTML||this.markerDescription||this.markerLink||this.markerDirections){var j,k,l,m,n,o,p=this,q=document.createElement("DIV");if(q.className="flxmap-infowin",n=document.createElement("DIV"),n.className="flxmap-marker-title",this.markerTitle&&(n.appendChild(document.createTextNode(this.markerTitle)),i.setTitle(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,this.markerLinkTarget&&(o.target=this.markerLinkTarget),o.appendChild(document.createTextNode(this.markerLinkText||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],b(o,"click",function(a){c(a),p.showDirections(this.dataLatitude,this.dataLongitude,!0)}),o.appendChild(document.createTextNode(this.gettext("Directions"))),n.appendChild(o),q.appendChild(n)),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)}(this.markerDirections||this.markerDirectionsShow)&&(this.startDirService(g),this.markerDirectionsShow&&this.showDirections(f[0],f[1],!1))},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){function f(){for(var a,d,f,h=document.getElementById(i.markerDirectionsDiv),j=document.createElement("form");d=h.lastChild;)h.removeChild(d);d=document.createElement("p"),d.appendChild(document.createTextNode(i.gettext("From")+": ")),f=document.createElement("input"),f.type="text",f.name="from",f.value=i.markerDirectionsDefault,d.appendChild(f),a=document.createElement("input"),a.type="submit",a.value=i.gettext("Get directions"),d.appendChild(a),j.appendChild(d),h.appendChild(j),"undefined"==typeof j.elements.from&&(j.elements.from=f),e&&f.focus(),b(j,"submit",function(a){c(a);var b=this.elements.from.value;/\S/.test(b)&&g(b)})}function g(b){var c=""===i.markerAddress?new google.maps.LatLng(a,d):i.markerAddress,e={origin:b,destination:c};switch(i.region&&(e.region=i.region),i.dirTravelMode){case"bicycling":e.travelMode=google.maps.TravelMode.BICYCLING;break;case"driving":e.travelMode=google.maps.TravelMode.DRIVING;break;case"transit":e.travelMode=google.maps.TravelMode.TRANSIT;break;case"walking":e.travelMode=google.maps.TravelMode.WALKING}switch(i.dirUnitSystem){case"imperial":e.unitSystem=google.maps.UnitSystem.IMPERIAL;break;case"metric":e.unitSystem=google.maps.UnitSystem.METRIC}i.dirService.route(e,h)}function h(a,b){var c=google.maps.DirectionsStatus;switch(b){case c.OK:i.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 i=this;this.markerDirectionsDiv&&this.dirShowSearch&&f(),this.markerDirectionsDefault&&g(this.markerDirectionsDefault)}}}();
languages/wp-flexible-map.pot DELETED
@@ -1,57 +0,0 @@
1
- # copyright (c) 2014-2016 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: wp-flexible-map\n"
8
- "Report-Msgid-Bugs-To: translate@webaware.com.au\n"
9
- "POT-Creation-Date: 2016-06-05 19:43+1000\n"
10
- "PO-Revision-Date: 2016-06-05 19:43+1000\n"
11
- "Last-Translator: translate@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:35
19
- msgctxt "plugin details links"
20
- msgid "Instructions"
21
- msgstr ""
22
-
23
- #: includes/class.FlxMapAdmin.php:36
24
- msgctxt "plugin details links"
25
- msgid "Get Help"
26
- msgstr ""
27
-
28
- #: includes/class.FlxMapAdmin.php:37
29
- msgctxt "plugin details links"
30
- msgid "Rating"
31
- msgstr ""
32
-
33
- #: includes/class.FlxMapAdmin.php:38
34
- msgctxt "plugin details links"
35
- msgid "Translate"
36
- msgstr ""
37
-
38
- #: includes/class.FlxMapAdmin.php:39
39
- msgctxt "plugin details links"
40
- msgid "Donate"
41
- msgstr ""
42
-
43
- #: includes/declare-strings.php:13
44
- msgid "Click for details"
45
- msgstr ""
46
-
47
- #: includes/declare-strings.php:14
48
- msgid "Directions"
49
- msgstr ""
50
-
51
- #: includes/declare-strings.php:15
52
- msgid "From"
53
- msgstr ""
54
-
55
- #: includes/declare-strings.php:16
56
- msgid "Get directions"
57
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.md CHANGED
@@ -2,12 +2,12 @@
2
 
3
  Embed Google Maps in pages and posts, either by centre coordinates or street address, or by URL to a Google Earth KML file.
4
 
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
  * [Changelog](https://github.com/webaware/flexible-map/blob/master/changelog.md)
9
  * [Download](https://wordpress.org/plugins/wp-flexible-map/)
10
- * [Documentation](http://flexible-map.webaware.net.au/)
11
  * [Support](https://wordpress.org/support/plugin/wp-flexible-map)
12
  * [Translate](https://translate.wordpress.org/projects/wp-plugins/wp-flexible-map)
13
- * [Donate](http://shop.webaware.com.au/donations/?donation_for=Flexible+Map)
2
 
3
  Embed Google Maps in pages and posts, either by centre coordinates or street address, or by URL to a Google Earth KML file.
4
 
5
+ * [Home](https://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
  * [Changelog](https://github.com/webaware/flexible-map/blob/master/changelog.md)
9
  * [Download](https://wordpress.org/plugins/wp-flexible-map/)
10
+ * [Documentation](https://flexible-map.webaware.net.au/)
11
  * [Support](https://wordpress.org/support/plugin/wp-flexible-map)
12
  * [Translate](https://translate.wordpress.org/projects/wp-plugins/wp-flexible-map)
13
+ * [Donate](https://shop.webaware.com.au/donations/?donation_for=Flexible+Map)
readme.txt CHANGED
@@ -1,15 +1,15 @@
1
  === Flexible Map ===
2
  Contributors: webaware
3
  Plugin Name: 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: 4.0
9
- Tested up to: 4.6
10
- Stable tag: 1.12.0
11
  License: GPLv2 or later
12
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
14
  Embed Google Maps shortcodes in pages and posts, either by centre coordinates or street address, or by URL to a Google Earth KML file.
15
 
@@ -33,8 +33,8 @@ Flexible Map allows you to add Google Maps to your WordPress website with simple
33
  * directions can be dropped into any div element with an ID
34
  * minimal dependencies -- just WordPress and the Google Maps API
35
 
36
- [Get started with Flexible Map](http://flexible-map.webaware.net.au/manual/getting-started/).
37
- [Read the manual online](http://flexible-map.webaware.net.au/manual/).
38
 
39
  = Sponsorships =
40
 
@@ -88,9 +88,9 @@ Either the center or the address paramater is required. If you provide both, the
88
  * **link**: URL to link from the marker title, e.g. *link="http://example.com/"*
89
  * **linktarget**: where marker link opens, e.g. *linktarget="_blank"*
90
  * **linktext**: marker link text, overriding the default text
91
- * **icon**: URL to icon for the marker, e.g. *icon="http://maps.google.com/mapfiles/kml/pal3/icon29.png"*
92
  * **description**: a description of the marker location (can have HTML links), e.g. *description="Lorem ipsum dolor sit amet"*
93
- * **html**: some simple HTML to add to the info window, e.g. *`<img src='http://example.com/logo.img' />`*
94
  * **showinfo**: show the marker's info window when the map loads, from [true, false], e.g. *showinfo="false"*; default=true
95
 
96
  *Samples*:
@@ -165,13 +165,13 @@ There are also some filter hooks that allow you to change the behaviour of the p
165
  * `flexmap_shortcode_script`: filter the generated JavaScript
166
  * `flexmap_custom_map_types`: register custom Google Maps map types
167
 
168
- For more information and examples, see [the reference website](http://flexible-map.webaware.net.au/).
169
 
170
  == Frequently Asked Questions ==
171
 
172
  = Do I need an API key? =
173
 
174
- All websites using Google Maps for the first time need an API key. Websites that were using Google Maps before 2016-06-22 are permitted to keep using Google Maps without a key -- for now, at least. Read [this Google blog post](http://googlegeodevelopers.blogspot.com.au/2016/06/building-for-scale-updates-to-google.html) for more information.
175
 
176
  = Where are the settings? =
177
 
@@ -210,7 +210,7 @@ When you use just centre coordinates for your map, the directions may send peopl
210
 
211
  = How do I get the maps to use my language? =
212
 
213
- The plugin uses localised messages for things like the Directions link and the default message on links in info windows. If you have your [WordPress installation set to use your language](http://codex.wordpress.org/WordPress_in_Your_Language), the plugin should automatically pick it up. If you need to force it to pick up your language (or want to offer a different language), use the `locale` attribute, e.g. `locale="ru"` or `locale="zh-TW"`.
214
 
215
  Google Maps will use the locale information from your web browser to help display maps and directions in your language (see your browser's language settings). If you want to force the Google Maps language for every map on a page, you can use a filter hook. For example, here's how to force the Google Maps language to match the language of the page / post its on (e.g. when using WPML translated content):
216
 
@@ -298,7 +298,7 @@ To make it load locale scripts as well, e.g. for French and Chinese language tex
298
 
299
  `flexmap_load_scripts(array('fr', 'zh'));`
300
 
301
- The plugin will detect when AJAX is being used via the [WordPress standard method](http://codex.wordpress.org/AJAX_in_Plugins), and adjust accordingly (but you still need to load the scripts as above). If another method is used, add `isajax='true'` to the shortcode attributes.
302
 
303
  NB: currently, only AJAX methods that parse script tags will work correctly; this includes some [jQuery methods](http://stackoverflow.com/q/2203762/911083) (but [not all](http://stackoverflow.com/a/2699905/911083)). A future version of the plugin will be more AJAX friendly.
304
 
@@ -316,23 +316,18 @@ Either turn off CloudFlare Rocketscript :) or install the [Flxmap No Rocketscrip
316
 
317
  == Upgrade Notice ==
318
 
319
- = 1.12.0 =
320
 
321
- added support for Google Maps API key, required since 2016-06-22 for new websites
322
 
323
  == Changelog ==
324
 
325
  The full changelog can be found [on GitHub](https://github.com/webaware/flexible-map/blob/master/changelog.md). Recent entries:
326
 
327
- ### 1.12.0, 2016-06-27
328
 
329
- * added: support for [Google Maps API key](https://developers.google.com/maps/documentation/javascript/), required [since 2016-06-22 for new websites](http://googlegeodevelopers.blogspot.com.au/2016/06/building-for-scale-updates-to-google.html).
330
 
331
- ### 1.11.0, 2016-06-05
332
 
333
- * fixed: monitor changes to invisible containers, not just non-displayed containers (thanks, [zetoun17](https://profiles.wordpress.org/zetoun17/)!)
334
- * fixed: "FlexibleMap is not defined" error when `isajax="1"` used without calling `flexmap_load_scripts()` (per the [FAQ](https://en-au.wordpress.org/plugins/wp-flexible-map/faq/))
335
- * added: ask [Autoptimize](https://wordpress.org/plugins/autoptimize/) to leave our inline script alone, to reduce the number of cached script files
336
- * changed: use localisation from [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/wp-flexible-map) in preference to local plugin copy
337
- * changed: translations updated from translate.wordpress.org
338
- * changed: bump version of Google Maps API to 3.24
1
  === Flexible Map ===
2
  Contributors: webaware
3
  Plugin Name: Flexible Map
4
+ Plugin URI: https://flexible-map.webaware.net.au/
5
+ Author URI: https://shop.webaware.com.au/
6
+ Donate link: https://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: 4.0
9
+ Tested up to: 4.7
10
+ Stable tag: 1.12.1
11
  License: GPLv2 or later
12
+ License URI: https://www.gnu.org/licenses/gpl-2.0.html
13
 
14
  Embed Google Maps shortcodes in pages and posts, either by centre coordinates or street address, or by URL to a Google Earth KML file.
15
 
33
  * directions can be dropped into any div element with an ID
34
  * minimal dependencies -- just WordPress and the Google Maps API
35
 
36
+ [Get started with Flexible Map](https://flexible-map.webaware.net.au/manual/getting-started/).
37
+ [Read the manual online](https://flexible-map.webaware.net.au/manual/).
38
 
39
  = Sponsorships =
40
 
88
  * **link**: URL to link from the marker title, e.g. *link="http://example.com/"*
89
  * **linktarget**: where marker link opens, e.g. *linktarget="_blank"*
90
  * **linktext**: marker link text, overriding the default text
91
+ * **icon**: URL to icon for the marker, e.g. *icon="https://maps.google.com/mapfiles/kml/pal3/icon29.png"*
92
  * **description**: a description of the marker location (can have HTML links), e.g. *description="Lorem ipsum dolor sit amet"*
93
+ * **html**: some simple HTML to add to the info window, e.g. *`<img src='https://example.com/logo.img' />`*
94
  * **showinfo**: show the marker's info window when the map loads, from [true, false], e.g. *showinfo="false"*; default=true
95
 
96
  *Samples*:
165
  * `flexmap_shortcode_script`: filter the generated JavaScript
166
  * `flexmap_custom_map_types`: register custom Google Maps map types
167
 
168
+ For more information and examples, see [the reference website](https://flexible-map.webaware.net.au/).
169
 
170
  == Frequently Asked Questions ==
171
 
172
  = Do I need an API key? =
173
 
174
+ All websites using Google Maps for the first time need an API key. Websites that were using Google Maps before 2016-06-22 are permitted to keep using Google Maps without a key -- for now, at least. Read [this Google blog post](https://googlegeodevelopers.blogspot.com.au/2016/06/building-for-scale-updates-to-google.html) for more information.
175
 
176
  = Where are the settings? =
177
 
210
 
211
  = How do I get the maps to use my language? =
212
 
213
+ The plugin uses localised messages for things like the Directions link and the default message on links in info windows. If you have your [WordPress installation set to use your language](https://codex.wordpress.org/WordPress_in_Your_Language), the plugin should automatically pick it up. If you need to force it to pick up your language (or want to offer a different language), use the `locale` attribute, e.g. `locale="ru"` or `locale="zh-TW"`.
214
 
215
  Google Maps will use the locale information from your web browser to help display maps and directions in your language (see your browser's language settings). If you want to force the Google Maps language for every map on a page, you can use a filter hook. For example, here's how to force the Google Maps language to match the language of the page / post its on (e.g. when using WPML translated content):
216
 
298
 
299
  `flexmap_load_scripts(array('fr', 'zh'));`
300
 
301
+ The plugin will detect when AJAX is being used via the [WordPress standard method](https://codex.wordpress.org/AJAX_in_Plugins), and adjust accordingly (but you still need to load the scripts as above). If another method is used, add `isajax='true'` to the shortcode attributes.
302
 
303
  NB: currently, only AJAX methods that parse script tags will work correctly; this includes some [jQuery methods](http://stackoverflow.com/q/2203762/911083) (but [not all](http://stackoverflow.com/a/2699905/911083)). A future version of the plugin will be more AJAX friendly.
304
 
316
 
317
  == Upgrade Notice ==
318
 
319
+ = 1.12.1 =
320
 
321
+ bump version of Google Maps API to 3.26
322
 
323
  == Changelog ==
324
 
325
  The full changelog can be found [on GitHub](https://github.com/webaware/flexible-map/blob/master/changelog.md). Recent entries:
326
 
327
+ ### 1.12.1, 2016-11-18
328
 
329
+ * changed: bump version of Google Maps API to 3.26
330
 
331
+ ### 1.12.0, 2016-06-27
332
 
333
+ * added: support for [Google Maps API key](https://developers.google.com/maps/documentation/javascript/), required [since 2016-06-22 for new websites](https://googlegeodevelopers.blogspot.com.au/2016/06/building-for-scale-updates-to-google.html).