Version Description
- 2015/02/02
- auto-adjust map size on smaller screens - thanks bruzm!
- marked each widget with core version for future updates
Download this release
Release Info
Developer | WebFactory |
Plugin | Google Maps Widget – Ultimate Google Maps Plugin |
Version | 2.10 |
Comparing to | |
See all releases |
Code changes from version 2.06 to 2.10
- gmw-widget.php +1 -0
- google-maps-widget.php +2 -2
- js/gmw.js +12 -0
- readme.txt +8 -4
gmw-widget.php
CHANGED
@@ -280,6 +280,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
280 |
$instance['lightbox_header'] = trim($new_instance['lightbox_header']);
|
281 |
$instance['lightbox_footer'] = trim($new_instance['lightbox_footer']);
|
282 |
$instance['lightbox_skin'] = $new_instance['lightbox_skin'];
|
|
|
283 |
|
284 |
return $instance;
|
285 |
} // update
|
280 |
$instance['lightbox_header'] = trim($new_instance['lightbox_header']);
|
281 |
$instance['lightbox_footer'] = trim($new_instance['lightbox_footer']);
|
282 |
$instance['lightbox_skin'] = $new_instance['lightbox_skin'];
|
283 |
+
$instance['core_ver'] = GMW_VER;
|
284 |
|
285 |
return $instance;
|
286 |
} // update
|
google-maps-widget.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google Maps Widget
|
|
4 |
Plugin URI: http://www.googlemapswidget.com/
|
5 |
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
Author: Web factory Ltd
|
7 |
-
Version: 2.
|
8 |
Author URI: http://www.webfactoryltd.com/
|
9 |
Text Domain: google-maps-widget
|
10 |
Domain Path: lang
|
@@ -31,7 +31,7 @@ if (!defined('ABSPATH')) {
|
|
31 |
}
|
32 |
|
33 |
|
34 |
-
define('GMW_VER', '2.
|
35 |
define('GMW_OPTIONS', 'gmw_options');
|
36 |
define('GMW_CRON', 'gmw_cron');
|
37 |
|
4 |
Plugin URI: http://www.googlemapswidget.com/
|
5 |
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
Author: Web factory Ltd
|
7 |
+
Version: 2.10
|
8 |
Author URI: http://www.webfactoryltd.com/
|
9 |
Text Domain: google-maps-widget
|
10 |
Domain Path: lang
|
31 |
}
|
32 |
|
33 |
|
34 |
+
define('GMW_VER', '2.10');
|
35 |
define('GMW_OPTIONS', 'gmw_options');
|
36 |
define('GMW_CRON', 'gmw_cron');
|
37 |
|
js/gmw.js
CHANGED
@@ -14,6 +14,18 @@ jQuery(function($) {
|
|
14 |
map_title = dialog.attr('title');
|
15 |
map_skin = dialog.attr('data-map-skin');
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
content = $(dialog.html());
|
18 |
content.filter('.gmw-map').html('<iframe width="' + map_width + 'px" height="' + map_height + 'px" src="' + map_url + '"></iframe>');
|
19 |
|
14 |
map_title = dialog.attr('title');
|
15 |
map_skin = dialog.attr('data-map-skin');
|
16 |
|
17 |
+
// adjust map size if screen is too small
|
18 |
+
screen_width = $(window).width() - 50;
|
19 |
+
if (screen_width < map_width) {
|
20 |
+
map_width = screen_width;
|
21 |
+
map_height *= screen_width / map_width;
|
22 |
+
}
|
23 |
+
screen_height = $(window).height() - 50;
|
24 |
+
if (screen_height < map_height) {
|
25 |
+
map_height = screen_height;
|
26 |
+
map_width *= screen_height / map_height;
|
27 |
+
}
|
28 |
+
|
29 |
content = $(dialog.html());
|
30 |
content.filter('.gmw-map').html('<iframe width="' + map_width + 'px" height="' + map_height + 'px" src="' + map_url + '"></iframe>');
|
31 |
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ License: GPLv2 or later
|
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
Requires at least: 3.3
|
8 |
Tested up to: 4.1
|
9 |
-
Stable tag: 2.
|
10 |
|
11 |
Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
12 |
|
@@ -36,7 +36,7 @@ http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
|
36 |
|
37 |
**Lightbox map options**
|
38 |
|
39 |
-
* map size - width & height
|
40 |
* map type - road, satellite, map or hybrid
|
41 |
* zoom level
|
42 |
* skin - light, dark, blue, rounded
|
@@ -113,11 +113,15 @@ If you can figure it out open a thread in the support forums.
|
|
113 |
4. Widget options - lightbox map
|
114 |
|
115 |
== Changelog ==
|
116 |
-
|
|
|
|
|
|
|
|
|
117 |
= 2.06 =
|
118 |
* 2015/01/26
|
119 |
* language file updated
|
120 |
-
*
|
121 |
|
122 |
= 2.05 =
|
123 |
* 2015/01/19
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
Requires at least: 3.3
|
8 |
Tested up to: 4.1
|
9 |
+
Stable tag: 2.10
|
10 |
|
11 |
Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
12 |
|
36 |
|
37 |
**Lightbox map options**
|
38 |
|
39 |
+
* map size - width & height (auto-adjusted on smaller screens)
|
40 |
* map type - road, satellite, map or hybrid
|
41 |
* zoom level
|
42 |
* skin - light, dark, blue, rounded
|
113 |
4. Widget options - lightbox map
|
114 |
|
115 |
== Changelog ==
|
116 |
+
= 2.10 =
|
117 |
+
* 2015/02/02
|
118 |
+
* auto-adjust map size on smaller screens - thanks bruzm!
|
119 |
+
* marked each widget with core version for future updates
|
120 |
+
|
121 |
= 2.06 =
|
122 |
* 2015/01/26
|
123 |
* language file updated
|
124 |
+
* preparing for JS rewrite
|
125 |
|
126 |
= 2.05 =
|
127 |
* 2015/01/19
|