Index: geo.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/geo/geo.inc,v
retrieving revision 1.15
diff -u -r1.15 geo.inc
--- geo.inc	18 Jun 2009 01:24:11 -0000	1.15
+++ geo.inc	30 Jun 2009 23:21:48 -0000
@@ -67,7 +67,7 @@
   return " SRID($field) as {$alias}_srid, 
     AsBinary($field) AS {$alias}_wkb,
     AsBinary(Envelope($field)) AS {$alias}_bbox,
-    AsBinary(Centroid($field)) AS $alias}_centroid";
+    AsBinary(Centroid($field)) AS {$alias}_centroid";
 }
 
 function geo_query_operators($geo_type) {
Index: modules/geo_data/includes/views/views_handler_field_geo_data.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/geo/modules/geo_data/includes/views/views_handler_field_geo_data.inc,v
retrieving revision 1.4
diff -u -r1.4 views_handler_field_geo_data.inc
--- modules/geo_data/includes/views/views_handler_field_geo_data.inc	11 Jun 2009 17:13:51 -0000	1.4
+++ modules/geo_data/includes/views/views_handler_field_geo_data.inc	30 Jun 2009 23:21:48 -0000
@@ -9,9 +9,8 @@
     }
 
     // geo_field_select will return the SRID, Envelope, Centroid, and WKB data.
-    $alias = $this->ensure_my_table() .'_'. $this->field;
-    $func = geo('field_select', $this->real_field, NULL, $target);
-    $this->query->add_field('', $func, $alias, array('aggregate' => TRUE));
+    $func = geo('field_select', $geo_table . '.' . $this->real_field);
+    $this->query->add_field('', $func, '', array('aggregate' => TRUE));
 
     foreach ($this->content_field['geo_data_value'] as $field) {
       $this->query->add_field($geo_table, $field);
@@ -37,6 +36,7 @@
 
     $item['wkb'] = $values->{$geo_table.'_wkb'};
     $item['bbox'] = $values->{$geo_table.'_bbox'};
+    $item['centroid'] = $values->{$geo_table.'_centroid'};
 
     foreach ($this->content_field['geo_data_value'] as $column) {
       $value = $values->{$geo_table.'_'. $column};
