Index: location.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/location/location.inc,v
retrieving revision 1.33
diff -u -r1.33 location.inc
--- location.inc	4 Apr 2006 21:31:48 -0000	1.33
+++ location.inc	17 Apr 2006 08:29:22 -0000
@@ -414,6 +414,10 @@
   //    '#type' => 'markup',
   //    '#value' => $description,
   //    );
+   if (module_exist('gmap') && variable_get('location_usegmap',1))
+  {
+    $form['map']=array();  //reserve spot at top of form for map
+  }
   $form['latitude'] = array(
       '#prefix' => '<div class="container-inline">',
       '#type' => 'textfield',
@@ -431,6 +435,12 @@
       '#description' => $description,
       '#suffix' => '</div>'
       );
+  if (module_exist('gmap') && variable_get('location_usegmap',1))
+  {
+    $map_macro=variable_get('gmap_user_map', variable_get('gmap_user_map','[gmap|id=locmap|center=40,0|zoom=3|width=100%|height=400px]'));
+    $form['map']['gmap']['#value']=gmap_set_location($map_macro,$form['longitude'],$form['latitude']);
+  }
+  
   return $form;
 }
 
