WP Google Maps - Version 6.0.10

Version Description

  • Tested on WP 3.9
  • Fixed a bug that only displayed two map marker categories for the store locator (pro)
  • Added the option to select which Google Map API version you would like to use. There were issues when using Google Map API v3.15 (lines were created on the map for no reason. The default is now Google Map API V3.14)
Download this release

Release Info

Developer WPGMaps
Plugin Icon 128x128 WP Google Maps
Version 6.0.10
Comparing to
See all releases

Code changes from version 6.0.9 to 6.0.10

Files changed (3) hide show
  1. base/assets/logan.png +0 -0
  2. readme.txt +6 -1
  3. wpGoogleMaps.php +69 -17
base/assets/logan.png DELETED
Binary file
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: WPGMaps
3
  Donate link: http://www.wpgmaps.com
4
  Tags: google maps, maps, map, map markers, google, google map, wp maps, wp google maps, wp google map, easy map, store locator, map plugin, directions, map directions, google map plugin, polygons, polylines, streetview, location, marker, latitude, longitude
5
  Requires at least: 3.5
6
- Tested up to: 3.8.1
7
  Stable tag: trunk
8
  License: GPLv2
9
 
@@ -99,6 +99,11 @@ Previous versions may cause your blog to slow down. Upgrading to 4.5 will get ri
99
 
100
  == Changelog ==
101
 
 
 
 
 
 
102
  = 6.0.9 =
103
  * Maps now automatically work in Tabs without having to add any code
104
  * Added a "zoom level" slider to the Google map settings
3
  Donate link: http://www.wpgmaps.com
4
  Tags: google maps, maps, map, map markers, google, google map, wp maps, wp google maps, wp google map, easy map, store locator, map plugin, directions, map directions, google map plugin, polygons, polylines, streetview, location, marker, latitude, longitude
5
  Requires at least: 3.5
6
+ Tested up to: 3.9
7
  Stable tag: trunk
8
  License: GPLv2
9
 
99
 
100
  == Changelog ==
101
 
102
+ = 6.0.10 =
103
+ * Tested on WP 3.9
104
+ * Fixed a bug that only displayed two map marker categories for the store locator (pro)
105
+ * Added the option to select which Google Map API version you would like to use. There were issues when using Google Map API v3.15 (lines were created on the map for no reason. The default is now Google Map API V3.14)
106
+
107
  = 6.0.9 =
108
  * Maps now automatically work in Tabs without having to add any code
109
  * Added a "zoom level" slider to the Google map settings
wpGoogleMaps.php CHANGED
@@ -3,12 +3,18 @@
3
  Plugin Name: WP Google Maps
4
  Plugin URI: http://www.wpgmaps.com
5
  Description: The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss.
6
- Version: 6.0.9
7
  Author: WP Google Maps
8
  Author URI: http://www.wpgmaps.com
9
  */
10
 
11
  /*
 
 
 
 
 
 
12
  * 6.0.9
13
  * Maps now automatically work in Tabs without having to add any code
14
  * Added a "zoom level" slider to the Google map settings
@@ -87,8 +93,8 @@ $wpgmza_tblname_poly = $wpdb->prefix . "wpgmza_polygon";
87
  $wpgmza_tblname_polylines = $wpdb->prefix . "wpgmza_polylines";
88
  $wpgmza_tblname_categories = $wpdb->prefix. "wpgmza_categories";
89
  $wpgmza_tblname_category_maps = $wpdb->prefix. "wpgmza_category_maps";
90
- $wpgmza_version = "6.0.9";
91
- $wpgmza_p_version = "6.0.9";
92
  $wpgmza_t = "basic";
93
  define("WPGMAPS", $wpgmza_version);
94
  define("WPGMAPS_DIR",plugin_dir_url(__FILE__));
@@ -231,7 +237,7 @@ function wpgmaps_init() {
231
  $plugin_dir = basename(dirname(__FILE__))."/languages/";
232
  load_plugin_textdomain( 'wp-google-maps', false, $plugin_dir );
233
 
234
-
235
  /* handle first time users and updates */
236
  if (isset($_GET['page']) && $_GET['page'] == 'wp-google-maps-menu') {
237
 
@@ -258,7 +264,6 @@ function wpgmaps_init() {
258
  }
259
  }
260
  }
261
-
262
  /* check if version is outdated or plugin is being automatically updated */
263
  $current_version = get_option("wpgmaps_current_version");
264
  if (!isset($current_version) || $current_version != $wpgmza_version) {
@@ -404,11 +409,16 @@ function wpgmaps_admin_edit_marker_javascript() {
404
  $wpgmza_map_type = "ROADMAP";
405
 
406
  $wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
407
-
 
 
 
 
 
408
  ?>
409
  <script type="text/javascript">
410
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
411
- document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?sensor=false' type='text/javascript'%3E%3C/script%3E"));
412
  </script>
413
  <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
414
  <link rel="stylesheet" type="text/css" media="all" href="<?php echo wpgmaps_get_plugin_url(); ?>/css/data_table.css" />
@@ -531,6 +541,13 @@ function wpgmaps_admin_javascript_basic() {
531
  $wpgmza_lat = "51.5081290";
532
  $wpgmza_lng = "-0.1280050";
533
  }
 
 
 
 
 
 
 
534
 
535
 
536
  ?>
@@ -541,14 +558,14 @@ function wpgmaps_admin_javascript_basic() {
541
 
542
  <script type="text/javascript">
543
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
544
- document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?sensor=false&libraries=weather' type='text/javascript'%3E%3C/script%3E"));
545
  </script>
546
 
547
  <?php } else { ?>
548
 
549
  <script type="text/javascript">
550
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
551
- document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?sensor=false' type='text/javascript'%3E%3C/script%3E"));
552
  </script>
553
 
554
  <?php } ?>
@@ -587,10 +604,10 @@ function wpgmaps_admin_javascript_basic() {
587
  }
588
 
589
  jQuery("#wpgmza_map").css({
590
- height:'<?php echo $wpgmza_height; ?><?php echo $wpgmza_height_type; ?>',
591
- width:'<?php echo $wpgmza_width; ?><?php echo $wpgmza_width_type; ?>'
592
 
593
- });
594
  var geocoder = new google.maps.Geocoder();
595
  wpgmza_InitMap();
596
 
@@ -1109,7 +1126,13 @@ function wpgmaps_user_javascript_basic() {
1109
 
1110
  $res = wpgmza_get_map_data($wpgmza_current_map_id);
1111
  $wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
1112
-
 
 
 
 
 
 
1113
 
1114
  $map_other_settings = maybe_unserialize($res->other_settings);
1115
  $weather_layer = $map_other_settings['weather_layer'];
@@ -1146,14 +1169,14 @@ function wpgmaps_user_javascript_basic() {
1146
 
1147
  <script type="text/javascript">
1148
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
1149
- document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?sensor=false&libraries=weather' type='text/javascript'%3E%3C/script%3E"));
1150
  </script>
1151
 
1152
  <?php } else { ?>
1153
 
1154
  <script type="text/javascript">
1155
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
1156
- document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?sensor=false' type='text/javascript'%3E%3C/script%3E"));
1157
  </script>
1158
 
1159
  <?php } ?>
@@ -2195,6 +2218,7 @@ function wpgmaps_head() {
2195
  if (isset($_POST['wpgmza_settings_map_draggable'])) { $wpgmza_data['wpgmza_settings_map_draggable'] = esc_attr($_POST['wpgmza_settings_map_draggable']); }
2196
  if (isset($_POST['wpgmza_settings_map_clickzoom'])) { $wpgmza_data['wpgmza_settings_map_clickzoom'] = esc_attr($_POST['wpgmza_settings_map_clickzoom']); }
2197
  if (isset($_POST['wpgmza_settings_map_open_marker_by'])) { $wpgmza_data['wpgmza_settings_map_open_marker_by'] = esc_attr($_POST['wpgmza_settings_map_open_marker_by']); }
 
2198
 
2199
 
2200
  update_option('WPGMZA_OTHER_SETTINGS', $wpgmza_data);
@@ -2725,7 +2749,18 @@ function wpgmaps_settings_page_basic() {
2725
  if (isset($wpgmza_settings['wpgmza_settings_map_scroll'])) { $wpgmza_settings_map_scroll = $wpgmza_settings['wpgmza_settings_map_scroll']; }
2726
  if (isset($wpgmza_settings['wpgmza_settings_map_draggable'])) { $wpgmza_settings_map_draggable = $wpgmza_settings['wpgmza_settings_map_draggable']; }
2727
  if (isset($wpgmza_settings['wpgmza_settings_map_clickzoom'])) { $wpgmza_settings_map_clickzoom = $wpgmza_settings['wpgmza_settings_map_clickzoom']; }
 
2728
 
 
 
 
 
 
 
 
 
 
 
2729
  $wpgmza_settings_map_open_marker_by_checked[0] = "";
2730
  $wpgmza_settings_map_open_marker_by_checked[1] = "";
2731
  $wpgmza_settings_map_open_marker_by = $wpgmza_settings['wpgmza_settings_map_open_marker_by'];
@@ -2733,7 +2768,8 @@ function wpgmaps_settings_page_basic() {
2733
  else if ($wpgmza_settings_map_open_marker_by == '2') { $wpgmza_settings_map_open_marker_by_checked[1] = "checked='checked'"; }
2734
  else { $wpgmza_settings_map_open_marker_by_checked[0] = "checked='checked'"; }
2735
 
2736
-
 
2737
  if (isset($wpgmza_settings_map_scroll)) { if ($wpgmza_settings_map_scroll == "yes") { $wpgmza_scroll_checked = "checked='checked'"; } else { $wpgmza_scroll_checked = ""; } } else { $wpgmza_scroll_checked = ""; }
2738
  if (isset($wpgmza_settings_map_draggable)) { if ($wpgmza_settings_map_draggable == "yes") { $wpgmza_draggable_checked = "checked='checked'"; } else { $wpgmza_draggable_checked = ""; } } else { $wpgmza_draggable_checked = ""; }
2739
  if (isset($wpgmza_settings_map_clickzoom)) { if ($wpgmza_settings_map_clickzoom == "yes") { $wpgmza_clickzoom_checked = "checked='checked'"; } else { $wpgmza_clickzoom_checked = ""; } } else { $wpgmza_clickzoom_checked = ""; }
@@ -2789,6 +2825,17 @@ function wpgmaps_settings_page_basic() {
2789
  <input name='wpgmza_settings_force_jquery' type='checkbox' id='wpgmza_settings_force_jquery' value='yes' $wpgmza_force_jquery_checked /> ".__("Over-ride current jQuery with version 1.8.3 (Tick this box if you are receiving jQuery related errors)")."<br />
2790
  </td>
2791
  </tr>
 
 
 
 
 
 
 
 
 
 
 
2792
 
2793
  </table>
2794
 
@@ -3877,7 +3924,12 @@ function wpgmza_return_marker_list($map_id,$admin = true,$width = "100%",$mashup
3877
  $icon = "<img src='".$result->icon."' />";
3878
  }
3879
  } else {
3880
- $icon = "<img src='".$category_icon."' />";
 
 
 
 
 
3881
  }
3882
 
3883
  if (!$link) { $linktd = ""; } else { $linktd = "<a href=\"".$result->link."\" target=\"_BLANK\" title=\"".__("View this link","wp-google-maps")."\">&gt;&gt;</a>"; }
3
  Plugin Name: WP Google Maps
4
  Plugin URI: http://www.wpgmaps.com
5
  Description: The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss.
6
+ Version: 6.0.10
7
  Author: WP Google Maps
8
  Author URI: http://www.wpgmaps.com
9
  */
10
 
11
  /*
12
+ * 6.0.10
13
+ * Fixed a bug that used the category icon instead of a defined marker icon when there was a category icon set
14
+ * Fixed a bug that only displayed two map marker categories for the store locator (pro)
15
+ * Added the option to select which API version you would like to use
16
+ *
17
+ *
18
  * 6.0.9
19
  * Maps now automatically work in Tabs without having to add any code
20
  * Added a "zoom level" slider to the Google map settings
93
  $wpgmza_tblname_polylines = $wpdb->prefix . "wpgmza_polylines";
94
  $wpgmza_tblname_categories = $wpdb->prefix. "wpgmza_categories";
95
  $wpgmza_tblname_category_maps = $wpdb->prefix. "wpgmza_category_maps";
96
+ $wpgmza_version = "6.0.10";
97
+ $wpgmza_p_version = "6.0.10";
98
  $wpgmza_t = "basic";
99
  define("WPGMAPS", $wpgmza_version);
100
  define("WPGMAPS_DIR",plugin_dir_url(__FILE__));
237
  $plugin_dir = basename(dirname(__FILE__))."/languages/";
238
  load_plugin_textdomain( 'wp-google-maps', false, $plugin_dir );
239
 
240
+
241
  /* handle first time users and updates */
242
  if (isset($_GET['page']) && $_GET['page'] == 'wp-google-maps-menu') {
243
 
264
  }
265
  }
266
  }
 
267
  /* check if version is outdated or plugin is being automatically updated */
268
  $current_version = get_option("wpgmaps_current_version");
269
  if (!isset($current_version) || $current_version != $wpgmza_version) {
409
  $wpgmza_map_type = "ROADMAP";
410
 
411
  $wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
412
+ $api_version = $wpgmza_settings['wpgmza_api_version'];
413
+ if (isset($api_version) && $api_version != "") {
414
+ $api_version_string = "v=$api_version&";
415
+ } else {
416
+ $api_version_string = "v=3.14&";
417
+ }
418
  ?>
419
  <script type="text/javascript">
420
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
421
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>sensor=false' type='text/javascript'%3E%3C/script%3E"));
422
  </script>
423
  <link rel='stylesheet' id='wpgooglemaps-css' href='<?php echo wpgmaps_get_plugin_url(); ?>/css/wpgmza_style.css' type='text/css' media='all' />
424
  <link rel="stylesheet" type="text/css" media="all" href="<?php echo wpgmaps_get_plugin_url(); ?>/css/data_table.css" />
541
  $wpgmza_lat = "51.5081290";
542
  $wpgmza_lng = "-0.1280050";
543
  }
544
+
545
+ $api_version = $wpgmza_settings['wpgmza_api_version'];
546
+ if (isset($api_version) && $api_version != "") {
547
+ $api_version_string = "v=$api_version&";
548
+ } else {
549
+ $api_version_string = "v=3.14&";
550
+ }
551
 
552
 
553
  ?>
558
 
559
  <script type="text/javascript">
560
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
561
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>sensor=false&libraries=weather' type='text/javascript'%3E%3C/script%3E"));
562
  </script>
563
 
564
  <?php } else { ?>
565
 
566
  <script type="text/javascript">
567
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
568
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>sensor=false' type='text/javascript'%3E%3C/script%3E"));
569
  </script>
570
 
571
  <?php } ?>
604
  }
605
 
606
  jQuery("#wpgmza_map").css({
607
+ height:'<?php echo $wpgmza_height; ?><?php echo $wpgmza_height_type; ?>',
608
+ width:'<?php echo $wpgmza_width; ?><?php echo $wpgmza_width_type; ?>'
609
 
610
+ });
611
  var geocoder = new google.maps.Geocoder();
612
  wpgmza_InitMap();
613
 
1126
 
1127
  $res = wpgmza_get_map_data($wpgmza_current_map_id);
1128
  $wpgmza_settings = get_option("WPGMZA_OTHER_SETTINGS");
1129
+
1130
+ $api_version = $wpgmza_settings['wpgmza_api_version'];
1131
+ if (isset($api_version) && $api_version != "") {
1132
+ $api_version_string = "v=$api_version&";
1133
+ } else {
1134
+ $api_version_string = "v=3.14&";
1135
+ }
1136
 
1137
  $map_other_settings = maybe_unserialize($res->other_settings);
1138
  $weather_layer = $map_other_settings['weather_layer'];
1169
 
1170
  <script type="text/javascript">
1171
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
1172
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>sensor=false&libraries=weather' type='text/javascript'%3E%3C/script%3E"));
1173
  </script>
1174
 
1175
  <?php } else { ?>
1176
 
1177
  <script type="text/javascript">
1178
  var gmapsJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
1179
+ document.write(unescape("%3Cscript src='" + gmapsJsHost + "maps.google.com/maps/api/js?<?php echo $api_version_string; ?>sensor=false' type='text/javascript'%3E%3C/script%3E"));
1180
  </script>
1181
 
1182
  <?php } ?>
2218
  if (isset($_POST['wpgmza_settings_map_draggable'])) { $wpgmza_data['wpgmza_settings_map_draggable'] = esc_attr($_POST['wpgmza_settings_map_draggable']); }
2219
  if (isset($_POST['wpgmza_settings_map_clickzoom'])) { $wpgmza_data['wpgmza_settings_map_clickzoom'] = esc_attr($_POST['wpgmza_settings_map_clickzoom']); }
2220
  if (isset($_POST['wpgmza_settings_map_open_marker_by'])) { $wpgmza_data['wpgmza_settings_map_open_marker_by'] = esc_attr($_POST['wpgmza_settings_map_open_marker_by']); }
2221
+ if (isset($_POST['wpgmza_api_version'])) { $wpgmza_data['wpgmza_api_version'] = esc_attr($_POST['wpgmza_api_version']); }
2222
 
2223
 
2224
  update_option('WPGMZA_OTHER_SETTINGS', $wpgmza_data);
2749
  if (isset($wpgmza_settings['wpgmza_settings_map_scroll'])) { $wpgmza_settings_map_scroll = $wpgmza_settings['wpgmza_settings_map_scroll']; }
2750
  if (isset($wpgmza_settings['wpgmza_settings_map_draggable'])) { $wpgmza_settings_map_draggable = $wpgmza_settings['wpgmza_settings_map_draggable']; }
2751
  if (isset($wpgmza_settings['wpgmza_settings_map_clickzoom'])) { $wpgmza_settings_map_clickzoom = $wpgmza_settings['wpgmza_settings_map_clickzoom']; }
2752
+ if (isset($wpgmza_settings['wpgmza_api_version'])) { $wpgmza_api_version = $wpgmza_settings['wpgmza_api_version']; }
2753
 
2754
+
2755
+ $wpgmza_api_version_selected[0] = "";
2756
+ $wpgmza_api_version_selected[1] = "";
2757
+ $wpgmza_api_version_selected[2] = "";
2758
+
2759
+ if ($wpgmza_api_version == "3.14") { $wpgmza_api_version_selected[0] = "selected"; }
2760
+ else if ($wpgmza_api_version == "3.15") { $wpgmza_api_version_selected[1] = "selected"; }
2761
+ else if ($wpgmza_api_version == "3.exp") { $wpgmza_api_version_selected[2] = "selected"; }
2762
+ else { $wpgmza_api_version_selected[0] = "selected"; }
2763
+
2764
  $wpgmza_settings_map_open_marker_by_checked[0] = "";
2765
  $wpgmza_settings_map_open_marker_by_checked[1] = "";
2766
  $wpgmza_settings_map_open_marker_by = $wpgmza_settings['wpgmza_settings_map_open_marker_by'];
2768
  else if ($wpgmza_settings_map_open_marker_by == '2') { $wpgmza_settings_map_open_marker_by_checked[1] = "checked='checked'"; }
2769
  else { $wpgmza_settings_map_open_marker_by_checked[0] = "checked='checked'"; }
2770
 
2771
+
2772
+
2773
  if (isset($wpgmza_settings_map_scroll)) { if ($wpgmza_settings_map_scroll == "yes") { $wpgmza_scroll_checked = "checked='checked'"; } else { $wpgmza_scroll_checked = ""; } } else { $wpgmza_scroll_checked = ""; }
2774
  if (isset($wpgmza_settings_map_draggable)) { if ($wpgmza_settings_map_draggable == "yes") { $wpgmza_draggable_checked = "checked='checked'"; } else { $wpgmza_draggable_checked = ""; } } else { $wpgmza_draggable_checked = ""; }
2775
  if (isset($wpgmza_settings_map_clickzoom)) { if ($wpgmza_settings_map_clickzoom == "yes") { $wpgmza_clickzoom_checked = "checked='checked'"; } else { $wpgmza_clickzoom_checked = ""; } } else { $wpgmza_clickzoom_checked = ""; }
2825
  <input name='wpgmza_settings_force_jquery' type='checkbox' id='wpgmza_settings_force_jquery' value='yes' $wpgmza_force_jquery_checked /> ".__("Over-ride current jQuery with version 1.8.3 (Tick this box if you are receiving jQuery related errors)")."<br />
2826
  </td>
2827
  </tr>
2828
+ <tr>
2829
+ <td width='200' valign='top'>".__("Use Google Maps API","wp-google-maps").":</td>
2830
+ <td>
2831
+ <select id='wpgmza_api_version' name='wpgmza_api_version' >
2832
+ <option value=\"3.14\" ".$wpgmza_api_version_selected[0].">3.14</option>
2833
+ <option value=\"3.15\" ".$wpgmza_api_version_selected[1].">3.15</option>
2834
+ <option value=\"3.exp\" ".$wpgmza_api_version_selected[2].">3.exp</option>
2835
+
2836
+ </select>
2837
+ </td>
2838
+ </tr>
2839
 
2840
  </table>
2841
 
3924
  $icon = "<img src='".$result->icon."' />";
3925
  }
3926
  } else {
3927
+ if (!$icon) {
3928
+ $icon = "<img src='".$category_icon."' />";
3929
+ } else {
3930
+ $icon = "<img src='".$result->icon."' />";
3931
+ }
3932
+
3933
  }
3934
 
3935
  if (!$link) { $linktd = ""; } else { $linktd = "<a href=\"".$result->link."\" target=\"_BLANK\" title=\"".__("View this link","wp-google-maps")."\">&gt;&gt;</a>"; }