Version Description
- 2012/08/07
- Added pin color for thumbnail map
- Fixed a few minor bugs
Download this release
Release Info
Developer | WebFactory |
Plugin | Google Maps Widget – Ultimate Google Maps Plugin |
Version | 0.12 |
Comparing to | |
See all releases |
Code changes from version 0.11 to 0.12
- gmw-widget.php +21 -2
- google-maps-widget.php +1 -1
- readme.txt +14 -6
gmw-widget.php
CHANGED
@@ -17,6 +17,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
17 |
$instance = wp_parse_args((array) $instance,
|
18 |
array('title' => 'Map',
|
19 |
'address' => 'New York, USA',
|
|
|
20 |
'thumb_width' => 250,
|
21 |
'thumb_height' => 250,
|
22 |
'thumb_type' => 'roadmap',
|
@@ -29,6 +30,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
29 |
$title = $instance['title'];
|
30 |
$footer = $instance['footer'];
|
31 |
$address = $instance['address'];
|
|
|
32 |
$thumb_width = $instance['thumb_width'];
|
33 |
$thumb_height = $instance['thumb_height'];
|
34 |
$thumb_type = $instance['thumb_type'];
|
@@ -48,6 +50,17 @@ class GoogleMapsWidget extends WP_Widget {
|
|
48 |
array('val' => 'p', 'label' => 'Terrain'),
|
49 |
array('val' => 'h', 'label' => 'Hybrid'));
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
52 |
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
53 |
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
@@ -57,7 +70,12 @@ class GoogleMapsWidget extends WP_Widget {
|
|
57 |
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
58 |
|
59 |
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
60 |
-
|
|
|
|
|
|
|
|
|
|
|
61 |
echo '<p><label for="' . $this->get_field_id('thumb_width') . '">Thumbnail Map Size: </label>';
|
62 |
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
63 |
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
@@ -97,6 +115,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
97 |
|
98 |
$instance['title'] = $new_instance['title'];
|
99 |
$instance['address'] = $new_instance['address'];
|
|
|
100 |
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
101 |
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
102 |
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
@@ -131,7 +150,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
131 |
$tmp .= '<p><a class="widget-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
132 |
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
133 |
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
134 |
-
'&size=' .$instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] . '&sensor=false&scale=2&markers=color:
|
135 |
urlencode($instance['address']) . '"></a>';
|
136 |
$tmp .= '</p>';
|
137 |
$out .= apply_filters('google_maps_widget_content', $tmp);
|
17 |
$instance = wp_parse_args((array) $instance,
|
18 |
array('title' => 'Map',
|
19 |
'address' => 'New York, USA',
|
20 |
+
'thumb_pin_color' => 'red',
|
21 |
'thumb_width' => 250,
|
22 |
'thumb_height' => 250,
|
23 |
'thumb_type' => 'roadmap',
|
30 |
$title = $instance['title'];
|
31 |
$footer = $instance['footer'];
|
32 |
$address = $instance['address'];
|
33 |
+
$thumb_pin_color = $instance['thumb_pin_color'];
|
34 |
$thumb_width = $instance['thumb_width'];
|
35 |
$thumb_height = $instance['thumb_height'];
|
36 |
$thumb_type = $instance['thumb_type'];
|
50 |
array('val' => 'p', 'label' => 'Terrain'),
|
51 |
array('val' => 'h', 'label' => 'Hybrid'));
|
52 |
|
53 |
+
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
54 |
+
array('val' => 'brown', 'label' => 'Brown'),
|
55 |
+
array('val' => 'green', 'label' => 'Green'),
|
56 |
+
array('val' => 'purple', 'label' => 'Purple'),
|
57 |
+
array('val' => 'yellow', 'label' => 'Yellow'),
|
58 |
+
array('val' => 'blue', 'label' => 'Blue'),
|
59 |
+
array('val' => 'gray', 'label' => 'Gray'),
|
60 |
+
array('val' => 'orange', 'label' => 'Orange'),
|
61 |
+
array('val' => 'red', 'label' => 'Red'),
|
62 |
+
array('val' => 'white', 'label' => 'White'));
|
63 |
+
|
64 |
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
65 |
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
66 |
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
70 |
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
71 |
|
72 |
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
73 |
+
|
74 |
+
echo '<p><label for="' . $this->get_field_id('thumb_pin_color') . '">Thumbnail Map Pin Color: </label>';
|
75 |
+
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
76 |
+
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
77 |
+
echo '</select></p>';
|
78 |
+
|
79 |
echo '<p><label for="' . $this->get_field_id('thumb_width') . '">Thumbnail Map Size: </label>';
|
80 |
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
81 |
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
115 |
|
116 |
$instance['title'] = $new_instance['title'];
|
117 |
$instance['address'] = $new_instance['address'];
|
118 |
+
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
119 |
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
120 |
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
121 |
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
150 |
$tmp .= '<p><a class="widget-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
151 |
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
152 |
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
153 |
+
'&size=' .$instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] . '&sensor=false&scale=2&markers=color:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
154 |
urlencode($instance['address']) . '"></a>';
|
155 |
$tmp .= '</p>';
|
156 |
$out .= apply_filters('google_maps_widget_content', $tmp);
|
google-maps-widget.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google Maps Widget
|
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
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: 0.
|
8 |
Author URI: http://www.webfactoryltd.com/
|
9 |
*/
|
10 |
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
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: 0.12
|
8 |
Author URI: http://www.webfactoryltd.com/
|
9 |
*/
|
10 |
|
readme.txt
CHANGED
@@ -5,16 +5,17 @@ Tags: google maps, maps, gmaps, widget, lightbox, map
|
|
5 |
License: GPLv2 or later
|
6 |
Requires at least: 3.2
|
7 |
Tested up to: 3.4.1
|
8 |
-
Stable tag: 0.
|
9 |
|
10 |
Display 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.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
More features and
|
15 |
|
16 |
* title
|
17 |
* address
|
|
|
18 |
* thumbnail map width/height
|
19 |
* thumbnail map zoom level
|
20 |
* thumbnail map type
|
@@ -24,6 +25,8 @@ More features and demo coming in a few days! Till then the widget has these opti
|
|
24 |
* lightbox footer text
|
25 |
|
26 |
|
|
|
|
|
27 |
== Installation ==
|
28 |
|
29 |
Follow the usual routine;
|
@@ -52,16 +55,21 @@ If you can figure it out open a thread in the support forums.
|
|
52 |
|
53 |
== Changelog ==
|
54 |
|
|
|
|
|
|
|
|
|
|
|
55 |
= 0.11 =
|
56 |
-
* 2012/08/
|
57 |
-
* Fixed a few minor bugs
|
58 |
|
59 |
= 0.1 =
|
60 |
* 2012/08/03
|
61 |
-
* Initial release
|
62 |
|
63 |
|
64 |
== Upgrade Notice ==
|
65 |
|
66 |
= 0.1 =
|
67 |
-
Initial release
|
5 |
License: GPLv2 or later
|
6 |
Requires at least: 3.2
|
7 |
Tested up to: 3.4.1
|
8 |
+
Stable tag: 0.12
|
9 |
|
10 |
Display 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.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
More features, videos and demos are coming in a few days! Till then here's the widget's features list:
|
15 |
|
16 |
* title
|
17 |
* address
|
18 |
+
* thumbnail map pin color
|
19 |
* thumbnail map width/height
|
20 |
* thumbnail map zoom level
|
21 |
* thumbnail map type
|
25 |
* lightbox footer text
|
26 |
|
27 |
|
28 |
+
There are no additional JS libraries included; GMW uses jQuery and jQuery UI Dialog bundled with WP. There are also no CSS files, but will be in the future 'cause we want to make the dialog look nicer :)
|
29 |
+
|
30 |
== Installation ==
|
31 |
|
32 |
Follow the usual routine;
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
+
= 0.12 =
|
59 |
+
* 2012/08/07
|
60 |
+
* Added pin color for thumbnail map
|
61 |
+
* Fixed a few minor bugs
|
62 |
+
|
63 |
= 0.11 =
|
64 |
+
* 2012/08/06
|
65 |
+
* Fixed a few minor bugs
|
66 |
|
67 |
= 0.1 =
|
68 |
* 2012/08/03
|
69 |
+
* Initial release
|
70 |
|
71 |
|
72 |
== Upgrade Notice ==
|
73 |
|
74 |
= 0.1 =
|
75 |
+
Initial release
|