/[drupal]/contributions/modules/geo/modules/geo_data/includes/views/views_handler_field_geo_data.inc
ViewVC logotype

Diff of /contributions/modules/geo/modules/geo_data/includes/views/views_handler_field_geo_data.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.4 by vauxia, Thu Jun 11 17:13:51 2009 UTC revision 1.5 by vauxia, Thu Nov 19 22:31:39 2009 UTC
# Line 1  Line 1 
1  <?php //$Id: views_handler_field_geo_data.inc,v 1.3 2009/03/03 02:16:28 vauxia Exp $  <?php //$Id: views_handler_field_geo_data.inc,v 1.4 2009/06/11 17:13:51 vauxia Exp $
2    
3  class views_handler_field_geo_data extends content_handler_field_multiple {  class views_handler_field_geo_data extends content_handler_field_multiple {
4    function query() {    function query() {
# Line 9  class views_handler_field_geo_data exten Line 9  class views_handler_field_geo_data exten
9      }      }
10    
11      // geo_field_select will return the SRID, Envelope, Centroid, and WKB data.      // geo_field_select will return the SRID, Envelope, Centroid, and WKB data.
12      $alias = $this->ensure_my_table() .'_'. $this->field;      $func = geo('field_select', $geo_table . '.' . $this->real_field);
13      $func = geo('field_select', $this->real_field, NULL, $target);      $this->query->add_field('', $func, '', array('aggregate' => TRUE));
     $this->query->add_field('', $func, $alias, array('aggregate' => TRUE));  
14    
15      foreach ($this->content_field['geo_data_value'] as $field) {      foreach ($this->content_field['geo_data_value'] as $field) {
16        $this->query->add_field($geo_table, $field);        $this->query->add_field($geo_table, $field);
# Line 37  class views_handler_field_geo_data exten Line 36  class views_handler_field_geo_data exten
36    
37      $item['wkb'] = $values->{$geo_table.'_wkb'};      $item['wkb'] = $values->{$geo_table.'_wkb'};
38      $item['bbox'] = $values->{$geo_table.'_bbox'};      $item['bbox'] = $values->{$geo_table.'_bbox'};
39        $item['centroid'] = $values->{$geo_table.'_centroid'};
40    
41      foreach ($this->content_field['geo_data_value'] as $column) {      foreach ($this->content_field['geo_data_value'] as $column) {
42        $value = $values->{$geo_table.'_'. $column};        $value = $values->{$geo_table.'_'. $column};

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.3