Version Description
- Changed: Show only one info window
Download this release
Release Info
Developer | webdorado |
Plugin | WD Google Maps – Google Maps builder Plugin |
Version | 1.0.12 |
Comparing to | |
See all releases |
Code changes from version 1.0.11 to 1.0.12
- frontend/views/GMWDViewFrontendMap.php +1 -0
- gmwd_admin_class.php +1 -1
- js/init_map.js +12 -4
- js/init_map_admin.js +12 -3
- readme.txt +4 -1
- wd-google-maps.php +1 -1
frontend/views/GMWDViewFrontendMap.php
CHANGED
@@ -108,6 +108,7 @@ class GMWDViewFrontendMap extends GMWDViewFrontend{
|
|
108 |
gmwdmapData["allPolygonMarkers" + '<?php echo $shortcode_id;?>'] = [];
|
109 |
gmwdmapData["allPolylines" + '<?php echo $shortcode_id;?>'] = [];
|
110 |
gmwdmapData["allPolylineMarkers" + '<?php echo $shortcode_id;?>'] = [];
|
|
|
111 |
gmwdmapData["ajaxData" + '<?php echo $shortcode_id;?>'] = {};
|
112 |
|
113 |
var ajaxURL = "<?php echo admin_url('admin-ajax.php');?>";
|
108 |
gmwdmapData["allPolygonMarkers" + '<?php echo $shortcode_id;?>'] = [];
|
109 |
gmwdmapData["allPolylines" + '<?php echo $shortcode_id;?>'] = [];
|
110 |
gmwdmapData["allPolylineMarkers" + '<?php echo $shortcode_id;?>'] = [];
|
111 |
+
gmwdmapData["infoWindows" + '<?php echo $shortcode_id;?>'] = [];
|
112 |
gmwdmapData["ajaxData" + '<?php echo $shortcode_id;?>'] = {};
|
113 |
|
114 |
var ajaxURL = "<?php echo admin_url('admin-ajax.php');?>";
|
gmwd_admin_class.php
CHANGED
@@ -11,7 +11,7 @@ class GMWDAdmin{
|
|
11 |
// Variables //
|
12 |
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
protected static $instance = null;
|
14 |
-
private static $version = '1.0.
|
15 |
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
// Constructor & Destructor //
|
17 |
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
// Variables //
|
12 |
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
protected static $instance = null;
|
14 |
+
private static $version = '1.0.12';
|
15 |
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
// Constructor & Destructor //
|
17 |
////////////////////////////////////////////////////////////////////////////////////////
|
js/init_map.js
CHANGED
@@ -76,18 +76,20 @@ function gmwdSetMapMarkers(_key){
|
|
76 |
position: {lat: Number(mapMarker.lat), lng: Number(mapMarker.lng)}
|
77 |
});
|
78 |
gmwdmapData["allMarkers" + _key].push(marker);
|
79 |
-
|
|
|
80 |
if(mapMarker.enable_info_window == 1){
|
81 |
contentString = mapMarker.pic_url ? '<img src="' + mapMarker.pic_url + '" style="float:right; margin-left: 10px; max-width:100px">' : '';
|
82 |
contentString += (mapMarker.title || mapMarker.address) ;
|
83 |
|
84 |
-
|
85 |
content: contentString,
|
86 |
disableAutoPan: true
|
87 |
});
|
88 |
if(mapMarker.info_window_open == 1){
|
89 |
infoWindow.open(gmwdmapData["main_map" + _key], marker);
|
90 |
}
|
|
|
91 |
}
|
92 |
|
93 |
if(mapMarker.title){
|
@@ -105,7 +107,7 @@ function gmwdSetMapMarkers(_key){
|
|
105 |
}
|
106 |
|
107 |
//events
|
108 |
-
(function(overlay, row, overlayWindow, map, openEvent) {
|
109 |
|
110 |
google.maps.event.addListener(overlay, 'click', function() {
|
111 |
if(row.link_url){
|
@@ -113,6 +115,9 @@ function gmwdSetMapMarkers(_key){
|
|
113 |
}
|
114 |
if(openEvent == "click"){
|
115 |
if(overlayWindow && row.enable_info_window == 1){
|
|
|
|
|
|
|
116 |
overlayWindow.open(map, overlay);
|
117 |
}
|
118 |
}
|
@@ -120,12 +125,15 @@ function gmwdSetMapMarkers(_key){
|
|
120 |
google.maps.event.addListener(overlay, 'mouseover', function() {
|
121 |
if(openEvent == "hover"){
|
122 |
if(overlayWindow && row.enable_info_window == 1){
|
|
|
|
|
|
|
123 |
overlayWindow.open(map, overlay);
|
124 |
}
|
125 |
}
|
126 |
});
|
127 |
|
128 |
-
}(marker, mapMarker, infoWindow, gmwdmapData["main_map" + _key], gmwdmapData["infoWindowOpenOn" + _key]));
|
129 |
|
130 |
}
|
131 |
}
|
76 |
position: {lat: Number(mapMarker.lat), lng: Number(mapMarker.lng)}
|
77 |
});
|
78 |
gmwdmapData["allMarkers" + _key].push(marker);
|
79 |
+
|
80 |
+
var infoWindow;
|
81 |
if(mapMarker.enable_info_window == 1){
|
82 |
contentString = mapMarker.pic_url ? '<img src="' + mapMarker.pic_url + '" style="float:right; margin-left: 10px; max-width:100px">' : '';
|
83 |
contentString += (mapMarker.title || mapMarker.address) ;
|
84 |
|
85 |
+
infoWindow = new google.maps.InfoWindow({
|
86 |
content: contentString,
|
87 |
disableAutoPan: true
|
88 |
});
|
89 |
if(mapMarker.info_window_open == 1){
|
90 |
infoWindow.open(gmwdmapData["main_map" + _key], marker);
|
91 |
}
|
92 |
+
gmwdmapData["infoWindows" + _key].push(infoWindow);
|
93 |
}
|
94 |
|
95 |
if(mapMarker.title){
|
107 |
}
|
108 |
|
109 |
//events
|
110 |
+
(function(overlay, row, overlayWindow, map, openEvent, overlayWindows) {
|
111 |
|
112 |
google.maps.event.addListener(overlay, 'click', function() {
|
113 |
if(row.link_url){
|
115 |
}
|
116 |
if(openEvent == "click"){
|
117 |
if(overlayWindow && row.enable_info_window == 1){
|
118 |
+
for(var j=0; j < overlayWindows.length; j++){
|
119 |
+
overlayWindows[j].open(null, null);
|
120 |
+
}
|
121 |
overlayWindow.open(map, overlay);
|
122 |
}
|
123 |
}
|
125 |
google.maps.event.addListener(overlay, 'mouseover', function() {
|
126 |
if(openEvent == "hover"){
|
127 |
if(overlayWindow && row.enable_info_window == 1){
|
128 |
+
for(var j=0; j < overlayWindows.length; j++){
|
129 |
+
overlayWindows[j].open(null, null);
|
130 |
+
}
|
131 |
overlayWindow.open(map, overlay);
|
132 |
}
|
133 |
}
|
134 |
});
|
135 |
|
136 |
+
}(marker, mapMarker, infoWindow, gmwdmapData["main_map" + _key], gmwdmapData["infoWindowOpenOn" + _key], gmwdmapData["infoWindows" + _key]));
|
137 |
|
138 |
}
|
139 |
}
|
js/init_map_admin.js
CHANGED
@@ -106,6 +106,7 @@ function gmwdInitMainMap(el, excludeOverlays){
|
|
106 |
|
107 |
|
108 |
var allMarkers = [];
|
|
|
109 |
function gmwdSetMapMarkers(){
|
110 |
var mapMarker;
|
111 |
|
@@ -120,17 +121,19 @@ function gmwdSetMapMarkers(){
|
|
120 |
});
|
121 |
|
122 |
allMarkers.push(marker);
|
|
|
123 |
if(mapMarker.enable_info_window == 1){
|
124 |
|
125 |
contentString = (mapMarker.title || mapMarker.address);
|
126 |
|
127 |
-
|
128 |
content: contentString,
|
129 |
disableAutoPan: true
|
130 |
});
|
131 |
if(mapMarker.info_window_open == 1){
|
132 |
infoWindow.open(map, marker);
|
133 |
}
|
|
|
134 |
}
|
135 |
if(mapMarker.title){
|
136 |
marker.setTitle(mapMarker.title);
|
@@ -147,11 +150,14 @@ function gmwdSetMapMarkers(){
|
|
147 |
}
|
148 |
|
149 |
//events
|
150 |
-
(function(overlay, row, overlayWindow, map) {
|
151 |
|
152 |
google.maps.event.addListener(overlay, 'click', function() {
|
153 |
if(jQuery("#info_window_open_on :selected").val() == "click"){
|
154 |
if(overlayWindow && row.enable_info_window == 1){
|
|
|
|
|
|
|
155 |
overlayWindow.open(map, overlay);
|
156 |
}
|
157 |
}
|
@@ -159,12 +165,15 @@ function gmwdSetMapMarkers(){
|
|
159 |
google.maps.event.addListener(overlay, 'mouseover', function() {
|
160 |
if(jQuery("#info_window_open_on :selected").val() == "hover"){
|
161 |
if(overlayWindow && row.enable_info_window == 1){
|
|
|
|
|
|
|
162 |
overlayWindow.open(map, overlay);
|
163 |
}
|
164 |
}
|
165 |
});
|
166 |
|
167 |
-
}(marker, mapMarker, infoWindow, map));
|
168 |
|
169 |
}
|
170 |
|
106 |
|
107 |
|
108 |
var allMarkers = [];
|
109 |
+
var infoWindows = [];
|
110 |
function gmwdSetMapMarkers(){
|
111 |
var mapMarker;
|
112 |
|
121 |
});
|
122 |
|
123 |
allMarkers.push(marker);
|
124 |
+
var infoWindow;
|
125 |
if(mapMarker.enable_info_window == 1){
|
126 |
|
127 |
contentString = (mapMarker.title || mapMarker.address);
|
128 |
|
129 |
+
infoWindow = new google.maps.InfoWindow({
|
130 |
content: contentString,
|
131 |
disableAutoPan: true
|
132 |
});
|
133 |
if(mapMarker.info_window_open == 1){
|
134 |
infoWindow.open(map, marker);
|
135 |
}
|
136 |
+
infoWindows.push(infoWindow)
|
137 |
}
|
138 |
if(mapMarker.title){
|
139 |
marker.setTitle(mapMarker.title);
|
150 |
}
|
151 |
|
152 |
//events
|
153 |
+
(function(overlay, row, overlayWindow, map, overlayWindows) {
|
154 |
|
155 |
google.maps.event.addListener(overlay, 'click', function() {
|
156 |
if(jQuery("#info_window_open_on :selected").val() == "click"){
|
157 |
if(overlayWindow && row.enable_info_window == 1){
|
158 |
+
for(var j=0; j < overlayWindows.length; j++){
|
159 |
+
overlayWindows[j].open(null, null);
|
160 |
+
}
|
161 |
overlayWindow.open(map, overlay);
|
162 |
}
|
163 |
}
|
165 |
google.maps.event.addListener(overlay, 'mouseover', function() {
|
166 |
if(jQuery("#info_window_open_on :selected").val() == "hover"){
|
167 |
if(overlayWindow && row.enable_info_window == 1){
|
168 |
+
for(var j=0; j < overlayWindows.length; j++){
|
169 |
+
overlayWindows[j].open(null, null);
|
170 |
+
}
|
171 |
overlayWindow.open(map, overlay);
|
172 |
}
|
173 |
}
|
174 |
});
|
175 |
|
176 |
+
}(marker, mapMarker, infoWindow, map, infoWindows));
|
177 |
|
178 |
}
|
179 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-google-maps-plugin.html
|
|
4 |
Tags: address, cross-browser, custom google map, custom google maps, easy map, geo, geocoder, gmaps, google, google earth, google map, google map plugin, google map widget, google maps, google maps plugin, googlemaps, gps, gpx, kml, latitude, location, longitude, map, map markers, map plugin, map styles, map widget, maps, marker, openstreetmap, path, pin, place, polygons, polylines, post map, routes, store locator, streetview, widget map, wp google map, wp google maps, wp map, wp maps, directions, widget, layers, circles, responsive
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.5
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -110,6 +110,9 @@ After downloading the ZIP file of the Google Maps WD plugin,
|
|
110 |
|
111 |
== Changelog ==
|
112 |
|
|
|
|
|
|
|
113 |
= 1.0.11 =
|
114 |
* Fixed: Minor bugs
|
115 |
|
4 |
Tags: address, cross-browser, custom google map, custom google maps, easy map, geo, geocoder, gmaps, google, google earth, google map, google map plugin, google map widget, google maps, google maps plugin, googlemaps, gps, gpx, kml, latitude, location, longitude, map, map markers, map plugin, map styles, map widget, maps, marker, openstreetmap, path, pin, place, polygons, polylines, post map, routes, store locator, streetview, widget map, wp google map, wp google maps, wp map, wp maps, directions, widget, layers, circles, responsive
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.5
|
7 |
+
Stable tag: 1.0.12
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
110 |
|
111 |
== Changelog ==
|
112 |
|
113 |
+
= 1.0.12 =
|
114 |
+
* Changed: Show only one info window
|
115 |
+
|
116 |
= 1.0.11 =
|
117 |
* Fixed: Minor bugs
|
118 |
|
wd-google-maps.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Google Maps WD
|
5 |
* Plugin URI: https://web-dorado.com/products/wordpress-google-maps-plugin.html
|
6 |
* Description: Google Maps WD is an intuitive tool for creating Google maps with advanced markers, custom layers and overlays for your website.
|
7 |
-
* Version: 1.0.
|
8 |
* Author: WebDorado
|
9 |
* Author URI: http://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
4 |
* Plugin Name: Google Maps WD
|
5 |
* Plugin URI: https://web-dorado.com/products/wordpress-google-maps-plugin.html
|
6 |
* Description: Google Maps WD is an intuitive tool for creating Google maps with advanced markers, custom layers and overlays for your website.
|
7 |
+
* Version: 1.0.12
|
8 |
* Author: WebDorado
|
9 |
* Author URI: http://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|