Version Description
- Changed: API key notification
- Fixed: Minor bugs
Download this release
Release Info
Developer | webdorado |
Plugin | WD Google Maps – Google Maps builder Plugin |
Version | 1.0.10 |
Comparing to | |
See all releases |
Code changes from version 1.0.9 to 1.0.10
- admin/controllers/GMWDController.php +10 -1
- admin/views/GMWDView.php +2 -2
- admin/views/GMWDViewOptions_gmwd.php +2 -2
- framework/functions.php +21 -0
- gmwd_admin_class.php +2 -2
- gmwd_class.php +1 -1
- google-maps-setup.php +40 -7
- js/init_map.js +13 -2
- js/init_map_admin.js +13 -2
- preview.php +1 -1
- readme.txt +5 -1
- wd-google-maps.php +1 -1
admin/controllers/GMWDController.php
CHANGED
@@ -54,7 +54,16 @@ class GMWDController {
|
|
54 |
_e("Not found","bwg_back");
|
55 |
}
|
56 |
}
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
////////////////////////////////////////////////////////////////////////////////////////
|
59 |
// Getters & Setters //
|
60 |
////////////////////////////////////////////////////////////////////////////////////////
|
54 |
_e("Not found","bwg_back");
|
55 |
}
|
56 |
}
|
57 |
+
public function save_api_key(){
|
58 |
+
global $wpdb;
|
59 |
+
$data = array();
|
60 |
+
$data["value"] = esc_html(GMWDHelper::get("gmwd_api_key_general"));
|
61 |
+
$where = array("name"=>"map_api_key");
|
62 |
+
$where_format = $format = array('%s');
|
63 |
+
$wpdb->update( $wpdb->prefix . "gmwd_options", $data, $where, $format, $where_format );
|
64 |
+
GMWDHelper::gmwd_redirect("admin.php?page=".GMWDHelper::get("page"));
|
65 |
+
|
66 |
+
}
|
67 |
////////////////////////////////////////////////////////////////////////////////////////
|
68 |
// Getters & Setters //
|
69 |
////////////////////////////////////////////////////////////////////////////////////////
|
admin/views/GMWDView.php
CHANGED
@@ -31,8 +31,8 @@ class GMWDView {
|
|
31 |
GMWDHelper::print_message();
|
32 |
|
33 |
if(!gmwd_get_option("map_api_key")){
|
34 |
-
if(GMWDHelper::get('page') == "maps_gmwd" || GMWDHelper::get('page') == "options_gmwd"
|
35 |
-
|
36 |
}
|
37 |
}
|
38 |
}
|
31 |
GMWDHelper::print_message();
|
32 |
|
33 |
if(!gmwd_get_option("map_api_key")){
|
34 |
+
if(GMWDHelper::get('page') == "maps_gmwd" || GMWDHelper::get('page') == "options_gmwd"){
|
35 |
+
api_key_notice();
|
36 |
}
|
37 |
}
|
38 |
}
|
admin/views/GMWDViewOptions_gmwd.php
CHANGED
@@ -59,11 +59,11 @@ class GMWDViewOptions_gmwd extends GMWDView{
|
|
59 |
</tr>
|
60 |
<tr>
|
61 |
<td colspan="2">
|
62 |
-
<a href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend,static_maps_backend,geocoding_backend,roads,street_view_image_backend,geolocation&keyType=CLIENT_SIDE&reusekey=true" target="_blank" style="color: #00A0D2;"><?php _e("Get Key","gmwd");?></a>.
|
63 |
<?php _e("For Getting API Key Read More in","gmwd");?>
|
64 |
<a href="https://web-dorado.com/wordpress-google-maps/installation-wizard-options-menu/configuring-api-key.html" target="_blank" style="color: #00A0D2;"><?php _e("User Manual","gmwd");?></a>.
|
65 |
</td>
|
66 |
-
</tr>
|
67 |
<tr>
|
68 |
<td width="30%"><label for="map_language" title="<?php _e("Choose Your Map Language","gmwd");?>"><?php _e("Map Language","gmwd"); ?>:</label></td>
|
69 |
<td>
|
59 |
</tr>
|
60 |
<tr>
|
61 |
<td colspan="2">
|
62 |
+
<a href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend,static_maps_backend,geocoding_backend,roads,street_view_image_backend,geolocation,places_backend&keyType=CLIENT_SIDE&reusekey=true" target="_blank" style="color: #00A0D2;"><?php _e("Get Key","gmwd");?></a>.
|
63 |
<?php _e("For Getting API Key Read More in","gmwd");?>
|
64 |
<a href="https://web-dorado.com/wordpress-google-maps/installation-wizard-options-menu/configuring-api-key.html" target="_blank" style="color: #00A0D2;"><?php _e("User Manual","gmwd");?></a>.
|
65 |
</td>
|
66 |
+
</tr>
|
67 |
<tr>
|
68 |
<td width="30%"><label for="map_language" title="<?php _e("Choose Your Map Language","gmwd");?>"><?php _e("Map Language","gmwd"); ?>:</label></td>
|
69 |
<td>
|
framework/functions.php
CHANGED
@@ -43,5 +43,26 @@ function upgrade_pro($text = false){
|
|
43 |
|
44 |
}
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
?>
|
43 |
|
44 |
}
|
45 |
|
46 |
+
function api_key_notice(){
|
47 |
+
echo '<div style="width:99%">
|
48 |
+
<div class="error">
|
49 |
+
<p style="font-size:18px;"><strong>'.__("Important. API key is required for Google Maps to work.","gmwd").'</strong></p>
|
50 |
+
<p><a href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend,static_maps_backend,geocoding_backend,roads,street_view_image_backend,geolocation,places_backend&keyType=CLIENT_SIDE&reusekey=true" target="_blank" class="wd-btn wd-btn-primary" style="text-decoration:none;">'.__("GET API KEY FOR FREE","gmwd").'</a></p>
|
51 |
+
<p>'.__("For getting API key read more in","gmwd").'
|
52 |
+
<a href="https://web-dorado.com/wordpress-google-maps/installation-wizard-options-menu/configuring-api-key.html" target="_blank" style="color: #00A0D2;">'. __("User Manual","gmwd").'</a>.
|
53 |
+
</p>
|
54 |
+
<p>After creating the API key, please paste it here.</p>
|
55 |
+
<form method="post">
|
56 |
+
'.wp_nonce_field('nonce_gmwd', 'nonce_gmwd').'
|
57 |
+
<p>'.__("API Key","gmwd").' <input type="text" name="gmwd_api_key_general"> <button class="wd-btn wd-btn-primary">'.__("Save","gmwd").'</button></p>
|
58 |
+
<input type="hidden" name="task" value="save_api_key">
|
59 |
+
<input type="hidden" name="page" value="'.GMWDHelper::get("page").'">
|
60 |
+
<input type="hidden" name="step" value="'.GMWDHelper::get("step").'">
|
61 |
+
</form>
|
62 |
+
<p>'.__("It may take up to 5 minutes for API key change to take effect.","gmwd").'</p>
|
63 |
+
</div>
|
64 |
+
</div>';
|
65 |
+
}
|
66 |
+
|
67 |
|
68 |
?>
|
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 |
////////////////////////////////////////////////////////////////////////////////////////
|
@@ -188,7 +188,7 @@ class GMWDAdmin{
|
|
188 |
wp_enqueue_script( 'gmwd_admin_main-js', GMWD_URL . '/js/admin_main.js');
|
189 |
global $wpdb, $wp_scripts;
|
190 |
|
191 |
-
$map_api_url = "https://maps.googleapis.com/maps/api/js?libraries=places&sensor=false&v=3.exp";
|
192 |
|
193 |
if(gmwd_get_option("map_language")){
|
194 |
$map_api_url .= "&language=" . gmwd_get_option("map_language");
|
11 |
// Variables //
|
12 |
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
protected static $instance = null;
|
14 |
+
private static $version = '1.0.10';
|
15 |
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
// Constructor & Destructor //
|
17 |
////////////////////////////////////////////////////////////////////////////////////////
|
188 |
wp_enqueue_script( 'gmwd_admin_main-js', GMWD_URL . '/js/admin_main.js');
|
189 |
global $wpdb, $wp_scripts;
|
190 |
|
191 |
+
$map_api_url = "https://maps.googleapis.com/maps/api/js?libraries=places,geometry&sensor=false&v=3.exp";
|
192 |
|
193 |
if(gmwd_get_option("map_language")){
|
194 |
$map_api_url .= "&language=" . gmwd_get_option("map_language");
|
gmwd_class.php
CHANGED
@@ -86,7 +86,7 @@ class GMWD{
|
|
86 |
$version = get_option("gmwd_version");
|
87 |
global $wp_scripts;
|
88 |
|
89 |
-
$map_api_url = "https://maps.googleapis.com/maps/api/js?libraries=places&v=3.exp";
|
90 |
|
91 |
if(gmwd_get_option("map_language")){
|
92 |
$map_api_url .= "&language=" . gmwd_get_option("map_language");
|
86 |
$version = get_option("gmwd_version");
|
87 |
global $wp_scripts;
|
88 |
|
89 |
+
$map_api_url = "https://maps.googleapis.com/maps/api/js?libraries=places,geometry&v=3.exp";
|
90 |
|
91 |
if(gmwd_get_option("map_language")){
|
92 |
$map_api_url .= "&language=" . gmwd_get_option("map_language");
|
google-maps-setup.php
CHANGED
@@ -22,6 +22,10 @@ class GMWDSetupWizard {
|
|
22 |
$this,
|
23 |
'gmwd_setup_wizard'
|
24 |
) );
|
|
|
|
|
|
|
|
|
25 |
}
|
26 |
// //////////////////////////////////////////////////////////////////////////////////////
|
27 |
// Public Methods //
|
@@ -84,6 +88,7 @@ class GMWDSetupWizard {
|
|
84 |
$this->gmwd_setup_wizard_footer ();
|
85 |
exit ();
|
86 |
}
|
|
|
87 |
// //////////////////////////////////////////////////////////////////////////////////////
|
88 |
// Getters & Setters //
|
89 |
// //////////////////////////////////////////////////////////////////////////////////////
|
@@ -269,13 +274,22 @@ class GMWDSetupWizard {
|
|
269 |
<div class="gmwd_wizard_container gmwd_wizard_general_container">
|
270 |
<h2><?php _e("General Options","gmwd");?></h2>
|
271 |
<table class="gmwd_edit_table" style="width: 100%;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
<tr>
|
273 |
<td width="30%"><label for="map_api_key" title="<?php _e("Set your map API key","gmwd");?>"><?php _e("Map API Key","gmwd"); ?>:</label></td>
|
274 |
<td>
|
275 |
-
<input type="text" name="map_api_key" id="map_api_key" value="" >
|
276 |
-
<
|
277 |
</td>
|
278 |
-
</tr>
|
|
|
279 |
<tr>
|
280 |
<td><label for="map_language" title="<?php _e("Choose Your Map Language","gmwd");?>"><?php _e("Map Language","gmwd"); ?>:</label></td>
|
281 |
<td>
|
@@ -312,13 +326,17 @@ class GMWDSetupWizard {
|
|
312 |
<?php
|
313 |
}
|
314 |
private function gmwd_setup_default() {
|
315 |
-
$this->gmwd_setup_apply
|
316 |
?>
|
317 |
<div class="gmwd_edit gmwd_wizard">
|
|
|
|
|
|
|
|
|
318 |
<form method="post" action="" id="setupForm">
|
319 |
<div class="gmwd_wizard_containers">
|
320 |
<?php $this->gmwd_steps();?>
|
321 |
-
<div class="gmwd_wizard_container gmwd_wizard_default_container">
|
322 |
<h2><?php _e("Default Options","gmwd");?></h2>
|
323 |
<div class="wd-clear">
|
324 |
<div class="wd-left" style="width:412px;">
|
@@ -380,6 +398,8 @@ class GMWDSetupWizard {
|
|
380 |
</div>
|
381 |
</div>
|
382 |
<div class="gmwd_wizard_btns">
|
|
|
|
|
383 |
<button class="wd-btn wd-btn-primary"
|
384 |
id="gmwd_wizard_countinue_default"><?php _e("Continue","gmwd");?></button>
|
385 |
<a class="wd-btn wd-btn-secondary" id="gmwd_wizard_skip_default"
|
@@ -414,10 +434,14 @@ class GMWDSetupWizard {
|
|
414 |
$this->gmwd_setup_apply ();
|
415 |
?>
|
416 |
<div class="gmwd_edit gmwd_wizard">
|
|
|
|
|
|
|
|
|
417 |
<form method="post">
|
418 |
<div class="gmwd_wizard_containers">
|
419 |
<?php $this->gmwd_steps();?>
|
420 |
-
<div class="gmwd_wizard_container gmwd_wizard_ready_container">
|
421 |
<h2><?php _e("All Set!","gmwd");?></h2>
|
422 |
<div class="gmwd_wizard_ready_text">
|
423 |
<p>
|
@@ -463,7 +487,16 @@ class GMWDSetupWizard {
|
|
463 |
}
|
464 |
}
|
465 |
}
|
466 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
private function gmwd_steps(){
|
468 |
?>
|
469 |
<ul class="gmwd_wizard_tabs wd-clear">
|
22 |
$this,
|
23 |
'gmwd_setup_wizard'
|
24 |
) );
|
25 |
+
|
26 |
+
if(isset($_POST["task"]) && $_POST["task"] == "save_api_key"){
|
27 |
+
$this->save_api_key();
|
28 |
+
}
|
29 |
}
|
30 |
// //////////////////////////////////////////////////////////////////////////////////////
|
31 |
// Public Methods //
|
88 |
$this->gmwd_setup_wizard_footer ();
|
89 |
exit ();
|
90 |
}
|
91 |
+
|
92 |
// //////////////////////////////////////////////////////////////////////////////////////
|
93 |
// Getters & Setters //
|
94 |
// //////////////////////////////////////////////////////////////////////////////////////
|
274 |
<div class="gmwd_wizard_container gmwd_wizard_general_container">
|
275 |
<h2><?php _e("General Options","gmwd");?></h2>
|
276 |
<table class="gmwd_edit_table" style="width: 100%;">
|
277 |
+
<tr>
|
278 |
+
<td colspan="2">
|
279 |
+
<p style="font-size:17px;"><strong><?php _e("Important. API key is required for Google Maps to work.","gmwd"); ?></strong></p>
|
280 |
+
<a href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend,static_maps_backend,geocoding_backend,roads,street_view_image_backend,geolocation,places_backend&keyType=CLIENT_SIDE&reusekey=true" target="_blank" style="color: #00A0D2;"><?php _e("Get Key","gmwd");?></a>.
|
281 |
+
<?php _e("For Getting API Key Read More in","gmwd");?>
|
282 |
+
<a href="https://web-dorado.com/wordpress-google-maps/installation-wizard-options-menu/configuring-api-key.html" target="_blank" style="color: #00A0D2;"><?php _e("User Manual","gmwd");?></a>.
|
283 |
+
</td>
|
284 |
+
</tr>
|
285 |
<tr>
|
286 |
<td width="30%"><label for="map_api_key" title="<?php _e("Set your map API key","gmwd");?>"><?php _e("Map API Key","gmwd"); ?>:</label></td>
|
287 |
<td>
|
288 |
+
<input type="text" name="map_api_key" id="map_api_key" value="" ><br>
|
289 |
+
<small><?php _e("Once saved, it may take up to 5 minutes for your map to display.","gmwd"); ?></small>
|
290 |
</td>
|
291 |
+
</tr>
|
292 |
+
|
293 |
<tr>
|
294 |
<td><label for="map_language" title="<?php _e("Choose Your Map Language","gmwd");?>"><?php _e("Map Language","gmwd"); ?>:</label></td>
|
295 |
<td>
|
326 |
<?php
|
327 |
}
|
328 |
private function gmwd_setup_default() {
|
329 |
+
$this->gmwd_setup_apply();
|
330 |
?>
|
331 |
<div class="gmwd_edit gmwd_wizard">
|
332 |
+
<?php if(!gmwd_get_option("map_api_key")){
|
333 |
+
api_key_notice();
|
334 |
+
}
|
335 |
+
?>
|
336 |
<form method="post" action="" id="setupForm">
|
337 |
<div class="gmwd_wizard_containers">
|
338 |
<?php $this->gmwd_steps();?>
|
339 |
+
<div class="gmwd_wizard_container gmwd_wizard_default_container">
|
340 |
<h2><?php _e("Default Options","gmwd");?></h2>
|
341 |
<div class="wd-clear">
|
342 |
<div class="wd-left" style="width:412px;">
|
398 |
</div>
|
399 |
</div>
|
400 |
<div class="gmwd_wizard_btns">
|
401 |
+
<a class="wd-btn wd-btn-secondary" id="gmwd_wizard_skip_general"
|
402 |
+
href="index.php?page=gmwd_setup&step=setup_general"><?php _e("Back","gmwd");?></a>
|
403 |
<button class="wd-btn wd-btn-primary"
|
404 |
id="gmwd_wizard_countinue_default"><?php _e("Continue","gmwd");?></button>
|
405 |
<a class="wd-btn wd-btn-secondary" id="gmwd_wizard_skip_default"
|
434 |
$this->gmwd_setup_apply ();
|
435 |
?>
|
436 |
<div class="gmwd_edit gmwd_wizard">
|
437 |
+
<?php if(!gmwd_get_option("map_api_key")){
|
438 |
+
api_key_notice();
|
439 |
+
}
|
440 |
+
?>
|
441 |
<form method="post">
|
442 |
<div class="gmwd_wizard_containers">
|
443 |
<?php $this->gmwd_steps();?>
|
444 |
+
<div class="gmwd_wizard_container gmwd_wizard_ready_container">
|
445 |
<h2><?php _e("All Set!","gmwd");?></h2>
|
446 |
<div class="gmwd_wizard_ready_text">
|
447 |
<p>
|
487 |
}
|
488 |
}
|
489 |
}
|
490 |
+
private function save_api_key(){
|
491 |
+
global $wpdb;
|
492 |
+
$data = array();
|
493 |
+
$data["value"] = esc_html(GMWDHelper::get("gmwd_api_key_general"));
|
494 |
+
$where = array("name"=>"map_api_key");
|
495 |
+
$where_format = $format = array('%s');
|
496 |
+
$wpdb->update( $wpdb->prefix . "gmwd_options", $data, $where, $format, $where_format );
|
497 |
+
GMWDHelper::gmwd_redirect("admin.php?page=".GMWDHelper::get("page").'&step='.GMWDHelper::get("step"));
|
498 |
+
|
499 |
+
}
|
500 |
private function gmwd_steps(){
|
501 |
?>
|
502 |
<ul class="gmwd_wizard_tabs wd-clear">
|
js/init_map.js
CHANGED
@@ -135,6 +135,8 @@ function gmwdSetMapMarkers(_key){
|
|
135 |
|
136 |
function gmwdSetMapPolygons(_key){
|
137 |
var mapPolygon, polygon;
|
|
|
|
|
138 |
if(Object.keys(gmwdmapData["mapPolygons" + _key]).length > 0){
|
139 |
for(var key in gmwdmapData["mapPolygons" + _key]){
|
140 |
var polygonCoord = [];
|
@@ -163,8 +165,10 @@ function gmwdSetMapPolygons(_key){
|
|
163 |
});
|
164 |
|
165 |
gmwdmapData["allPolygons" + _key].push(polygon);
|
166 |
-
polygon.setMap(gmwdmapData["main_map" + _key]);
|
167 |
-
|
|
|
|
|
168 |
(function(overlay, row, map) {
|
169 |
|
170 |
google.maps.event.addListener(overlay,"mouseover",function(){
|
@@ -180,6 +184,13 @@ function gmwdSetMapPolygons(_key){
|
|
180 |
|
181 |
}
|
182 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
|
184 |
}
|
185 |
|
135 |
|
136 |
function gmwdSetMapPolygons(_key){
|
137 |
var mapPolygon, polygon;
|
138 |
+
var polygonsByAreas = {};
|
139 |
+
var polygonsAreas = [];
|
140 |
if(Object.keys(gmwdmapData["mapPolygons" + _key]).length > 0){
|
141 |
for(var key in gmwdmapData["mapPolygons" + _key]){
|
142 |
var polygonCoord = [];
|
165 |
});
|
166 |
|
167 |
gmwdmapData["allPolygons" + _key].push(polygon);
|
168 |
+
//polygon.setMap(gmwdmapData["main_map" + _key]);
|
169 |
+
var polygonArea = google.maps.geometry.spherical.computeArea(polygon.getPath());
|
170 |
+
polygonsByAreas[polygonArea] = [polygon];
|
171 |
+
polygonsAreas.push(polygonArea);
|
172 |
(function(overlay, row, map) {
|
173 |
|
174 |
google.maps.event.addListener(overlay,"mouseover",function(){
|
184 |
|
185 |
}
|
186 |
}
|
187 |
+
polygonsAreas.sort(function(a,b){return b - a});
|
188 |
+
|
189 |
+
for(var i=0; i< polygonsAreas.length ; i++){
|
190 |
+
polygonsByAreas[polygonsAreas[i]][0].setMap(gmwdmapData["main_map" + _key]);
|
191 |
+
polygonsByAreas[polygonsAreas[i]][0].setOptions({zIndex: i+1});
|
192 |
+
|
193 |
+
}
|
194 |
|
195 |
}
|
196 |
|
js/init_map_admin.js
CHANGED
@@ -175,7 +175,8 @@ var allPolygons = [];
|
|
175 |
var allPolygonMarkers = [];
|
176 |
function gmwdSetMapPolygons(){
|
177 |
var mapPolygon, polygon;
|
178 |
-
|
|
|
179 |
for(var key in mapPolygons){
|
180 |
var polygonCoord = [];
|
181 |
mapPolygon = mapPolygons[key];
|
@@ -207,7 +208,10 @@ function gmwdSetMapPolygons(){
|
|
207 |
});
|
208 |
|
209 |
allPolygons.push(polygon);
|
210 |
-
|
|
|
|
|
|
|
211 |
|
212 |
(function(overlay, row, map) {
|
213 |
|
@@ -223,6 +227,13 @@ function gmwdSetMapPolygons(){
|
|
223 |
}(polygon, mapPolygon, map));
|
224 |
|
225 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
}
|
227 |
|
228 |
|
175 |
var allPolygonMarkers = [];
|
176 |
function gmwdSetMapPolygons(){
|
177 |
var mapPolygon, polygon;
|
178 |
+
var polygonsByAreas = {};
|
179 |
+
var polygonsAreas = [];
|
180 |
for(var key in mapPolygons){
|
181 |
var polygonCoord = [];
|
182 |
mapPolygon = mapPolygons[key];
|
208 |
});
|
209 |
|
210 |
allPolygons.push(polygon);
|
211 |
+
var polygonArea = google.maps.geometry.spherical.computeArea(polygon.getPath());
|
212 |
+
polygonsByAreas[polygonArea] = [polygon];
|
213 |
+
polygonsAreas.push(polygonArea);
|
214 |
+
//polygon.setMap(map);
|
215 |
|
216 |
(function(overlay, row, map) {
|
217 |
|
227 |
}(polygon, mapPolygon, map));
|
228 |
|
229 |
}
|
230 |
+
polygonsAreas.sort(function(a,b){return b - a});
|
231 |
+
|
232 |
+
for(var i=0; i< polygonsAreas.length ; i++){
|
233 |
+
polygonsByAreas[polygonsAreas[i]][0].setMap(map);
|
234 |
+
polygonsByAreas[polygonsAreas[i]][0].setOptions({zIndex: i+1});
|
235 |
+
}
|
236 |
+
|
237 |
}
|
238 |
|
239 |
|
preview.php
CHANGED
@@ -38,7 +38,7 @@ class GMWDPreview {
|
|
38 |
wp_register_script ( 'jquery', FALSE, array ('jquery-core','jquery-migrate'), '1.10.2' );
|
39 |
wp_enqueue_script ( 'jquery' );
|
40 |
|
41 |
-
$map_api_url = "https://maps.googleapis.com/maps/api/js?libraries=places&sensor=false&v=3.exp";
|
42 |
if(gmwd_get_option("map_language")){
|
43 |
$map_api_url .= "&language=" . gmwd_get_option("map_language");
|
44 |
}
|
38 |
wp_register_script ( 'jquery', FALSE, array ('jquery-core','jquery-migrate'), '1.10.2' );
|
39 |
wp_enqueue_script ( 'jquery' );
|
40 |
|
41 |
+
$map_api_url = "https://maps.googleapis.com/maps/api/js?libraries=places,geometry&sensor=false&v=3.exp";
|
42 |
if(gmwd_get_option("map_language")){
|
43 |
$map_api_url .= "&language=" . gmwd_get_option("map_language");
|
44 |
}
|
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,10 @@ After downloading the ZIP file of the Google Maps WD plugin,
|
|
110 |
|
111 |
== Changelog ==
|
112 |
|
|
|
|
|
|
|
|
|
113 |
= 1.0.9 =
|
114 |
* Added: Geolocation notifications and api key user manual link
|
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.10
|
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.10 =
|
114 |
+
* Changed: API key notification
|
115 |
+
* Fixed: Minor bugs
|
116 |
+
|
117 |
= 1.0.9 =
|
118 |
* Added: Geolocation notifications and api key user manual link
|
119 |
|
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.10
|
8 |
* Author: WebDorado
|
9 |
* Author URI: http://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|