--- gmap.orig/gmap_taxonomy.module	2011-05-17 14:19:34.000000000 +0200
+++ gmap/gmap_taxonomy.module	2011-05-17 14:20:20.000000000 +0200
@@ -128,19 +129,14 @@
 
       $status = variable_get('gmap_taxonomy_vocabs', array());
       $marker = '';
-      if (isset($node->taxonomy) && is_array($node->taxonomy)) {
-        foreach ($node->taxonomy as $voc => $terms) {
-          if (isset($status[$voc]) && $status[$voc]) {
-            $t = $terms;
-            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);
-              if ($m = db_fetch_object($result)) {
-                $marker = $m->marker;
-                $markertid = $m->tid;
-              }
+      if (isset($node->taxonomy)) {
+        foreach ($node->taxonomy as $tid => $term) {
+          if (isset($status[$term->vid]) && $status[$term->vid]) {
+            $result = db_query('SELECT marker, tid FROM {gmap_taxonomy_term} WHERE tid = %d', $tid);
+            if ($m = db_fetch_object($result)) {
+              $marker = $m->marker;
+              $markertid = $tid;
+              break;
             }
           }
         }
