diff -urp /tmp/gmap.orig/gmap.info gmap/gmap.info
--- /tmp/gmap.orig/gmap.info	2008-03-21 01:06:33.000000000 +0100
+++ gmap/gmap.info	2008-03-29 23:58:59.000000000 +0100
@@ -2,9 +2,10 @@
 name = GMap
 description = Filter to allow insertion of a google map into a node
 package = Location
+core = 6.x
 
 ; Information added by drupal.org packaging script on 2008-03-21
-version = "5.x-1.x-dev"
+version = "6.x-0.x-dev"
 project = "gmap"
 datestamp = "1206057993"
 
diff -urp /tmp/gmap.orig/gmap.module gmap/gmap.module
--- /tmp/gmap.orig/gmap.module	2008-03-18 23:54:32.000000000 +0100
+++ gmap/gmap.module	2008-04-22 16:12:51.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-/* $Id: gmap.module,v 1.51.2.108 2008/03/18 22:54:32 bdragon Exp $ */
+// $Id$: gmap.module,v 1.51.2.108 2008/03/18 22:54:32 bdragon Exp
 // vim:set ft=php:
 
 /**
@@ -521,7 +521,7 @@ function gmap_parse_macro($instring, $ve
         }
         break;
 
-*/
+ */
   $additions = module_invoke_all('gmap', 'parse_macro', $m);
   if (!empty($additions)) {
     foreach ($additions as $k => $v) {
@@ -566,6 +566,30 @@ function _gmap_str2points($str) {
 }
 
 /**
+ * Implementation of hook_theme().
+ */
+function gmap_theme() {
+  return array(
+    'gmap_location_user_page' => array('arguments' => array('element')),
+    'og_gmapnodelabel' => array('arguments' => array('element')),
+    'gmap_location_node_page' => array('arguments' => array('element')),
+    'image_gmapnodelabel' => array('arguments' => array('element')),
+    'gmapnodelabel' => array('arguments' => array('element')),
+    'gmap_location_user_html' => array('arguments' => array('element')),
+    'views_view_gmap' => array('arguments' => array('element')),
+    'gmap_views_marker_label' => array('arguments' => array('element')),
+    'gmap_marker_popup' => array('arguments' => array('element')),
+    'gmap_overlay_edit' => array('arguments' => array('element')),
+    'gmap_coord' => array('arguments' => array('element')),
+    'gmap_macrotext' => array('arguments' => array('element')),
+    'gmap_dimension' => array('arguments' =>  array('element')),
+    'gmap_address' => array('arguments' => array('element')),
+    'gmap_align' => array('arguments' => array('element')),
+    'gmap' => array('arguments' => array('element')),
+  );
+}
+
+/**
  * Theme a marker popup.
  * This will get called for markers embedded in macros.
  */
@@ -713,32 +737,27 @@ function gmap_filter_tips($delta, $forma
   }
 }
 
-function gmap_menu($may_cache) {
-  if ($may_cache) {
-    $items = array();
-/*    $items[] = array(
-      'path' => 'map',
-      'type' => MENU_ITEM_GROUPING,
-      'title' => t('google maps'),
-      'access' => user_access('create macro')||user_access('show user map')||user_access('show node map'),
-    );  */
-    $items[] = array(
-      'path' => 'admin/settings/gmap',
-      'title' => t('GMap'),
-      'description' => t('Configure GMap settings'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => 'gmap_admin_settings',
-      'access' => user_access('administer site configuration'),
-      'type' => MENU_NORMAL_ITEM,
-    );
-    $items[] = array(
-      'path' => 'map/query',
-      'type' => MENU_CALLBACK,
-      'access' => TRUE, //@@@
-      'callback' => 'gmap_json_query',
-    );
-    return $items;
-  }
+function gmap_menu() {
+  $items = array();
+/*  $items['map'] = array(
+    'type' => MENU_ITEM_GROUPING,
+    'title' => 'google maps',
+    'access arguments' => array('create macro')||array('show user map')||array('show node map'),
+  ); */
+  $items['admin/settings/gmap'] = array(
+    'title' => 'GMap',
+    'description' => 'Configure GMap settings',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('gmap_admin_settings'),
+    'access arguments' => array('administer site configuration'),
+    'type' => MENU_NORMAL_ITEM,
+  );
+  $items['map/query'] = array(
+    'type' => MENU_CALLBACK,
+    'access' => TRUE, //@@@
+    'page callback' => 'gmap_json_query',
+  );
+  return $items;
 }
 
 /**
@@ -761,9 +780,9 @@ function gmap_json_query() {
 /**
  * Settings page.
  */
-function gmap_admin_settings() {
+function gmap_admin_settings($form_state) {
   require_once(drupal_get_path('module', 'gmap') .'/gmap_settings_ui.inc');
-  return _gmap_admin_settings();
+  return _gmap_admin_settings($form_state);
 }
 
 /**
@@ -978,7 +997,7 @@ function gmap_map_cleanup(&$map) {
   // Google is picky about this one.
   $map['zoom'] = (int)$map['zoom'];
   // JSON query handler
-  $map['querypath'] = url('map/query', NULL, NULL, TRUE);
+  $map['querypath'] = url('map/query', array('absolute' => TRUE));
   // Normalize latitude / longitude
   if ($map['latlong']) {
     $map['latlon'] = $map['latlong'];
@@ -1008,6 +1027,7 @@ function theme_gmap_address($element) {
 }
 
 function theme_gmap_align($element) {
+  system('echo $element >> /tmp/denraf.out');
   drupal_add_js(drupal_get_path('module', 'gmap') .'/js/align.js');
   return theme('select', $element);
 }
@@ -1053,7 +1073,7 @@ function theme_gmap($element) {
   // Inline settings extend.
   $o .= '<script type="text/javascript">'."\n";
   $o .= "/* <![CDATA[ */\n";
-  $o .= 'Drupal.extend({ settings: '. drupal_to_js(array('gmap' => array($element['#map'] => $map))) ." });\n";
+  $o .= 'jQuery.extend(Drupal, { settings: '. drupal_to_js(array('gmap' => array($element['#map'] => $map))) ." });\n";
   $o .= "/* ]]> */\n";
   $o .= "</script>\n";
   return $o;
@@ -1084,11 +1104,20 @@ function gmap_widget_setup(&$element, $t
       }
     }
   }
-  $element['#attributes']['class'] = trim(implode(' ', array(
-    $element['#attributes']['class'],
-    'gmap-control',
-    'gmap-'. $type,
-  )));
+  if (!empty($element['#attributes']['class'])) {
+    $element['#attributes']['class'] = trim(implode(' ', array(
+      $element['#attributes']['class'],
+      'gmap-control',
+      'gmap-'. $type,
+    )));
+  }
+  else {
+    $element['#attributes']['class'] = trim(implode(' ', array(
+      '',
+      'gmap-control',
+      'gmap-'. $type,
+    )));
+  }
   $element['#id'] = gmap_get_id($map, $type);
   $element['#map'] = $map;
 }
@@ -1137,7 +1166,7 @@ function gmap_get_marker_titles($reset =
     require_once(drupal_get_path('module', 'gmap') .'/gmap_markerinfo.inc');
     $titles = _gmap_get_marker_titles();
   }
-  cache_set('gmap_marker_titles', 'cache', serialize($titles));
+  cache_set('gmap_marker_titles', serialize($titles));
   return $titles;
 }
 
@@ -1159,7 +1188,7 @@ function gmap_get_icondata($reset=FALSE)
     require_once(drupal_get_path('module', 'gmap') .'/gmap_markerinfo.inc');
     $icons = _gmap_get_icondata();
   }
-  cache_set('gmap_icondata', 'cache', serialize($icons));
+  cache_set('gmap_icondata', serialize($icons));
   return $icons;
 }
 
diff -urp /tmp/gmap.orig/gmap_location.info gmap/gmap_location.info
--- /tmp/gmap.orig/gmap_location.info	2008-03-21 01:06:33.000000000 +0100
+++ gmap/gmap_location.info	2008-03-30 00:00:02.000000000 +0100
@@ -2,10 +2,12 @@
 name = GMap Location
 description = Display location.module information on Google Maps
 package = Location
-dependencies = gmap location
+dependencies[] = gmap 
+dependencies[] = location
+core = 6.x
 
 ; Information added by drupal.org packaging script on 2008-03-21
-version = "5.x-1.x-dev"
+version = "6.x-0.x-dev"
 project = "gmap"
 datestamp = "1206057993"
 
diff -urp /tmp/gmap.orig/gmap_location.install gmap/gmap_location.install
--- /tmp/gmap.orig/gmap_location.install	2007-11-08 23:17:45.000000000 +0100
+++ gmap/gmap_location.install	2008-03-30 00:40:00.000000000 +0100
@@ -1,5 +1,5 @@
 <?php
-/* $Id: gmap_location.install,v 1.1.2.4 2007/11/08 22:17:45 bdragon Exp $ */
+// $Id: gmap_location.install,v 1.1.2.4 2007/11/08 22:17:45 bdragon Exp $
 
 function gmap_location_install() {
   // Gmap no longer provides the location table.
@@ -70,4 +70,4 @@ function gmap_location_uninstall() {
   variable_del('gmap_node_map');
   variable_del('gmap_node_markers');
   variable_del('gmap_role_markers');
-}
\ No newline at end of file
+}
diff -urp /tmp/gmap.orig/gmap_location.module gmap/gmap_location.module
--- /tmp/gmap.orig/gmap_location.module	2008-03-06 21:17:46.000000000 +0100
+++ gmap/gmap_location.module	2008-03-30 00:44:44.000000000 +0100
@@ -1,5 +1,5 @@
 <?php
-/* $Id: gmap_location.module,v 1.26.2.55 2008/03/06 20:17:46 bdragon Exp $ */
+// $Id: gmap_location.module,v 1.26.2.55 2008/03/06 20:17:46 bdragon Exp $
 // vim:set ft=php:
 
 /**
@@ -19,7 +19,7 @@ function gmap_location_perm() {
 /**
  * Get the user map variable defaults.
  */
-function _gmap_location_user_map_defaults(){
+function _gmap_location_user_map_defaults() {
   return array(
     'macro' => '[gmap |id=usermap|center=40,0|zoom=3|width=100%|height=400px]',
     'header' => 'This map illustrates the extent of users of this website. Each marker indicates a user that has entered their locations.',
@@ -43,44 +43,37 @@ function _gmap_location_node_map_default
 /**
  * Implementation of hook_menu().
  */
-function gmap_location_menu($may_cache) {
+function gmap_location_menu() {
   $items = array();
-
-  if ($may_cache) {
-    $items[] = array(
-      'path' => 'map/user',
+    $items['map/user'] = array(
       'type' => MENU_NORMAL_ITEM,
-      'title' => t('User locations'),
-      'access' => user_access('show user map'),
-      'callback' => 'gmap_location_user_page',
+      'title' => 'User locations',
+      'access arguments' => array('show user map'),
+      'page callback' => 'gmap_location_user_page',
     );
-    $items[] = array(
-      'path' => 'map/user/load',
+    $items['map/user/load'] = array(
       'type' => MENU_CALLBACK,
-      'access' => user_access('show user map'),
-      'callback' => 'gmap_location_user_point',
+      'access arguments' => array('show user map'),
+      'page callback' => 'gmap_location_user_point',
     );
-    $items[] = array(
-      'path' => 'map/node',
+    $items['map/node'] = array(
       'type' => MENU_NORMAL_ITEM,
-      'title' => t('Node locations'),
-      'access' => user_access('show node map'),
-      'callback' => 'gmap_location_node_page',
+      'title' => 'Node locations',
+      'access arguments' => array('show node map'),
+      'page callback' => 'gmap_location_node_page',
     );
-    $items[] = array(
-      'path' => 'map/node/load',
+    $items['map/node/load'] = array(
       'type' => MENU_CALLBACK,
-      'access' => user_access('show node map'),
-      'callback' => 'gmap_location_node_point',
+      'access arguments' => array('show node map'),
+      'page callback' => 'gmap_location_node_point',
     );
-    $items[] = array(
-      'path' => 'admin/settings/gmap_location',
+    $items['admin/settings/gmap_location'] = array(
       'type' => MENU_NORMAL_ITEM,
-      'title' => t('GMap Location'),
-      'access' => user_access('administer site configuration'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('gmap_location_admin_settings'),
-      'description' => t('Configure GMap Location settings.'),
+      'title' => 'GMap Location',
+      'access arguments' => array('administer site configuration'),
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array('gmap_location_admin_settings'),
+      'description' => 'Configure GMap Location settings.',
     );
   }
   return $items;
@@ -165,7 +158,7 @@ function gmap_location_user_page() {
       }
     }
   }
-*/
+ */
 
   $element = array(
     '#type' => 'gmap',
@@ -193,6 +186,16 @@ function gmap_location_user_point() {
 }
 
 /**
+ * Implementation of hook_theme().
+ */
+function gmap_location_theme() {
+  return array(
+    'gmap_location_user_page' => array(
+    ),
+  );
+}
+
+/**
  * Theme function for displaying the user page.
  */
 function theme_gmap_location_user_page($header, $map, $footer) {
@@ -399,7 +402,7 @@ function theme_gmap_location_node_page($
  * Admin Settings Page
  *
  */
-function gmap_location_admin_settings() {
+function gmap_location_admin_settings($form, &$form_state) {
   $form['geocoding'] = array(
     '#type' => 'fieldset',
     '#title' => t('Geocode Locations'),
@@ -769,7 +772,7 @@ function gmap_location_map_add_node($bas
 //node type by creating a mytheme_gmapnodelabel
 
 function theme_image_gmapnodelabel($n) {
-  $out = '<a href="'. url('node/'. $n->nid) .'">'. check_plain($n->title) .'</a> <br>';
+  $out = '<a href="'. url('node/'. $n->nid) .'">'. check_plain($n->title) .'</a> <br/>';
   $out .= image_display($n, 'thumbnail');
   return $out;
 }
@@ -829,7 +832,7 @@ function gmap_location_user($op, &$edit,
               $user->uid);
           }
           else {
-            $lid = db_next_id('{location}_lid');
+            $lid = db_last_insert_id('{location}_lid');
             db_query("INSERT INTO {location} (eid, lid, type, latitude, longitude, source) VALUES (%d, %d, 'user', %s, %s, 1)",
               $user->uid, $lid,
               gmap_decimal($edit['gmap_location_latitude']),
@@ -885,7 +888,7 @@ function gmap_location_user($op, &$edit,
               '#description' => t('The address to be found on the map.  Enter an address and then hit "TAB" and the current location will be updated.  Please note that this address is not saved for the node, it is only used for finding a location.'),
             );
           }
-*/
+ */
         }
         return $form;
     }
diff -urp /tmp/gmap.orig/gmap_macro_builder.info gmap/gmap_macro_builder.info
--- /tmp/gmap.orig/gmap_macro_builder.info	2008-03-21 01:06:33.000000000 +0100
+++ gmap/gmap_macro_builder.info	2008-03-29 23:59:46.000000000 +0100
@@ -2,9 +2,11 @@
 name = GMap Macro Builder
 description = UI for building GMap macros.
 package = Location
-dependencies = gmap
+dependencies[] = gmap
+core = 6.x
+
 ; Information added by drupal.org packaging script on 2008-03-21
-version = "5.x-1.x-dev"
+version = "6.x-0.x-dev"
 project = "gmap"
 datestamp = "1206057993"
 
diff -urp /tmp/gmap.orig/gmap_macro_builder.module gmap/gmap_macro_builder.module
--- /tmp/gmap.orig/gmap_macro_builder.module	2007-12-21 19:06:01.000000000 +0100
+++ gmap/gmap_macro_builder.module	2008-04-22 09:20:28.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-/* $Id: gmap_macro_builder.module,v 1.1.2.9 2007/12/21 18:06:01 bdragon Exp $ */
+// $Id: gmap_macro_builder.module,v 1.1.2.9 2007/12/21 18:06:01 bdragon Exp $
 // vim:set ft=php:
 
 /**
@@ -12,8 +12,8 @@
 /**
  * Implemenation of hook_help().
  */
-function gmap_macro_builder_help($section) {
-  switch ($section) {
+function gmap_macro_builder_help($path, $arg) {
+  switch ($path) {
     case 'map/macro':
       return t('You can use this interface to create a map macro suitable for pasting into a node or any other place that accepts a GMap macro.');
   }
@@ -29,19 +29,16 @@ function gmap_macro_builder_perm() {
 /**
  * Implementation of hook_menu().
  */
-function gmap_macro_builder_menu($may_cache) {
-  if ($may_cache) {
-    $items = array();
-    $items[] = array(
-      'path' => 'map/macro',
-      'type' => MENU_NORMAL_ITEM,
-      'title' => t('Build a GMap macro'),
-      'access' => user_access('create macro'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => 'gmap_macro_builder_form',
-    );
-    return $items;
-  }
+function gmap_macro_builder_menu() {
+  $items = array();
+  $items['map/macro'] = array(
+    'type' => MENU_NORMAL_ITEM,
+    'title' => 'Build a GMap macro',
+    'access arguments' => array('create macro'),
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('gmap_macro_builder_form'),
+  );
+  return $items;
 }
 
 /**
@@ -52,7 +49,9 @@ function gmap_macro_builder_menu($may_ca
  *   Fields to hide from the map. (See code for details.)
  *   Suggestions for better ways of doing this welcome!
  */
-function gmap_macro_builder_form($settings = array(), $hide = array()) {
+function gmap_macro_builder_form($form_state) {
+  $settings = array();
+  $hide = array();
   $form['macroform'] = array(
     '#type' => 'fieldset',
     '#title' => t('Gmap macro creation'),
@@ -86,18 +85,18 @@ function gmap_macro_builder_form($settin
   gmap_widget_setup($form['macroform']['mapid'], 'mapid', 'macro_map');
 
   $form['macroform']['maptype'] = array(
-    '#type' => 'select', 
-    '#title' => t('Map type'), 
-    '#options' => drupal_map_assoc(array('Map', 'Satellite', 'Hybrid')), 
+    '#type' => 'select',
+    '#title' => t('Map type'),
+    '#options' => drupal_map_assoc(array('Map', 'Satellite', 'Hybrid')),
     '#default_value' => $defaults['maptype'],
     '#required' => FALSE,
   );
   gmap_widget_setup($form['macroform']['maptype'], 'maptype', 'macro_map');
 
   $form['macroform']['controltype'] = array(
-    '#type' => 'select', 
-    '#title' => t('Controls'), 
-    '#options' => drupal_map_assoc(array('None', 'Small', 'Large')), 
+    '#type' => 'select',
+    '#title' => t('Controls'),
+    '#options' => drupal_map_assoc(array('None', 'Small', 'Large')),
     '#required' => FALSE,
     '#default_value' => $defaults['controltype'],
   );
diff -urp /tmp/gmap.orig/gmap_markerinfo.inc gmap/gmap_markerinfo.inc
--- /tmp/gmap.orig/gmap_markerinfo.inc	2007-08-28 22:38:16.000000000 +0200
+++ gmap/gmap_markerinfo.inc	2008-03-30 00:39:26.000000000 +0100
@@ -1,5 +1,5 @@
 <?php
-/* $Id: gmap_markerinfo.inc,v 1.1.2.2 2007/08/28 20:38:16 bdragon Exp $ */
+// $Id: gmap_markerinfo.inc,v 1.1.2.2 2007/08/28 20:38:16 bdragon Exp $
 // vim:set ft=php:
 
 /**
diff -urp /tmp/gmap.orig/gmap_settings_ui.inc gmap/gmap_settings_ui.inc
--- /tmp/gmap.orig/gmap_settings_ui.inc	2007-12-22 00:00:29.000000000 +0100
+++ gmap/gmap_settings_ui.inc	2008-04-15 20:02:10.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-/* $Id: gmap_settings_ui.inc,v 1.1.2.19 2007/12/21 23:00:29 bdragon Exp $ */
+// $Id: gmap_settings_ui.inc,v 1.1.2.19 2007/12/21 23:00:29 bdragon Exp $
 // vim:set ft=php:
 
 /**
@@ -7,7 +7,7 @@
  * GMap settings form.
  */
 
-function _gmap_admin_settings() {
+function _gmap_admin_settings($form_state) {
   //note the same google api key variable name as in the googlemap module is used
   //note the name of the variable for center of the map is latlong although the format is actually longitude, latitude
 
@@ -18,10 +18,10 @@ function _gmap_admin_settings() {
   );
   if (!module_exists('keys_api')) {
     $form['initialization']['googlemap_api_key'] = array(
-      '#type' => 'textfield', 
+      '#type' => 'textfield',
       '#title' => t('Google map API key'),
-      '#default_value' => variable_get('googlemap_api_key', ''), 
-      '#size' => 50, 
+      '#default_value' => variable_get('googlemap_api_key', ''),
+      '#size' => 50,
       '#maxlength' => 255,
       '#description' => t('Your personal Googlemaps API key.  You must get this for each separate website at <a href="http://www.google.com/apis/maps/">Google Map API website</a>.'),
     );
@@ -120,7 +120,7 @@ function _gmap_admin_settings() {
 
   $form['gmap_default']['controltype'] = array(
     '#type' => 'select',
-    '#title' => t('Default control type'), 
+    '#title' => t('Default control type'),
     '#options' => array('None' => t('None'), 'Small' => t('Small'), 'Large' => t('Large')),
     '#default_value' => $defaults['controltype'],
   );
@@ -148,7 +148,7 @@ function _gmap_admin_settings() {
       '#default_value' => isset($defaults['behavior'][$k]) ? $defaults['behavior'][$k] : $v['default'],
       '#description' => isset($v['help']) ? $v['help'] : '',
     );
-    if ($v['internal']) {
+    if (!empty($v['internal'])) {
       $form['gmap_default']['behavior'][$k]['#disabled'] = TRUE;
       // Compensate for behaviors becoming internal after acquiring the wrong value.
       $form['gmap_default']['behavior'][$k]['#value'] = $v['default'];
@@ -189,13 +189,13 @@ function _gmap_admin_settings() {
   );
 
   $opts = variable_get('gmap_markermanager', array());
-  if (!is_array($opts['gmap'])) {
+  if (!isset($opts['gmap'])) {
     $opts['gmap'] = array();
   }
-  if (!is_array($opts['gmarkermanager'])) {
+  if (!isset($opts['gmarkermanager'])) {
     $opts['gmarkermanager'] = array();
   }
-  if (!is_array($opts['clusterer'])) {
+  if (!isset($opts['clusterer'])) {
     $opts['clusterer'] = array();
   }
 
@@ -351,5 +351,6 @@ function _gmap_admin_settings() {
     '#maxlength' => 500,
     '#description' => t('The gmap macro for the map to be used in the location.module for setting latitude and longitude.'),
   );
+
   return system_settings_form($form);
 }
diff -urp /tmp/gmap.orig/gmap_taxonomy.info gmap/gmap_taxonomy.info
--- /tmp/gmap.orig/gmap_taxonomy.info	2008-03-21 01:06:33.000000000 +0100
+++ gmap/gmap_taxonomy.info	2008-03-30 00:00:52.000000000 +0100
@@ -2,9 +2,12 @@
 name = GMap Taxonomy Markers
 description = Taxonomy based markers
 package = Location
-dependencies = gmap taxonomy
+dependencies[] = gmap
+dependencies[] = taxonomy
+core = 6.x
+
 ; Information added by drupal.org packaging script on 2008-03-21
-version = "5.x-1.x-dev"
+version = "6.x-0.x-dev"
 project = "gmap"
 datestamp = "1206057993"
 
diff -urp /tmp/gmap.orig/gmap_taxonomy.install gmap/gmap_taxonomy.install
--- /tmp/gmap.orig/gmap_taxonomy.install	2008-01-05 02:55:42.000000000 +0100
+++ gmap/gmap_taxonomy.install	2008-03-30 00:39:05.000000000 +0100
@@ -1,39 +1,85 @@
 <?php
-/* $Id: gmap_taxonomy.install,v 1.1.2.2 2008/01/05 01:55:42 bdragon Exp $ */
+// $Id: gmap_taxonomy.install,v 1.1.2.2 2008/01/05 01:55:42 bdragon Exp $
+
+
+/**
+ * Implementation of hook_schema().
+ */
+function gmap_taxonomy_schema() {
+  $schema['gmap_taxonomy_term'] = array(
+    'description' => t('The base table for gmap taxonomy.'),
+    'fields' => array(
+      'tid' => array(
+        'description' => t('The id of the term.'),
+        'type' => 'tid',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'marker' => array(
+        'description' => t('Marker'),
+        'type' => 'varchar',
+        'length' => 32,
+        'not null' => TRUE,
+        'default' => '',
+    ),
+    'primary key' => array('tid'),
+  );
+
+  $schema['gmap_taxonomy_node'] = array(
+    'description' => t('The base table for gmap taxonomy.'),
+    'fields' => array(
+      'nid' => array(
+        'description' => t('The id of the term.'),
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'vid' => array(
+        'description' => t('The id of the term.'),
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'tid' => array(
+        'description' => t('The id of the term.'),
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+      'marker' => array(
+        'description' => t('Marker'),
+        'type' => 'varchar',
+        'length' => 32,
+        'not null' => TRUE,
+        'default' => '',
+    ),
+    'indexes' => array(
+      'nid' => array('nid'),
+    ),
+    'primary key' => array('tid'),
+  );
+
+
+  return $schema;
+}
+
 
 /**
  * Implementation of hook_install().
  */
 function gmap_taxonomy_install() {
-  switch ($GLOBALS['db_type']) {
-    case 'mysql':
-    case 'mysqli':
-      db_query("CREATE TABLE {gmap_taxonomy_term} (
-        tid int(10) unsigned NOT NULL default '0',
-        marker varchar(32),
-        PRIMARY KEY tid(tid)
-        ) /*!40100 DEFAULT CHARACTER SET utf8 */");
-      db_query("CREATE TABLE {gmap_taxonomy_node} (
-        nid int(10) unsigned NOT NULL default '0',
-        vid int(10) unsigned NOT NULL default '0',
-        tid int(10) unsigned NOT NULL default '0',
-        marker varchar(32),
-        PRIMARY KEY vid(vid),
-        INDEX nid(nid)
-        ) /*!40100 DEFAULT CHARACTER SET utf8 */");
-      break;
-    case 'pgsql':
-      //@@@
-      break;
-  }
+  drupal_install_schema('gmap_taxonomy');
 }
 
 /**
  * Implementation of hook_uninstall().
  */
 function gmap_taxonomy_uninstall() {
-  db_query('DROP TABLE {gmap_taxonomy_node}');
-  db_query('DROP TABLE {gmap_taxonomy_term}');
+  drupal_uninstall_schema('gmap_taxonomy');
 }
 
 /**
@@ -42,18 +88,8 @@ function gmap_taxonomy_uninstall() {
  */
 function gmap_taxonomy_update_5001() {
   $ret = array();
-  // Add the new column.
-  switch($GLOBALS['db_type']) {
-    case 'mysql':
-    case 'mysqli':
-      $ret[] = update_sql("ALTER TABLE {gmap_taxonomy_node} ADD tid int(10) unsigned NOT NULL default '0' AFTER vid");
-      $ret[] = update_sql('TRUNCATE {gmap_taxonomy_node}');
-      // Useful for repopulating in bulk... Copy to hook_enable()?
-      $ret[] = update_sql("INSERT INTO {gmap_taxonomy_node} (nid, vid, tid, marker) (SELECT n.nid, n.vid, t.tid, g.marker FROM {node_revisions} n INNER JOIN {term_node} t ON n.nid = t.nid INNER JOIN {gmap_taxonomy_term} g ON t.tid = g.tid GROUP BY n.vid ORDER BY NULL)");
-      break;
-    case 'pgsql':
-      // This update will never be needed for pgsql, as it predates pgsql support.
-      break;
-  }
+  $ret[] = update_sql('TRUNCATE {gmap_taxonomy_node}');
+  // Useful for repopulating in bulk... Copy to hook_enable()?
+  $ret[] = update_sql("INSERT INTO {gmap_taxonomy_node} (nid, vid, tid, marker) (SELECT n.nid, n.vid, t.tid, g.marker FROM {node_revisions} n INNER JOIN {term_node} t ON n.nid = t.nid INNER JOIN {gmap_taxonomy_term} g ON t.tid = g.tid GROUP BY n.vid ORDER BY NULL)");
   return $ret;
-}
\ No newline at end of file
+}
diff -urp /tmp/gmap.orig/gmap_taxonomy.module gmap/gmap_taxonomy.module
--- /tmp/gmap.orig/gmap_taxonomy.module	2008-01-05 02:55:42.000000000 +0100
+++ gmap/gmap_taxonomy.module	2008-03-30 00:40:34.000000000 +0100
@@ -1,5 +1,5 @@
 <?php
-/* $Id: gmap_taxonomy.module,v 1.1.2.3 2008/01/05 01:55:42 bdragon Exp $ */
+// $Id: gmap_taxonomy.module,v 1.1.2.3 2008/01/05 01:55:42 bdragon Exp $
 // vim:set ft=php:
 
 /**
@@ -12,7 +12,7 @@
 /**
  * Implementation of hook_form_alter().
  */
-function gmap_taxonomy_form_alter($form_id, &$form) {
+function gmap_taxonomy_form_alter(&$form, &$form_state, $form_id) {
   if ($form_id == 'taxonomy_form_vocabulary') {
     $form['gmap_taxonomy'] = array(
       '#type' => 'fieldset',
@@ -100,7 +100,7 @@ function gmap_taxonomy_taxonomy($op, $ty
  * Implementation of hook_nodeapi().
  */
 function gmap_taxonomy_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
-  switch($op) {
+  switch ($op) {
     case 'insert':
     case 'update':
       $status = variable_get('gmap_taxonomy_vocabs', array());
@@ -160,4 +160,4 @@ function gmap_taxonomy_views_tables() {
     ),
   );
   return $tables;
-}
\ No newline at end of file
+}
diff -urp /tmp/gmap.orig/gmap_views.info gmap/gmap_views.info
--- /tmp/gmap.orig/gmap_views.info	2008-03-21 01:06:33.000000000 +0100
+++ gmap/gmap_views.info	2008-03-30 00:01:40.000000000 +0100
@@ -2,9 +2,13 @@
 name = GMap Views Integration
 description = Allows the use of GMap in Views.
 package = Location
-dependencies = gmap views location_views
+dependencies[] = gmap
+dependencies[] = views
+dependencies[] = location_views
+core = 6.x
+
 ; Information added by drupal.org packaging script on 2008-03-21
-version = "5.x-1.x-dev"
+version = "6.x-0.x-dev"
 project = "gmap"
 datestamp = "1206057993"
 
diff -urp /tmp/gmap.orig/gmap_views.module gmap/gmap_views.module
--- /tmp/gmap.orig/gmap_views.module	2007-12-30 17:21:45.000000000 +0100
+++ gmap/gmap_views.module	2008-03-30 00:40:45.000000000 +0100
@@ -1,5 +1,5 @@
 <?php
-/* $Id: gmap_views.module,v 1.1.2.22 2007/12/30 16:21:45 bdragon Exp $ */
+// $Id: gmap_views.module,v 1.1.2.22 2007/12/30 16:21:45 bdragon Exp $
 // vim:set ft=php:
 
 /**
@@ -55,6 +55,16 @@ function gmap_views_validate($type, $vie
 }
 
 /**
+ * Implementation of hook_theme().
+ */
+function gmap_view_theme() {
+  return array(
+    'views_view_gmap' => array(
+    ),
+  );
+}
+
+/**
  * Display the results of a view in a Google Map.
  */
 function theme_views_view_gmap($view, $results) {
@@ -243,4 +253,4 @@ function gmap_views_query_alter(&$query,
       $query->add_field('marker', 'gmap_taxonomy_node', 'gmap_taxonomy_marker');
     }
   }
-}
\ No newline at end of file
+}
