--- gmap_location.module_backup	2007-08-06 11:41:00.000000000 +0100
+++ gmap_location.module	2007-08-06 12:46:51.000000000 +0100
@@ -144,11 +144,15 @@ function gmap_location_user_page() {
  */
 
 
-function gmap_location_node_page($nid=null) {
+function gmap_location_node_page($nid=null,$macro) {
   if ($nid && $n=node_load($nid)){
     if (node_access('view',$n)) {
       $output .='<p>'.variable_get('gmap_node_map_header', t('This map illustrates the extent of nodes of this website. '))."</p>\n";
-      $thismap = gmap_parse_macro(variable_get('gmap_node_map', '[gmap|id=nodemap|center=30,0|zoom=2|width=100%|height=400px]'));
+      if($macro){ //use a specific macro, if set
+        $thismap = gmap_parse_macro($macro);
+      }else{ //global macro setting
+        $thismap = gmap_parse_macro(variable_get('gmap_node_map', '[gmap|id=nodemap|center=30,0|zoom=2|width=100%|height=400px]'));
+      }
       $thismap = gmap_location_node_map($n,$thismap,true);
       $output .= '<p>'.gmap_draw_map($thismap);
       return $output;
@@ -161,7 +165,11 @@ function gmap_location_node_page($nid=nu
   $output .='<p>'.variable_get('gmap_node_map_header', t('This map illustrates the extent of nodes of this website.'))."</p>\n";
 
   $result=db_query("SELECT oid, longitude, latitude FROM {location} WHERE (longitude!=0 OR latitude !=0) AND type='node'");
-  $thismap = gmap_parse_macro(variable_get('gmap_node_map', '[gmap|id=usermap|center=30,0|zoom=2|width=100%|height=400px]'));
+  if($macro){
+    $thismap = gmap_parse_macro($macro);
+  }else{
+    $thismap = gmap_parse_macro(variable_get('gmap_node_map', '[gmap|id=nodemap|center=30,0|zoom=2|width=100%|height=400px]'));
+  }
   if (empty($thismap['markers'])) {
     $thismap['markers']=array();
   }
