Flexible Map - Version 1.5.3

Version Description

[2012-11-30] = * fixed: when parameters showdirections or directionsfrom were specified, but not directions, the directions panel was not added to page and a JavaScript error was generated * changed: bump version of Google Maps API to 3.10

Download this release

Release Info

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

Code changes from version 1.5.2 to 1.5.3

class.FlxMapAdmin.php CHANGED
@@ -43,7 +43,7 @@ class FlxMapAdmin {
43
  // add settings link
44
  if ($file == FLXMAP_PLUGIN_NAME) {
45
  $links[] = '<a href="admin.php?page=' . self::MENU_PAGE . '-instructions">' . __('Instructions') . '</a>';
46
- $links[] = '<a href="http://wordpress.org/support/plugin/wp-flexible-map">' . __('Support') . '</a>';
47
  $links[] = '<a href="http://wordpress.org/extend/plugins/wp-flexible-map/">' . __('Rating') . '</a>';
48
  $links[] = '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=6ZCY9PST8E4GQ">' . __('Donate') . '</a>';
49
  }
43
  // add settings link
44
  if ($file == FLXMAP_PLUGIN_NAME) {
45
  $links[] = '<a href="admin.php?page=' . self::MENU_PAGE . '-instructions">' . __('Instructions') . '</a>';
46
+ $links[] = '<a href="http://wordpress.org/support/plugin/wp-flexible-map">' . __('Get Help') . '</a>';
47
  $links[] = '<a href="http://wordpress.org/extend/plugins/wp-flexible-map/">' . __('Rating') . '</a>';
48
  $links[] = '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=6ZCY9PST8E4GQ">' . __('Donate') . '</a>';
49
  }
class.FlxMapPlugin.php CHANGED
@@ -18,8 +18,7 @@ class FlxMapPlugin {
18
  static $instance = NULL;
19
 
20
  if (is_null($instance)) {
21
- $class = __CLASS__;
22
- $instance = new $class;
23
  }
24
 
25
  return $instance;
@@ -81,7 +80,7 @@ class FlxMapPlugin {
81
  $version = FLXMAP_PLUGIN_VERSION;
82
 
83
  // allow others to override the Google Maps API URL
84
- $apiURL = apply_filters('flexmap_google_maps_api_url', '//maps.google.com/maps/api/js?v=3.9&amp;sensor=false');
85
  if (!empty($apiURL)) {
86
  echo "<script src=\"$apiURL\"></script>\n";
87
  }
@@ -155,17 +154,27 @@ class FlxMapPlugin {
155
  $inlinestyles .= '"';
156
  }
157
 
158
- // build the directions div, if required
159
  $directions = FALSE;
160
- $divDirections = '';
161
  if (isset($attrs['directions']) && !self::isNo($attrs['directions'])) {
162
  $directions = TRUE;
163
- if (self::isYes($attrs['directions'])) {
164
- $divDirectionsID = "$divID-dir";
165
- $divDirections = "\n<div id='$divDirectionsID' class='flxmap-directions'></div>";
 
 
 
 
 
 
 
 
 
 
166
  }
167
  else {
168
- $divDirectionsID = self::str2js($attrs['directions']);
 
169
  }
170
  }
171
 
18
  static $instance = NULL;
19
 
20
  if (is_null($instance)) {
21
+ $instance = new self;
 
22
  }
23
 
24
  return $instance;
80
  $version = FLXMAP_PLUGIN_VERSION;
81
 
82
  // allow others to override the Google Maps API URL
83
+ $apiURL = apply_filters('flexmap_google_maps_api_url', '//maps.google.com/maps/api/js?v=3.10&amp;sensor=false');
84
  if (!empty($apiURL)) {
85
  echo "<script src=\"$apiURL\"></script>\n";
86
  }
154
  $inlinestyles .= '"';
155
  }
156
 
157
+ // test for any conditions that show directions (thus requiring the directions div)
158
  $directions = FALSE;
 
159
  if (isset($attrs['directions']) && !self::isNo($attrs['directions'])) {
160
  $directions = TRUE;
161
+ }
162
+ if (isset($attrs['showdirections']) && self::isYes($attrs['showdirections'])) {
163
+ $directions = TRUE;
164
+ }
165
+ if (isset($attrs['directionsfrom'])) {
166
+ $directions = TRUE;
167
+ }
168
+
169
+ // build the directions div, if required
170
+ $divDirections = '';
171
+ if ($directions) {
172
+ if (isset($attrs['directions']) && !self::isYes($attrs['directions'])) {
173
+ $divDirectionsID = self::str2js($attrs['directions']);
174
  }
175
  else {
176
+ $divDirectionsID = "$divID-dir";
177
+ $divDirections = "\n<div id='$divDirectionsID' class='flxmap-directions'></div>";
178
  }
179
  }
180
 
flexible-map.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Flexible Map
4
  Plugin URI: http://snippets.webaware.com.au/wordpress-plugins/wp-flexible-map/
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.5.2
7
  Author: WebAware
8
  Author URI: http://www.webaware.com.au/
9
  */
@@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28
  if (!defined('FLXMAP_PLUGIN_ROOT')) {
29
  define('FLXMAP_PLUGIN_ROOT', dirname(__FILE__) . '/');
30
  define('FLXMAP_PLUGIN_NAME', basename(dirname(__FILE__)) . '/' . basename(__FILE__));
31
- define('FLXMAP_PLUGIN_VERSION', '1.5.2');
32
 
33
  // shortcode tags
34
  define('FLXMAP_PLUGIN_TAG_MAP', 'flexiblemap');
3
  Plugin Name: Flexible Map
4
  Plugin URI: http://snippets.webaware.com.au/wordpress-plugins/wp-flexible-map/
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.5.3
7
  Author: WebAware
8
  Author URI: http://www.webaware.com.au/
9
  */
28
  if (!defined('FLXMAP_PLUGIN_ROOT')) {
29
  define('FLXMAP_PLUGIN_ROOT', dirname(__FILE__) . '/');
30
  define('FLXMAP_PLUGIN_NAME', basename(dirname(__FILE__)) . '/' . basename(__FILE__));
31
+ define('FLXMAP_PLUGIN_VERSION', '1.5.3');
32
 
33
  // shortcode tags
34
  define('FLXMAP_PLUGIN_TAG_MAP', 'flexiblemap');
readme.txt CHANGED
@@ -7,7 +7,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
7
  Tags: google, maps, google maps, shortcode, kml
8
  Requires at least: 3.2.1
9
  Tested up to: 3.4.2
10
- Stable tag: 1.5.2
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -162,7 +162,7 @@ jQuery(function($) {
162
 
163
  $('div.ui-tabs').bind('tabsshow', function(event, ui) {
164
  $("#" + ui.panel.id + " div.flxmap-container").each(function() {
165
- var flxmap = window[this.getAttribute("data-flxmap")],
166
  flxmap.redrawOnce();
167
  });
168
  });
@@ -194,6 +194,10 @@ And here's some sample jQuery code:
194
 
195
  == Changelog ==
196
 
 
 
 
 
197
  = 1.5.2 [2012-10-12] =
198
  * fixed: KML maps broken; KMLLayer status_changed event unreliable, use defaultviewport_changed event instead (possible Google Maps API change)
199
 
7
  Tags: google, maps, google maps, shortcode, kml
8
  Requires at least: 3.2.1
9
  Tested up to: 3.4.2
10
+ Stable tag: 1.5.3
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
162
 
163
  $('div.ui-tabs').bind('tabsshow', function(event, ui) {
164
  $("#" + ui.panel.id + " div.flxmap-container").each(function() {
165
+ var flxmap = window[this.getAttribute("data-flxmap")];
166
  flxmap.redrawOnce();
167
  });
168
  });
194
 
195
  == Changelog ==
196
 
197
+ = 1.5.3 [2012-11-30] =
198
+ * fixed: when parameters showdirections or directionsfrom were specified, but not directions, the directions panel was not added to page and a JavaScript error was generated
199
+ * changed: bump version of Google Maps API to 3.10
200
+
201
  = 1.5.2 [2012-10-12] =
202
  * fixed: KML maps broken; KMLLayer status_changed event unreliable, use defaultviewport_changed event instead (possible Google Maps API change)
203