Version Description
- 2012/08/09
- Added pin size for thumbnail map
Download this release
Release Info
| Developer | WebFactory |
| Plugin | |
| Version | 0.13 |
| Comparing to | |
| See all releases | |
Code changes from version 0.12 to 0.13
- gmw-widget.php +15 -1
- google-maps-widget.php +1 -1
- readme.txt +10 -2
gmw-widget.php
CHANGED
|
@@ -18,6 +18,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
| 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',
|
|
@@ -31,6 +32,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
| 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'];
|
|
@@ -61,6 +63,11 @@ class GoogleMapsWidget extends WP_Widget {
|
|
| 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);
|
|
@@ -76,6 +83,11 @@ class GoogleMapsWidget extends WP_Widget {
|
|
| 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) . '" />';
|
|
@@ -116,6 +128,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
| 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,7 +163,8 @@ class GoogleMapsWidget extends WP_Widget {
|
|
| 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'] .
|
|
|
|
| 154 |
urlencode($instance['address']) . '"></a>';
|
| 155 |
$tmp .= '</p>';
|
| 156 |
$out .= apply_filters('google_maps_widget_content', $tmp);
|
| 18 |
array('title' => 'Map',
|
| 19 |
'address' => 'New York, USA',
|
| 20 |
'thumb_pin_color' => 'red',
|
| 21 |
+
'thumb_pin_size' => 'default',
|
| 22 |
'thumb_width' => 250,
|
| 23 |
'thumb_height' => 250,
|
| 24 |
'thumb_type' => 'roadmap',
|
| 32 |
$footer = $instance['footer'];
|
| 33 |
$address = $instance['address'];
|
| 34 |
$thumb_pin_color = $instance['thumb_pin_color'];
|
| 35 |
+
$thumb_pin_size = $instance['thumb_pin_size'];
|
| 36 |
$thumb_width = $instance['thumb_width'];
|
| 37 |
$thumb_height = $instance['thumb_height'];
|
| 38 |
$thumb_type = $instance['thumb_type'];
|
| 63 |
array('val' => 'red', 'label' => 'Red'),
|
| 64 |
array('val' => 'white', 'label' => 'White'));
|
| 65 |
|
| 66 |
+
$pin_sizes = array(array('val' => 'tiny', 'label' => 'Tiny'),
|
| 67 |
+
array('val' => 'small', 'label' => 'Small'),
|
| 68 |
+
array('val' => 'mid', 'label' => 'Medium'),
|
| 69 |
+
array('val' => 'default', 'label' => 'Large (default)'));
|
| 70 |
+
|
| 71 |
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
| 72 |
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
| 73 |
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
| 83 |
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
| 84 |
echo '</select></p>';
|
| 85 |
|
| 86 |
+
echo '<p><label for="' . $this->get_field_id('thumb_pin_size') . '">Thumbnail Map Pin Size: </label>';
|
| 87 |
+
echo '<select id="' . $this->get_field_id('thumb_pin_size') . '" name="' . $this->get_field_name('thumb_pin_size') . '">';
|
| 88 |
+
GMW::create_select_options($pin_sizes, $thumb_pin_size);
|
| 89 |
+
echo '</select></p>';
|
| 90 |
+
|
| 91 |
echo '<p><label for="' . $this->get_field_id('thumb_width') . '">Thumbnail Map Size: </label>';
|
| 92 |
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 ';
|
| 93 |
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) . '" />';
|
| 128 |
$instance['title'] = $new_instance['title'];
|
| 129 |
$instance['address'] = $new_instance['address'];
|
| 130 |
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
| 131 |
+
$instance['thumb_pin_size'] = $new_instance['thumb_pin_size'];
|
| 132 |
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
| 133 |
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
| 134 |
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
| 163 |
$tmp .= '<p><a class="widget-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
| 164 |
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
| 165 |
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
| 166 |
+
'&size=' .$instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] .
|
| 167 |
+
'&sensor=false&scale=2&markers=size:' . $instance['thumb_pin_size'] . '%7Ccolor:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
| 168 |
urlencode($instance['address']) . '"></a>';
|
| 169 |
$tmp .= '</p>';
|
| 170 |
$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.13
|
| 8 |
Author URI: http://www.webfactoryltd.com/
|
| 9 |
*/
|
| 10 |
|
readme.txt
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
=== Google Maps Widget ===
|
| 2 |
Contributors: WebFactory
|
| 3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
| 4 |
-
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 |
|
|
@@ -16,6 +16,7 @@ More features, videos and demos are coming in a few days! Till then here's the w
|
|
| 16 |
* title
|
| 17 |
* address
|
| 18 |
* thumbnail map pin color
|
|
|
|
| 19 |
* thumbnail map width/height
|
| 20 |
* thumbnail map zoom level
|
| 21 |
* thumbnail map type
|
|
@@ -55,6 +56,10 @@ If you can figure it out open a thread in the support forums.
|
|
| 55 |
|
| 56 |
== Changelog ==
|
| 57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
= 0.12 =
|
| 59 |
* 2012/08/07
|
| 60 |
* Added pin color for thumbnail map
|
|
@@ -71,5 +76,8 @@ If you can figure it out open a thread in the support forums.
|
|
| 71 |
|
| 72 |
== Upgrade Notice ==
|
| 73 |
|
|
|
|
|
|
|
|
|
|
| 74 |
= 0.1 =
|
| 75 |
Initial release
|
| 1 |
=== Google Maps Widget ===
|
| 2 |
Contributors: WebFactory
|
| 3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
| 4 |
+
Tags: google maps, maps, gmaps, widget, lightbox, map, google map
|
| 5 |
License: GPLv2 or later
|
| 6 |
Requires at least: 3.2
|
| 7 |
Tested up to: 3.4.1
|
| 8 |
+
Stable tag: 0.13
|
| 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 |
|
| 16 |
* title
|
| 17 |
* address
|
| 18 |
* thumbnail map pin color
|
| 19 |
+
* thumbnail map pin size
|
| 20 |
* thumbnail map width/height
|
| 21 |
* thumbnail map zoom level
|
| 22 |
* thumbnail map type
|
| 56 |
|
| 57 |
== Changelog ==
|
| 58 |
|
| 59 |
+
= 0.13 =
|
| 60 |
+
* 2012/08/09
|
| 61 |
+
* Added pin size for thumbnail map
|
| 62 |
+
|
| 63 |
= 0.12 =
|
| 64 |
* 2012/08/07
|
| 65 |
* Added pin color for thumbnail map
|
| 76 |
|
| 77 |
== Upgrade Notice ==
|
| 78 |
|
| 79 |
+
= 0.1x =
|
| 80 |
+
Upgrade without any fear :)
|
| 81 |
+
|
| 82 |
= 0.1 =
|
| 83 |
Initial release
|
