Simple Google Map - Version 2.0

Version Description

  • Added option to specify default map type (roadmap, satellite, etc).
  • Created widget capability.
  • Added default CSS styling. Now you don't have to be a programmer to use the plugin!
  • Added settings page in admin to manage global default options, edit styles, or turn off styles.
  • Made directions form optional.
  • Escaped necessary characters from info window content.
  • Fixed a bug on windows hosting that caused php code to show up at the top of the admin pages (changed all <? to <?php).
  • Changed submit button from "Get directions" to "Directions" to save space.
Download this release

Release Info

Developer taylor_CNP
Plugin Icon wp plugin Simple Google Map
Version 2.0
Comparing to
See all releases

Code changes from version 1.0 to 2.0

Files changed (4) hide show
  1. CNP.gif +0 -0
  2. SimpleGoogleMap.php +0 -92
  3. readme.txt +36 -11
  4. simple-google-map.php +362 -0
CNP.gif ADDED
Binary file
SimpleGoogleMap.php DELETED
@@ -1,92 +0,0 @@
1
- <?
2
- /*
3
- Plugin Name: Simple Google Map
4
- Plugin URI: http://clarknikdelpowell.com/wordpress/simple-google-map/
5
- Description: This plugin will embed a google map using shortcode.
6
- Author: Taylor Gorman
7
- Author URI: http://clarknikdelpowell.com
8
- Version: 1.0
9
-
10
- Copyright 2009 Clark Nikdel Powell (email : taylor@cnpstudio.com)
11
-
12
- This program is free software; you can redistribute it and/or modify
13
- it under the terms of the GNU General Public License as published by
14
- the Free Software Foundation; either version 2 of the License, or
15
- (at your option) any later version.
16
-
17
- This program is distributed in the hope that it will be useful,
18
- but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
- GNU General Public License for more details.
21
-
22
- You should have received a copy of the GNU General Public License
23
- along with this program; if not, write to the Free Software
24
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
- */
26
-
27
-
28
-
29
- // make shortcode work
30
- add_shortcode('SGM', 'googleMap');
31
-
32
- /*
33
- ===============================================================================
34
-
35
- NAME : googleMap()
36
- PURPOSE : prints the google map
37
-
38
- ===============================================================================
39
- */
40
-
41
- function googleMap($atts) {
42
-
43
- if ($atts['lat']) {$lat = $atts['lat'];} else {$lat = '0';}
44
- if ($atts['lng']) {$lng = $atts['lng'];} else {$lng = '0';}
45
- if ($atts['zoom']) {$zoom = $atts['zoom'];} else {$zoom = '12';}
46
- $directionsto = $atts['directionsto'];
47
-
48
- $content = $atts['content'];
49
- $content = str_replace('&lt;', '<', $content);
50
- $content = str_replace('&gt;', '>', $content);
51
-
52
- $return = "
53
- <script type='text/javascript' src='http://maps.google.com/maps/api/js?sensor=false'></script>
54
- <script type='text/javascript'>
55
- function makeMap() {
56
- var latlng = new google.maps.LatLng(".$lat.", ".$lng.")
57
-
58
- var myOptions = {
59
- zoom: ".$zoom.",
60
- center: latlng,
61
- mapTypeId: google.maps.MapTypeId.ROADMAP
62
- };
63
- var map = new google.maps.Map(document.getElementById('SGM'), myOptions);
64
-
65
- var contentString = '<div class=\"infoWindow\">".$content."<form method=\"get\" action=\"http://maps.google.com/maps\"><input type=\"text\" class=\"text\" name=\"saddr\" /><input type=\"hidden\" name=\"daddr\" value=\"".$directionsto."\" /><input type=\"submit\" class=\"submit\" value=\"Get directions\" /></form></div>';
66
- var infowindow = new google.maps.InfoWindow({
67
- content: contentString
68
- });
69
-
70
- var marker = new google.maps.Marker({
71
- position: latlng,
72
- map: map,
73
- title: ''
74
- });
75
-
76
- google.maps.event.addListener(marker, 'click', function() {
77
- infowindow.open(map,marker);
78
- });
79
- }
80
- window.onload = makeMap;
81
- </script>
82
-
83
- <div id='SGM'></div>
84
- ";
85
-
86
- return $return;
87
-
88
- }
89
-
90
-
91
-
92
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -2,34 +2,59 @@
2
  Contributors: taylor_CNP
3
  Donate link:
4
  Tags: google, google map, google maps, simple google map, no api key
5
- Requires at least: 2.8
6
- Tested up to: 2.8.4
7
- Stable tag: trunk
8
 
9
- This plugin will embed a google map using shortcode.
10
 
11
  == Description ==
12
 
13
- # Simple Google Map
14
 
15
- We just needed a little embedded google map on the contact page. Every other google maps plugin either was depreciated or just plain didn’t work. So we made our own. And we thought we’d share it with you.
16
 
17
- ## How it works
 
 
 
 
 
18
 
19
- Google recently released version 3 of their Maps API. The short story is they made it smaller and faster, but with less features. The biggest advantage is that it doesn’t require an API key. So all you have to do is install this plugin and set a few options! Lucky you.
 
 
 
 
20
 
21
  For an example and more visit [the plugin's homepage](http://clarknikdelpowell.com/wordpress/simple-google-map/ "Simple Google Map by Clark Nikdel Powell").
22
 
23
  == Installation ==
24
 
25
- 1. Upload `SimpleGoogleMap.php` to the `/wp-content/plugins/` directory
26
  2. Activate the plugin through the 'Plugins' menu in WordPress
27
- 3. Insert the shortcode into your posts or pages.
28
 
29
  The shortcode name is SGM and here are the options..
30
 
31
  * lat [int] – the latitude of the marker and the center of the map.
32
  * lng [int] – the longitude of the marker and the center of the map.
33
- * zoom [int] – the zoom level (0-19).
 
34
  * directionsto [string] – the destination address for getting directions. obviously you want this to be the address of your latitude longitude coordinates.
35
  * content – what goes inside the infoWindow (speech bubble) that appears when the marker is clicked.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  Contributors: taylor_CNP
3
  Donate link:
4
  Tags: google, google map, google maps, simple google map, no api key
5
+ Requires at least: 2.5
6
+ Tested up to: 2.8.5
7
+ Stable tag: 2.0
8
 
9
+ This plugin will embed a google map using shortcode or as a widget.
10
 
11
  == Description ==
12
 
13
+ With this plugin you can insert a google map into your posts, pages, or wigitized sidebar *without an API key*. Google recently released version 3 of their Maps API. They made it smaller and faster, but with less features. The biggest advantage is that it doesn’t require an API key. So all you have to do is install this plugin and set a few options! Lucky you.
14
 
15
+ **FEATURES**
16
 
17
+ * Insert into posts or pages using only shortcode
18
+ * Insert into your sidebar as a widget.
19
+ * Set default options = less necessary shortcode and widget options.
20
+ * Modify the default CSS or turn it off completely and style the map yourself.
21
+ * Add a form for getting directions by simply adding your destination address.
22
+ * It's simple!
23
 
24
+ **ADDITIONAL NOTES**
25
+
26
+ * There can only be one map one a page. A widget map counts as one.
27
+ * The size of the info window (speech bubble) is dictated by the size of the map, thus the size of the containing div, div#SGM
28
+ * If you wish to use html in the content value in shortcode, be sure and type it in visual mode (not HTML mode). the pointy brackets will be special html characters in HTML mode and are converted back into pointy brackets by the plugin.
29
 
30
  For an example and more visit [the plugin's homepage](http://clarknikdelpowell.com/wordpress/simple-google-map/ "Simple Google Map by Clark Nikdel Powell").
31
 
32
  == Installation ==
33
 
34
+ 1. Upload `simple-google-map.php` to the `/wp-content/plugins/` directory
35
  2. Activate the plugin through the 'Plugins' menu in WordPress
36
+ 3. Insert the shortcode into your posts or pages or add the widget to your sidebar.
37
 
38
  The shortcode name is SGM and here are the options..
39
 
40
  * lat [int] – the latitude of the marker and the center of the map.
41
  * lng [int] – the longitude of the marker and the center of the map.
42
+ * zoom [int] – the zoom level (1-19).
43
+ * type [int] – the starting map type. possible values are only ROADMAP, SATELLITE, HYBRID, or TERRAIN and must be in uppercase
44
  * directionsto [string] – the destination address for getting directions. obviously you want this to be the address of your latitude longitude coordinates.
45
  * content – what goes inside the infoWindow (speech bubble) that appears when the marker is clicked.
46
+
47
+ == Changelog ==
48
+
49
+ = 2.0 =
50
+ * Added option to specify default map type (roadmap, satellite, etc).
51
+ * Created widget capability.
52
+ * Added default CSS styling. Now you don't have to be a programmer to use the plugin!
53
+ * Added settings page in admin to manage global default options, edit styles, or turn off styles.
54
+ * Made directions form optional.
55
+ * Escaped necessary characters from info window content.
56
+ * Fixed a bug on windows hosting that caused php code to show up at the top of the admin pages (changed all <? to <?php).
57
+ * Changed submit button from "Get directions" to "Directions" to save space.
58
+
59
+ = 1.0 =
60
+ * Initial release
simple-google-map.php ADDED
@@ -0,0 +1,362 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Simple Google Map
4
+ Plugin URI: http://clarknikdelpowell.com/wordpress/simple-google-map/
5
+ Description: This plugin will embed a google map using shortcode or as a widget.
6
+ Author: Taylor Gorman
7
+ Author URI: http://clarknikdelpowell.com
8
+ Version: 2.0
9
+
10
+ Copyright 2009 Clark Nikdel Powell (email : taylor@cnpstudio.com)
11
+
12
+ This program is free software; you can redistribute it and/or modify
13
+ it under the terms of the GNU General Public License as published by
14
+ the Free Software Foundation; either version 2 of the License, or
15
+ (at your option) any later version.
16
+
17
+ This program is distributed in the hope that it will be useful,
18
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ GNU General Public License for more details.
21
+
22
+ You should have received a copy of the GNU General Public License
23
+ along with this program; if not, write to the Free Software
24
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
+ */
26
+
27
+
28
+ /*
29
+ ===============================================================================
30
+
31
+ set default options when plugin is activated, remove options when deactivated
32
+
33
+ ===============================================================================
34
+ */
35
+
36
+ global $SGMdefaults;
37
+ $SGMdefaults = array('zoom'=>'12', 'type'=>'ROADMAP', 'directionsto'=>'', 'content'=>'');
38
+
39
+ register_activation_hook( __FILE__, 'onActivation' );
40
+ register_deactivation_hook( __FILE__, 'onDeactivation' );
41
+
42
+ function onActivation() {
43
+ global $SGMdefaults;
44
+ update_option('SGMoptions', $SGMdefaults);
45
+ $SGMcss = "#SGM {width:100%; height:300px;}
46
+ #SGM .infoWindow {line-height:13px; font-size:10px;}
47
+ #SGM input {margin:4px 4px 0 0; font-size:10px;}
48
+ #SGM input.text {border:solid 1px #ccc; background-color:#fff; padding:2px;}";
49
+ update_option('SGMcss', $SGMcss);
50
+ }
51
+ function onDeactivation() { delete_option('SGMoptions'); }
52
+
53
+ /*
54
+ ===============================================================================
55
+
56
+ insert styles into <head>
57
+
58
+ ===============================================================================
59
+ */
60
+
61
+ $SGMoptions = get_option('SGMoptions');
62
+
63
+ if (!$SGMoptions['nostyle']) {
64
+
65
+ add_action ('wp_head', 'printStyles');
66
+
67
+ function printStyles() {
68
+ print "<!-- styles for Simple Google Map -->\n<style type='text/css'>\n";
69
+ print get_option('SGMcss');
70
+ print "\n</style>\n<!-- end styles for Simple Google Map -->\n";
71
+ }
72
+
73
+ }
74
+
75
+ /*
76
+ ===============================================================================
77
+
78
+ the map code (so it's not here twice)
79
+
80
+ ===============================================================================
81
+ */
82
+
83
+ function SGMprintmap($lat, $lng, $zoom, $type, $content, $directionsto) {
84
+
85
+ $SGMoptions = get_option('SGMoptions'); // get options defined in admin page
86
+
87
+ if (!$lat) {$lat = '0';}
88
+ if (!$lng) {$lng = '0';}
89
+ if (!$zoom) {$zoom = $SGMoptions['zoom'];} // 1-19
90
+ if (!$type) {$type = $SGMoptions['type'];} // ROADMAP, SATELLITE, HYBRID, TERRAIN
91
+ if (!$content) {$content = $SGMoptions['content'];}
92
+
93
+ $content = str_replace('&lt;', '<', $content);
94
+ $content = str_replace('&gt;', '>', $content);
95
+ $content = mysql_escape_string($content);
96
+ if ($directionsto) { $directionsForm = "<form method=\"get\" action=\"http://maps.google.com/maps\"><input type=\"hidden\" name=\"daddr\" value=\"".$directionsto."\" /><input type=\"text\" class=\"text\" name=\"saddr\" /><input type=\"submit\" class=\"submit\" value=\"Directions\" /></form>"; }
97
+
98
+ return "
99
+ <script type='text/javascript' src='http://maps.google.com/maps/api/js?sensor=false'></script>
100
+ <script type='text/javascript'>
101
+ function makeMap() {
102
+ var latlng = new google.maps.LatLng(".$lat.", ".$lng.")
103
+
104
+ var myOptions = {
105
+ zoom: ".$zoom.",
106
+ center: latlng,
107
+ mapTypeControl: true,
108
+ mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
109
+ navigationControl: true,
110
+ navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
111
+ mapTypeId: google.maps.MapTypeId.".$type."
112
+ };
113
+ var map = new google.maps.Map(document.getElementById('SGM'), myOptions);
114
+
115
+ var contentString = '<div class=\"infoWindow\">".$content.$directionsForm."</div>';
116
+ var infowindow = new google.maps.InfoWindow({
117
+ content: contentString
118
+ });
119
+
120
+ var marker = new google.maps.Marker({
121
+ position: latlng,
122
+ map: map,
123
+ title: ''
124
+ });
125
+
126
+ google.maps.event.addListener(marker, 'click', function() {
127
+ infowindow.open(map,marker);
128
+ });
129
+ }
130
+ window.onload = makeMap;
131
+ </script>
132
+
133
+ <div id='SGM'></div>
134
+ ";
135
+
136
+ }
137
+
138
+ /*
139
+ ===============================================================================
140
+
141
+ simple google map shortcode
142
+
143
+ ===============================================================================
144
+ */
145
+
146
+ add_shortcode('SGM', 'googleMap');
147
+
148
+ function googleMap($atts) {
149
+ return SGMprintmap($atts['lat'], $atts['lng'], $atts['zoom'], $atts['type'], $atts['content'], $atts['directionsto']);
150
+ }
151
+
152
+ /*
153
+ ===============================================================================
154
+
155
+ simple google map widget
156
+
157
+ ===============================================================================
158
+ */
159
+
160
+ add_action('widgets_init', create_function('', 'return register_widget("SGMwidget");'));
161
+
162
+ class SGMwidget extends WP_Widget {
163
+
164
+ // constructor
165
+ function SGMwidget() {
166
+ $widget_ops = array('classname' => 'SGMwidget', 'description' => __( 'Add a google map to your blog or site') );
167
+ $this->WP_Widget('module', __('Simple Google Map'), $widget_ops);
168
+ }
169
+
170
+ // output the content of the widget
171
+ function widget($args, $instance) {
172
+ extract( $args );
173
+ print $before_widget;
174
+ if ($instance['title']) { print $before_title.$instance['title'].$after_title; }
175
+ print SGMprintmap($instance['lat'], $instance['lng'], $instance['zoom'], $instance['type'], $instance['content'], $instance['directionsto']);
176
+ print $after_widget;
177
+ }
178
+
179
+ // process widget options to be saved
180
+ function update($new_instance, $old_instance) {
181
+ print_r($old_instance);
182
+ print_r($new_instance);
183
+ return $new_instance;
184
+ }
185
+
186
+ // output the options form on admin
187
+ function form($instance) {
188
+ global $wpdb;
189
+ $title = esc_attr($instance['title']);
190
+ $lat = esc_attr($instance['lat']);
191
+ $lng = esc_attr($instance['lng']);
192
+ $zoom = esc_attr($instance['zoom']);
193
+ $type = esc_attr($instance['type']);
194
+ $directionsto = esc_attr($instance['directionsto']);
195
+ $content = esc_attr($instance['content']);
196
+ ?>
197
+ <p>
198
+ <label for="<?php print $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label>
199
+ <input class="widefat" id="<?php print $this->get_field_id('title'); ?>" name="<?php print $this->get_field_name('title'); ?>" type="text" value="<?php print $title; ?>" />
200
+ </p>
201
+ <p>
202
+ <label for="<?php print $this->get_field_id('lat'); ?>"><?php _e('Latitude:'); ?></label>
203
+ <input class="widefat" id="<?php print $this->get_field_id('lat'); ?>" name="<?php print $this->get_field_name('lat'); ?>" type="text" value="<?php print $lat; ?>" />
204
+ </p>
205
+ <p>
206
+ <label for="<?php print $this->get_field_id('lng'); ?>"><?php _e('Longitude:'); ?></label>
207
+ <input class="widefat" id="<?php print $this->get_field_id('lng'); ?>" name="<?php print $this->get_field_name('lng'); ?>" type="text" value="<?php print $lng; ?>" />
208
+ </p>
209
+ <p>
210
+ <label for="<?php print $this->get_field_id('zoom'); ?>"><?php _e('Zoom Level: <small>(1-19)</small>'); ?></label>
211
+ <input class="widefat" id="<?php print $this->get_field_id('zoom'); ?>" name="<?php print $this->get_field_name('zoom'); ?>" type="text" value="<?php print $zoom; ?>" />
212
+ </p>
213
+ <p>
214
+ <label for="<?php print $this->get_field_id('type'); ?>"><?php _e('Map Type:<br /><small>(ROADMAP, SATELLITE, HYBRID, TERRAIN)</small>'); ?></label>
215
+ <input class="widefat" id="<?php print $this->get_field_id('type'); ?>" name="<?php print $this->get_field_name('type'); ?>" type="text" value="<?php print $type; ?>" />
216
+ </p>
217
+ <p>
218
+ <label for="<?php print $this->get_field_id('directionsto'); ?>"><?php _e('Address for directions:'); ?></label>
219
+ <input class="widefat" id="<?php print $this->get_field_id('directionsto'); ?>" name="<?php print $this->get_field_name('directionsto'); ?>" type="text" value="<?php print $directionsto; ?>" />
220
+ </p>
221
+ <p>
222
+ <label for="<?php print $this->get_field_id('content'); ?>"><?php _e('Info Bubble Content:'); ?></label>
223
+ <textarea rows="7" class="widefat" id="<?php print $this->get_field_id('content'); ?>" name="<?php print $this->get_field_name('content'); ?>"><?php print $content; ?></textarea>
224
+ </p>
225
+ <?php
226
+ }
227
+
228
+ } // SGMwidget widget
229
+
230
+ /*
231
+ ===============================================================================
232
+
233
+ simple google map settings
234
+
235
+ ===============================================================================
236
+ */
237
+
238
+ add_action('admin_menu', 'pluginMenu', 1);
239
+
240
+ function pluginMenu() { // Add a new submenu under settings
241
+ add_options_page('Simple Google Map', 'Simple Google Map', 'activate_plugins', 'simple-google-map', 'SGMoptions');
242
+ }
243
+
244
+ function SGMoptions() { ?>
245
+
246
+ <?php
247
+ global $SGMdefaults;
248
+ if ($_POST['submit']) {
249
+ $_POST['content'] = stripslashes($_POST['content']);
250
+ $SGMoptions = array();
251
+ foreach ($SGMdefaults as $name => $value) {
252
+ $SGMoptions[$name] = $_POST[$name];
253
+ }
254
+ $SGMoptions['editCSS'] = $_POST['editCSS'];
255
+ $SGMoptions['nostyle'] = $_POST['nostyle'];
256
+ $SGMcss = $_POST['css'];
257
+
258
+ update_option('SGMoptions', $SGMoptions);
259
+ update_option('SGMcss', $SGMcss);
260
+ $message = '<div id="message" class="updated"><p>Simple Google Map settings updated.</p></div>';
261
+ } else {
262
+ $SGMoptions = get_option('SGMoptions');
263
+ $SGMcss = get_option('SGMcss');
264
+ }
265
+ ?>
266
+
267
+ <style type="text/css">
268
+ .formField {
269
+ width: 60%;
270
+ padding: 5px 0px 10px 0px;
271
+ }
272
+ .form-table input[type="text"], .form-table textarea {
273
+ width: 50%;
274
+ }
275
+ .form-table th {
276
+ width: 150px;
277
+ }
278
+ #SGMcss {
279
+ display: block;
280
+ margin-top: 8px;
281
+ width: 93%;
282
+ }
283
+ #CNPlink {
284
+ display: block;
285
+ float: left;
286
+ background-image: url(/wp-content/plugins/simple-google-map/CNP.gif);
287
+ width: 31px;
288
+ height: 29px;
289
+ margin: 16px 8px 0 0;
290
+ }
291
+ #CNPlink:hover {
292
+ background-position: 0px -29px;
293
+ }
294
+ </style>
295
+ <script type="text/javascript">
296
+ jQuery(function($) {
297
+ $('#message').fadeTo(1500, 1).slideUp();
298
+ if (!$('#editCSS').attr('checked')) {
299
+ $('#SGMcss').hide();
300
+ }
301
+ $('#editCSS').change(function() {
302
+ $('#SGMcss').slideToggle(200);
303
+ });
304
+ });
305
+ </script>
306
+
307
+ <div class="wrap">
308
+
309
+ <a href="http://www.clarknikdelpowell.com" target="_blank" id="CNPlink"></a><h2>Simple Google Map</h2>
310
+ <?php print $message; ?>
311
+ <p>Here you can set the default options for every Simple Google Map on your pages/posts/sidebars. You can override these settings for any one Simple Google Map by simply adding the proper options to the shortcode/widget of that map. Leave them undefined or blank and these settings will apply.</p>
312
+ <p>If you need help getting the latitude and longitude of your location try <a href="http://stevemorse.org/jcal/latlon.php" target="_blank">this site</a>.</p>
313
+
314
+ <form action="" method="post">
315
+
316
+ <table class="form-table">
317
+
318
+ <tr valign="top">
319
+ <th><label for="zoom">Zoom Level</label></th>
320
+ <td>
321
+ <input name="zoom" type="text" value="<?php print $SGMoptions['zoom']; ?>" /><br />
322
+ <span class="description">integer from 1 to 19</span>
323
+ </td>
324
+ </tr>
325
+
326
+ <tr valign="top">
327
+ <th><label for="type">Map Type</label></th>
328
+ <td>
329
+ <input type="text" name="type" value="<?php print $SGMoptions['type']; ?>" /><br />
330
+ <span class="description">ROADMAP, SATELLITE, HYBRID, or TERRAIN (must be in uppercase)</span>
331
+ </td>
332
+ </tr>
333
+
334
+ <tr valign="top">
335
+ <th><label for="content">Info Bubble Content</label></th>
336
+ <td><textarea name="content" /><?php print $SGMoptions['content']; ?></textarea></td>
337
+ </tr>
338
+
339
+ <tr>
340
+ <th scope="row" colspan="2" class="th-full">
341
+ <label for="editCSS"><input type="checkbox" name="editCSS" id="editCSS" <?php if ($SGMoptions['editCSS']) {print 'checked="checked" ';} ?>/> I want to edit the Simple Google Map CSS</label>
342
+ <textarea name="css" id="SGMcss" rows="6"><?php print $SGMcss ?></textarea>
343
+ </th>
344
+ </tr>
345
+
346
+ <tr>
347
+ <th scope="row" colspan="2" class="th-full">
348
+ <label for="nostyle"><input type="checkbox" name="nostyle" <?php if ($SGMoptions['nostyle']) {print 'checked="checked" ';} ?>/> Remove the Simple Google Map CSS, I will style it in the theme's stylesheet.</label>
349
+ </th>
350
+ </tr>
351
+
352
+ </table><!-- form-table -->
353
+
354
+ <p class="submit"><input type="submit" class="button-primary" name="submit" value="Save Changes" /></p>
355
+
356
+ </form>
357
+
358
+ </div><!-- wrap -->
359
+
360
+ <?php }
361
+
362
+ ?>