diff --git a/location.module b/location.module
index 91261f8..bf8f915 100644
--- a/location.module
+++ b/location.module
@@ -650,6 +650,30 @@ function location_form_alter($form_id, &$form) {
       '#description' => t('Weight of the location box in the input form. Lowest values will be displayed higher in the form.')
     );
     
+    $form['location']['location_section_title'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Section title'),
+      '#default_value' => variable_get('location_section_title_'. $type, 1),
+      '#return_value' => 1,
+      '#description' => t('Display a section title before location data'),
+    );
+
+    if (module_exists('fieldgroup')) {
+      $groups = fieldgroup_groups($type);
+      // fill groups select box ... ev. do this in fieldgroup?
+      $gopts = array('' => t('None'));
+      foreach ($groups as $name => $group) {
+        $gopts[$name] = $group['label'];
+      }
+      $form['location']['location_fieldgroup'] = array(
+        '#type' => 'select',
+        '#title' => t('Fieldgroup'),
+        '#options' => $gopts,
+        '#default_value' => variable_get('location_fieldgroup_'. $type, ''),
+        '#description' => t('Display location data in this fieldgroup'),
+      );
+    }
+
     $form['location']['location_collapsible'] = array(
       '#type' => 'checkbox',
       '#title' => t('Collapsible'),
@@ -828,6 +852,20 @@ function location_form_alter($form_id, &$form) {
         '#value' => $node->locations[$index]['lid']
       );
     }
+
+    if (module_exists('fieldgroup')) {
+      $fg = variable_get('location_fieldgroup_'. $node->type, '');
+      if (!empty($fg) && isset($form[$fg])) {
+        // move all locations to the fieldgroup
+        $weight = $form['locations']['#weight'];
+        for ($index = 0; $index < $location_form_count; $index++) {
+          $form[$fg]['location_'. $index] = $form['locations'][$index];
+          $form[$fg]['location_'. $index]['#weight'] = $weight;
+          $form[$fg]['location_'. $index]['#parents'] = array('locations', "$index");
+        }
+        unset($form['locations']);
+      }
+    }
   }
 }
 
@@ -1128,20 +1166,28 @@ function location_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
             }
           }
           
-          if ($output = theme('locations', $posted_locations, variable_get('location_suppress_country', 0) ? array('country') : array())) {
-            $node->content['locations']['#value'] .= '<h3>'. t('Location(s)') .'</h3>'. $output;
-          }          
+          $themed_locations = theme('locations', $posted_locations, variable_get('location_suppress_country', 0) ? array('country') : array());
         }
         else {
-          if ($themed_locations = theme('locations', $node->locations, variable_get('location_suppress_country', 0) ? array('country') : array())) {
-            $node->content['locations']['#value'] .= '<h3>'. t('Location(s)') .'</h3>'. $themed_locations;
-          }
-          
+          $themed_locations = theme('locations', $node->locations, variable_get('location_suppress_country', 0) ? array('country') : array());
           
           //if (!$teaser) {
             //drupal_set_html_head(location_geocode_meta_tags($node->location));
           //}
         }
+        if (!empty($themed_locations)) {
+          if (variable_get('location_section_title_'. $node->type, 1)) {
+            $node->content['locations']['#value'] .= '<h3>'. t('Location(s)') .'</h3>';
+          }
+          $node->content['locations']['#value'] .= $themed_locations;
+
+          $node->content['locations']['#weight'] = variable_get('location_weight_'. $node->type, 9);
+          $fg = variable_get('location_fieldgroup_'. $node->type, '');
+          if (!empty($fg) && isset($node->content[$fg])) {
+            $node->content[$fg]['locations'] = $node->content['locations'];
+            unset($node->content['locations']);
+          }
+        }
       }
 
       if (variable_get('location_addanother_'. $node->type, 0) && count($node->locations) < variable_get('location_maxnum_'. $node->type, 0) && !$teaser && node_access('update', $node)) {
