? .DS_Store
? cloudmade.js
Index: mapstraction.admin.inc
===================================================================
RCS file: mapstraction.admin.inc
diff -N mapstraction.admin.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ mapstraction.admin.inc	18 Feb 2009 19:55:44 -0000
@@ -0,0 +1,27 @@
+<?php
+
+function mapstraction_admin_settings() { 
+  $form['mapstraction_provider'] = array( 
+    '#type' => 'radios', 
+    '#title' => t('Mapstraction API'), 
+    '#description' => t('Select a mapstraction provider'), 
+    '#options' => array( 
+      t('gmap'), 
+      t('yahoo'), 
+      t('Microsoft'), 
+     // t('MapQuest'),  mapquest has 4 src files in the script url - we'll deal with this later
+      t('OpenLayers'), 
+      t('OpenStreetMap') 
+    ),
+    '#default_value' => variable_get('mapstraction_provider', 0) // defaults to gmap 
+  ); 
+
+  $form['#submit'] = array( 
+    'mapstraction_admin_settings_submit' => array($extra_info) 
+  ); 
+  return system_settings_form($form); 
+}
+
+function mapstraction_admin_settings_submit($form_id, &$form_values) {
+  variable_set('mapstraction_provider',$form_values['mapstraction_provider']);
+}
\ No newline at end of file
Index: mapstraction.apis.inc
===================================================================
RCS file: mapstraction.apis.inc
diff -N mapstraction.apis.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ mapstraction.apis.inc	18 Feb 2009 19:55:44 -0000
@@ -0,0 +1,96 @@
+<?php
+
+function mapstraction_google_settings_form($settings) {
+  $form = array();
+  $form['api_key'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Google Maps API Key'),
+    '#size' => 40,
+    '#maxlength' => 255,
+    '#default_value' => $settings['api_key'],
+  );
+  
+  return $form;
+}
+
+function mapstraction_google_render($settings) {
+  $src = 'http://maps.google.com/maps?file=api&v=2&key=' . $settings['api_key'];
+  return '<script type="text/javascript" src="' . $src . '"></script>';
+}
+
+function mapstraction_yahoo_settings_form($settings) {
+  $form = array();
+  $form['appid'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Yahoo Maps App ID'),
+    '#size' => 40,
+    '#maxlength' => 255,
+    '#default_value' => $settings['appid'],
+  );
+  
+  return $form;
+}
+
+function mapstraction_yahoo_render($settings) {
+  $src = 'http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=' . $settings['appid'];
+  return '<script type="text/javascript" src="' . $src . '"></script>';
+}
+
+function mapstraction_mapquest_render() {
+  $src = 'http://btilelog.beta.mapquest.com/tilelog/transaction?transaction=script&key=mjtd%7Clu6t210anh%2Crn%3Do5-labwu&itk=true&v=5.3.0_RC5&ipkg=controls1';
+  return '<script type="text/javascript" src="' . $src . '"></script>';
+}
+
+function mapstraction_microsoft_render() {
+  $src = 'http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6';
+  return '<script type="text/javascript" src="' . $src . '"></script>';
+}
+
+function mapstraction_freeearth_render() {
+  $src = 'http://freeearth.poly9.com/api.js';
+  return '<script type="text/javascript" src="' . $src . '"></script>';
+}
+
+function mapstraction_cloudmade_settings_form($settings) {
+  $form = array();
+  $form['api_key'] = array(
+    '#type' => 'textfield',
+    '#title' => t('CloudMade API Key'),
+    '#size' => 40,
+    '#maxlength' => 255,
+    '#default_value' => $settings['api_key'],
+  );
+  
+  $form['style_id'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Map Style ID'),
+    '#size' => 40,
+    '#maxlength' => 255,
+    '#default_value' => $settings['style_id'],
+  );
+  
+  return $form;
+}
+
+function mapstraction_cloudmade_render($settings, $id) {
+  $output = mapstraction_openlayers_render($settings);
+  $src = drupal_get_path('module', 'mapstraction') . '/cloudmade.js';
+  $output .= "<script type='text/javascript' src='$src'></script>\n";
+  $js = '
+      $(document).ready(function() {
+        var cloudmade = new OpenLayers.Layer.CloudMade("CloudMade", {
+          key: "' . $settings['api_key'] . '",
+      		styleId: ' . $settings['style_id'] . ',
+      	});
+      	Drupal.mapstraction["' . $id . '"].maps["openlayers"].addLayer(cloudmade);
+      });';
+  
+  drupal_add_js($js, 'inline', 'footer');	
+  
+  return $output;
+}
+
+function mapstraction_openlayers_render($settings) {
+  $src = 'http://openlayers.org/api/OpenLayers.js';
+  return "<script type='text/javascript' src='$src'></script>\n";
+}
\ No newline at end of file
Index: mapstraction.drupal.js
===================================================================
RCS file: mapstraction.drupal.js
diff -N mapstraction.drupal.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ mapstraction.drupal.js	18 Feb 2009 19:55:44 -0000
@@ -0,0 +1,21 @@
+$(document).ready(function() {
+  Drupal.mapstraction = [];
+  $(Drupal.settings.mapstraction).each(function(index) {
+    var id = 'mapstraction-' + this.viewName + '-' + this.currentDisplay;
+    Drupal.mapstraction[id] = new Mapstraction(id, this.apiName);
+    
+    // Set start point
+    var startPoint = new LatLonPoint(38.92, -77.04);
+    Drupal.mapstraction[id].setCenterAndZoom(startPoint, 13);
+    
+    // Set up controls
+    Drupal.mapstraction[id].addControls(this.controls);
+    
+    // Set up markers & info bubbles
+    $(this.markers).each(function(index) {
+      marker = new Marker(new LatLonPoint(this.lat, this.lon));
+      marker.setInfoBubble(this.title);
+      Drupal.mapstraction[id].addMarker(marker);
+    });
+  });
+});
Index: mapstraction.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mapstraction/mapstraction.info,v
retrieving revision 1.1
diff -u -u -p -r1.1 mapstraction.info
--- mapstraction.info	9 May 2008 11:26:14 -0000	1.1
+++ mapstraction.info	18 Feb 2009 19:55:44 -0000
@@ -1,11 +1,5 @@
 ; $Id: mapstraction.info,v 1.1 2008/05/09 11:26:14 liorkesos Exp $
 name = Mapstraction
-package = Location
-description = The Mapstraction module encompassed mapstraction which is a javascript libarary that lets; you abstract mapping services.
-
-
-; Information added by drupal.org packaging script on 2007-10-31
-version = "5.x-1.x-dev"
-project = "mapstraction"
-datestamp = "1193832285"
-
+core = 6.x
+description = Mapstraction allows you to display maps using a number of different mapping APIs.
+dependencies[] = views
\ No newline at end of file
Index: mapstraction.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mapstraction/mapstraction.module,v
retrieving revision 1.1
diff -u -u -p -r1.1 mapstraction.module
--- mapstraction.module	9 May 2008 11:26:14 -0000	1.1
+++ mapstraction.module	18 Feb 2009 19:55:44 -0000
@@ -1,107 +1,158 @@
 <?php
 // $Id: mapstraction.module,v 1.1 2008/05/09 11:26:14 liorkesos Exp $
 
-function mapstraction_menu($may_cache){
-  $items = array(); 
-  if ($may_cache) { 
-    $items[] = array( 
-      'path' => 'admin/settings/mapstraction', 
-      'title' => t('Mapstraction settings'), 
-      'description' => t('Mapstraction settings'), 
-      'callback' => 'drupal_get_form', 
-      'callback arguments' => array('mapstraction_admin_settings'), 
-      'access' => user_access('administer site configuration') 
-    ); 
-    $items[] = array(
-      'path' => 'mapstraction/node',
-      'type' => MENU_NORMAL_ITEM,
-      'title' => t('Node locations'),
-      'access' => TRUE,
-      'callback' => 'mapstraction_node_page',
-    );
-    return ($items);
-  }else {
-    $path = drupal_get_path('module', 'mapstraction');
-    drupal_add_js($path . '/mapstraction.js');
-  }
-} 
-
-function mapstraction_admin_settings() { 
-  $form['mapstraction_provider'] = array( 
-    '#type' => 'radios', 
-    '#title' => t('Mapstraction providers'), 
-    '#description' => t('Select a mapstraction provider'), 
-    '#options' => array( 
-      t('gmap'), 
-      t('yahoo'), 
-      t('Microsoft'), 
-     // t('MapQuest'),  mapquest has 4 src files in the script url - we'll deal with this later
-      t('OpenLayers'), 
-      t('OpenStreetMap') 
-    ),
-    '#default_value' => variable_get('mapstraction_provider', 0) // defaults to gmap 
+function mapstraction_menu(){
+  $items = array();
+  $items['admin/settings/mapstraction'] = array( 
+    'title' => t('Mapstraction settings'), 
+    'description' => t('Mapstraction settings'), 
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('mapstraction_admin_settings'), 
+    'access arguments' => array('administer site configuration'),
+    'file' => 'mapstraction.admin.inc',
   ); 
-
-  $form['#submit'] = array( 
-    'mapstraction_admin_settings_submit' => array($extra_info) 
-  ); 
-  return system_settings_form($form); 
+  
+  return ($items);
 }
 
+/**
+ * Implementation of hook_theme().
+ */
+function mapstraction_theme() {
+  return array(
+    'mapstraction_map' => array(
+      'arguments' => array('points' => array(),
+        'map' => array(), 'width' => 200, 'height' => 200),
+    ),
+  );
+}
 
-function mapstraction_admin_settings_submit($form_id, &$form_values) {
-  variable_set('mapstraction_provider',$form_values['mapstraction_provider']);
+/**
+ * Implementation of hook_views_api().
+ */
+function mapstraction_views_api() {
+  return array('api' => 2);
+}
+
+/**
+ * Implementation of hook_views_plugins().
+ */
+function mapstraction_views_plugins() {
+  return array(
+    'module' => 'mapstraction',
+    'style' => array(
+      'mapstraction' => array(
+        'title' => 'Mapstraction',
+        'help' => 'Displays nodes as a Maptraction map.',
+        'handler' => 'mapstraction_style_map',
+        'theme' => 'mapstraction_map',
+        'theme file' => 'mapstraction.module',
+        'uses fields' => TRUE,
+        'uses options' => TRUE,
+        'type' => 'normal',
+      ),
+    ),
+  );
 }
 
-function mapstraction_add_marker($nid,$lat,$long,$title='',$body=''){
-  $out = "var myPoint_$nid = new LatLonPoint($lat,$long);";
-// display the map centered on a latitude and longitude (Google zoom levels)
-  $out .= "mapstraction.setCenterAndZoom(myPoint_$nid, 10);";
-  $out .= "mapstraction.addControls({ pan: true, zoom: 'small', map_type: true });";
-// create a marker positioned at a lat/lon 
-  $out .= "my_marker_$nid = new Marker(myPoint_$nid);";
-  $out .= "my_marker_$nid.setIcon('icon.gif');";
-  $out .= "mapstraction.addMarker( new Marker( new LatLonPoint($lat,$long)));";
-// add a label to the marker
-  $out .= "my_marker_$nid.setLabel(\"$title\");";
-  $out .= "var text = \"$body\";";
-// add info bubble to the marker
-  $out .= "my_marker_$nid.setInfoBubble(text);";
-  $out .= "mapstraction.addMarker(my_marker_$nid);";
-//mapstraction.addEventListener('click', function(p) { alert('Mapstraction Event Handling - Mouse clicked at ' + p)  });
-// open the marker
-  $out .= "my_marker_$nid.openBubble();";
-//  $out .= "ufoo = function() { mapstraction.removeMarker(my_marker_$nid); }";
-  return $out;
+/**
+ * Provides information about the available mapping API's. API defiitions
+ * are stored in mapstraction.apis.inc.
+ * 
+ * @param $full
+ *   Whether to return the full API definition or just an array for use as the
+ *   value for a Form API #options.
+ */
+function mapstraction_apis($full = FALSE) {
+  $apis = array(
+    'google' => array(
+      'title' => t('Google Maps'),
+      'settings form' => 'mapstraction_google_settings_form',
+      'render' => 'mapstraction_google_render',
+    ),
+    'yahoo' => array(
+      'title' => t('Yahoo Maps'),
+      'settings form' => 'mapstraction_yahoo_settings_form',
+      'render' => 'mapstraction_yahoo_render',
+    ),
+    'mapquest' => array(
+      'title' => t('MapQuest'),
+      'render' => 'mapstraction_mapquest_render',
+    ),
+    'microsoft' => array(
+      'title' => t('Microsoft Virtual Earth'),
+      'render' => 'mapstraction_microsoft_render',
+    ),
+    'openlayers' => array(
+      'title' => t('OpenLayers'),
+      'render' => 'mapstraction_openlayers_render',
+    ),
+    'freeearth' => array(
+      'title' => t('FreeEarth'),
+      'render' => 'mapstraction_freeearth_render',
+    ),
+    'cloudmade' => array(
+      'title' => t('CloudMade'),
+      'api' => 'openlayers',
+      'settings form' => 'mapstraction_cloudmade_settings_form',
+      'render' => 'mapstraction_cloudmade_render',
+    ),
+  );
+  
+  if (!$full) {
+    foreach ($apis as $key => $api) {
+      $apis[$key] = $api['title'];
+    }
+  }
+  
+  return $apis;
 }
-function mapstraction_create_map(){
-  $provider = variable_get('mapstraction_provider',0);
-  $mapstraction_settings = array(
-    0 => array ('type'=>'google','src' => 'http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAYfI_xw3MwUbmAScWsa72VBSeiHve5IwsMuqAjxrbixTJ6mqDsxTZLbNcpVxq9PneOXm7mkBjelEQpw'),
-    1 => array ('type'=>'yahoo','src' => 'http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=MapstractionDemo'),  
-    2 => array ('type'=>'microsoft','src' => 'http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js'),  
-    3 => array ('type'=>'openlayers','src' => 'http://openlayers.org/api/OpenLayers.js'),  
-    4 => array ('type'=>'openstreetmap','src' => 'http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAYfI_xw3MwUbmAScWsa72VBSeiHve5IwsMuqAjxrbixTJ6mqDsxTZLbNcpVxq9PneOXm7mkBjelEQpw')  
+
+/**
+ * Theme a map from Mapstraction view.
+ */
+function theme_mapstraction_map($view, $options, $rows) {
+  drupal_add_js(drupal_get_path('module', 'mapstraction') . '/mapstraction.js');
+  drupal_add_js(drupal_get_path('module', 'mapstraction') . '/mapstraction.drupal.js');
+
+  $api_name = $view->style_plugin->options['api'];
+  $apis = mapstraction_apis(TRUE);
+  $api = $apis[$api_name];
+  
+  // Allow the API definition to override the API name.
+  $api_settings = $options['api_settings'][$api_name];
+  $api_name = $api['api'] ? $api['api'] : $api_name;
+  
+  // Clean up controls for JS
+  foreach ($options['controls'] as $control => $value) {
+    if ($control == 'zoom') {
+      $controls[$control] = $value;
+    }
+    elseif ($value) {
+      $controls[$control] = TRUE;
+    }
+  }
+  
+  $map = array(
+    'viewName' => $view->name,
+    'currentDisplay' => $view->current_display,
+    'apiName' => $api_name,
+    'markers' => $view->style_plugin->map_points($rows),
+    'controls' => $controls,
   );
 
-  $out = "<!-- HTML Map element - the size must be specified here, or in the CSS -->";
-  $out .= '<div id="mapstraction" style="width: 400px; height: 400px;"></div>';
-  $out .= '<!-- Map Provider & Mapstraction Javascript includes -->';
-  $out .= '<script type="text/javascript" src="' .$mapstraction_settings[$provider]['src'] . '"></script>'; // *** yahoo ***
-  $out .= '<script type="text/javascript" src="mapstraction.js"></script>';
-  $out .= '<script type="text/javascript">';
-// initialize the map with your choice of API
-  $out .= "var mapstraction = new Mapstraction('mapstraction','" . $mapstraction_settings[$provider]['type'] . "');";
-  return ($out);
-}
+  // Add the map to Drupal.settings object in JS.
+  drupal_add_js(array('mapstraction' => array($map)), 'setting');
+  
+  // Run API-specific rendering code
+  $id = 'mapstraction-' . $view->name . '-' . $view->current_display;
+  module_load_include('inc', 'mapstraction', 'mapstraction.apis');
+  if (function_exists($api['render'])) {
+    $output = $api['render']($api_settings, $id);
+  }
+  
+  list($width, $height) = explode('x', $options['dimensions']);
+  $output .= '<div id="' . $id . '" style="width: ' . $width . 'px; height: ' . $height . 'px;"></div>';
 
-function mapstraction_close_map(){
-  $out = '</script>';
-  return $out;
-}
-function mapstraction_node_page(){
-  $out .= mapstraction_create_map();
-  $out .= mapstraction_add_marker(6,"31.47","35.13");
-  $out .=  mapstraction_close_map();
-  return $out;  
-}
+  return $output;
+}
\ No newline at end of file
Index: mapstraction_style_map.inc
===================================================================
RCS file: mapstraction_style_map.inc
diff -N mapstraction_style_map.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ mapstraction_style_map.inc	18 Feb 2009 19:55:44 -0000
@@ -0,0 +1,132 @@
+<?php
+class mapstraction_style_map extends views_plugin_style {
+  function option_definition() {
+    $options['dimensions'] = array('default' => '600x400');
+    $this->options['controls'] = array();
+    
+    return $options;
+  }
+  
+  function options_form(&$form, &$form_state) {
+    $form['api'] = array(
+      '#type' => 'select',
+      '#title' => t('Mapping API'),
+      '#description' => t('Select the Mapstraction API to use for this view.'),
+      '#options' => mapstraction_apis(),
+      '#default_value' => $this->options['api'],
+    );
+    
+    foreach (mapstraction_apis(TRUE) as $key => $api) {
+      module_load_include('inc', 'mapstraction', 'mapstraction.apis');
+      if (function_exists($api['settings form'])) {
+        $form['api_settings'][$key] = $api['settings form']($this->options['api_settings'][$key]);
+      }
+    }
+    
+    $form['dimensions'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Dimensions'),
+      '#size' => 10,
+      '#maxlength' => 255,
+      '#default_value' => $this->options['dimensions'],
+    );
+
+    $form['controls'] = array(
+      '#type' => 'checkboxes',
+      '#title' => t('Controls'),
+      '#description' => t('Select which controls should be displayed on the map.'),
+      '#options' => array(
+        'pan' => t('Pan'),
+        'overview' => t('Overview'),
+        'scale' => t('Scale'),
+        'map_type' => t('Map type')),
+      '#default_value' => $this->options['controls'],
+    );
+    
+    $form['zoom_control'] = array(
+      '#type' => 'select',
+      '#title' => t('Zoom Control'),
+      '#options' => array(
+        0 => t('None'),
+        'large' => t('Large'),
+        'small' => t('Small'),
+      ),
+      '#default_value' => $this->options['controls']['zoom'],
+    );
+    
+    $handlers = $this->display->handler->get_handlers('field');
+    if (empty($handlers)) {
+      $form['error_markup'] = array(
+        '#value' => t('You need at least one field before you can configure your field settings'),
+        '#prefix' => '<div class="error form-item description">',
+        '#suffix' => '</div>',
+      );
+    }
+    else {
+      $field_names[$field] = array('' => '--');
+      foreach ($handlers as $field => $handler) {
+        if ($label = $handler->label()) {
+          $field_names[$field] = $label;
+        }
+        else {
+          $field_names[$field] = $handler->ui_name();
+        }
+      }
+      $field_options = array(
+        'title' => t('Title'),
+        'latitude' => t('Latitude'),
+        'longitude' => t('Longitude'),
+        'class' => t('Class'),
+      );
+      $form['fields'] = array(
+        '#type' => 'fieldset',
+        '#title' => 'Field usage',
+        '#description' => t('Select the fields that contain the latitude,
+                            longitude and title of each point. If selected, the
+                            class field will be used to apply a class to each 
+                            point. Remaining fields will be available in the 
+                            hidden "content" region of the point.'),
+      );
+      foreach ($field_options as $k => $v) {
+        $form['fields'][$k] = array(
+          '#type' => 'select',
+          '#title' => $v,
+          '#options' => $field_names,
+          '#default_value' => $this->options['fields'][$k],
+          '#required' => ($k == 'class' ? FALSE : TRUE),
+        );
+      }
+    }
+  }
+  
+  function options_submit($form, &$form_state) {
+    $form_state['values']['style_options']['controls']['zoom'] = $form_state['values']['style_options']['zoom_control'];
+    unset($form_state['values']['style_options']['zoom_control']);
+  }
+
+  function map_points($rows) {
+    $points = array();
+    foreach ($rows as $id => $row) {
+      $point = array('href' => 'node/'. $row->nid, 'nid' => $row->nid);
+      foreach ($this->view->field as $key => $field) {
+        if ($key == $this->options['fields']['title']) {
+          $point['title'] = $field->theme($row);
+        }
+        elseif ($key == $this->options['fields']['latitude']) {
+          $point['lat'] = $field->theme($row);
+        }
+        elseif ($key == $this->options['fields']['longitude']) {
+          $point['lon'] = $field->theme($row);
+        }
+        elseif ($key == $this->options['fields']['class']) {
+          $point['attributes']['class'] = $this->map_point_class($field->theme($row));
+        }
+        else {
+          $point['content'] .= $field->theme($row);
+        }
+      }
+      $points[] = $point;
+    }
+    return $points;
+  }
+}
\ No newline at end of file
Index: mapstraction_views.info
===================================================================
RCS file: mapstraction_views.info
diff -N mapstraction_views.info
--- mapstraction_views.info	9 May 2008 11:26:14 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
-; $Id: mapstraction_views.info,v 1.1 2008/05/09 11:26:14 liorkesos Exp $
-name = Mapstraction Views
-package = Location
-description = The Mapstraction views module provides views support and the mapstraction views style.
-dependencies = views location_views
-; Information added by drupal.org packaging script on 2007-10-31
-version = "5.x-1.x-dev"
-project = "mapstraction_views"
-
-
Index: mapstraction_views.module
===================================================================
RCS file: mapstraction_views.module
diff -N mapstraction_views.module
--- mapstraction_views.module	9 May 2008 11:26:14 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,46 +0,0 @@
-<?php
-
-/**
- * Implementation of hook_views_style_plugins().
- */
-function mapstraction_views_views_style_plugins() {
-  return array(
-    'mapstraction' => array(
-      'name' => t('Mapstraction View'),
-      'theme' => 'views_view_mapstraction',
-      'needs_fields' => true,
-      'validate' => 'mapstractions_views_validate',
-    )
-  );
-}
-
-
-/**
- * Validate a Mapstraction View.
- * Mapstracition Views requires one of the following:
- * - Location: Lat and Location: Lon
- * - Two columns, one titled t('Latitude'), one titled t('Longitude')
- * - A module that can transform a field into lat, long coordinates
- */
-function mapstraction_views_validate($type, $view, $form) {
-  $ids = _gmap_views_find_coords_ids($view);
-  if (!($ids['lat'] && $ids['lon']) && !(isset($ids['module']))) {
-    form_error($form["$type-info"][$type .'_type'],
-              t('GMap View requires: either "Location: Latitude" and "Location: Longitude" or a field titled "Latitude" and a field titled "Longitude"'));
-  }
-  return views_ui_plugin_validate_list($type, $view, $form);
-}
-
-function theme_views_view_mapstraction($view, $results){
-	$fields = _views_get_fields();
-  // find the ids of the column we want to use
-//  $point_ids = _mapstraction_views_find_coords_ids($view);
-  $out = mapstraction_create_map();
-  foreach( $results as $marker){
-    $title = $marker->node_title? $marker->node_title:'Add title field to view to replace this  text'; 
-    $out .= mapstraction_add_marker($marker->nid,$marker->location_latitude,$marker->location_longitude,$title);
-    }
-    $out .=  mapstraction_close_map();
-    return $out;
-}
-
