Skip to content
Snippets Groups Projects
Commit 63ef55fd authored by webgeer's avatar webgeer
Browse files

Various updates

parent d511def1
No related branches found
No related tags found
No related merge requests found
...@@ -143,6 +143,8 @@ The GMap Array is an associative array with the following definitions: ...@@ -143,6 +143,8 @@ The GMap Array is an associative array with the following definitions:
should advertize layers in Transverse Mercator projection instead should advertize layers in Transverse Mercator projection instead
of WGS84 projection. See discussion of this topic here: of WGS84 projection. See discussion of this topic here:
http://johndeck.blogspot.com/#112679047816546118 http://johndeck.blogspot.com/#112679047816546118
'opacity' - (optional) Opacity level for this tile from 0.0 (transparent)
to 1.0 (opaque)
The gmap marker is converted to the javascript to display the map using the The gmap marker is converted to the javascript to display the map using the
function gmap_draw_map($gmap, $javascript=''), where $gmap is a map function gmap_draw_map($gmap, $javascript=''), where $gmap is a map
......
...@@ -54,7 +54,7 @@ Instructions ...@@ -54,7 +54,7 @@ Instructions
Macro Macro
----- -----
A gmap macro can be created on the gmapmacro page and the text can then be A gmap macro can be created on the map/macro page and the text can then be
copied and pasted into any node where the gmap filter is enabled. copied and pasted into any node where the gmap filter is enabled.
Default settings will be the initial settings and will be used for any Default settings will be the initial settings and will be used for any
...@@ -120,7 +120,7 @@ Demo ...@@ -120,7 +120,7 @@ Demo
---- ----
For a few pages that show some of the items mentioned above see: For a few pages that show some of the items mentioned above see:
http://www.webgeer.com/gmapmacro http://www.webgeer.com/map/macro
http://www.webgeer.com/gmapdemo http://www.webgeer.com/gmapdemo
http://www.webgeer.com/map/users http://www.webgeer.com/map/users
......
...@@ -607,41 +607,41 @@ function gmap_location_user($op, &$edit, &$user, $category = NULL) { ...@@ -607,41 +607,41 @@ function gmap_location_user($op, &$edit, &$user, $category = NULL) {
function gmap_location_form_alter($form_id, &$form) { function gmap_location_form_alter($form_id, &$form) {
$type = $form['type']['#value'];
$node = $form['#node'];
if (module_exist('location')) { if (module_exist('location')) {
return; return;
} }
switch ($form_id) { if(isset($form['type'])) {
case $type .'_node_settings': $type = $form['type']['#value'];
$markers=gmap_get_markers(); switch ($form_id) {
case $type .'_node_settings':
$form['gmap'] = array( $form['gmap'] = array(
'#type' => 'fieldset', '#type' => 'fieldset',
'#title' => t('Google Maps'), '#title' => t('Google Maps'),
'#weight' => 0); //0 puts at the top, 1 puts it at the bottom below the submit?? '#weight' => 0, //0 puts at the top, 1 puts it at the bottom below the submit??
$form['gmap']['gmap_node_'. $type] = array( );
'#type' => 'checkbox', $form['gmap']['gmap_node_'. $type] = array(
'#title' => t('Allow users to add Google Maps info to this node type'), '#type' => 'checkbox',
'#default_value' => variable_get('gmap_node_'. $type, 0), '#title' => t('Allow users to add Google Maps info to this node type'),
'#description' => t('The location information will be available to the google maps module, and can be shown in a block.'), '#default_value' => variable_get('gmap_node_'. $type, 0),
'#required' => FALSE, '#description' => t('The location information will be available to the google maps module, and can be shown in a block.'),
); '#required' => FALSE,
$form['gmap']['gmap_node_marker_'.$type] = array( );
'#type'=>'select', $form['gmap']['gmap_node_marker_'.$type] = array(
'#title'=>t('Marker for this nodetype'), '#type' => 'select',
'#default_value'=>variable_get('gmap_node_marker_'.$type, variable_get('gmap_user_map_marker', 'drupal')), '#title' => t('Marker for this nodetype'),
'#options'=>$markers, '#default_value' => variable_get('gmap_node_marker_'.$type, variable_get('gmap_user_map_marker', 'drupal')),
); '#options' => gmap_get_markers(),
break; );
case $type .'_node_form': break;
if(variable_get('gmap_node_'. $type, 0)) { case $type .'_node_form':
$edit = array(); if(variable_get('gmap_node_'. $type, 0)) {
_gmap_location_map_form($form, $edit, 'node'); $edit = array();
} _gmap_location_map_form($form, $edit, 'node');
break; }
break;
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment