--- gmap_taxonomy.module	2008-09-28 20:17:05.000000000 +0200
+++ gmap_taxonomy.new.module	2008-09-28 20:25:23.000000000 +0200
@@ -105,14 +105,15 @@ function gmap_taxonomy_nodeapi(&$node, $
       $status = variable_get('gmap_taxonomy_vocabs', array());
       $marker = '';
       if (isset($node->taxonomy) && is_array($node->taxonomy)) {
-        foreach ($node->taxonomy as $voc => $terms) {
+        foreach ($node->taxonomy as $term) {
+	  $voc=$term->vid;
           if (isset($status[$voc]) && $status[$voc]) {
-            $t = $terms;
+            $t = $term;
             if (!is_array($t)) {
               $t = array($t);
             }
             foreach ($t as $term) {
-              $result = db_query('SELECT marker, tid FROM {gmap_taxonomy_term} WHERE tid = %d', $term);
+              $result = db_query('SELECT marker, tid FROM {gmap_taxonomy_term} WHERE tid = %d', $term->tid);
               if ($m = db_fetch_object($result)) {
                 $marker = $m->marker;
                 $markertid = $m->tid;
