? 623818.patch
Index: modules/openlayers_views/views/openlayers_views_style_map.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openlayers/modules/openlayers_views/views/openlayers_views_style_map.inc,v
retrieving revision 1.16.2.26
diff -C 5 -r1.16.2.26 openlayers_views_style_map.inc
*** modules/openlayers_views/views/openlayers_views_style_map.inc	1 Oct 2009 22:54:03 -0000	1.16.2.26
--- modules/openlayers_views/views/openlayers_views_style_map.inc	6 Nov 2009 00:30:41 -0000
***************
*** 324,333 ****
--- 324,334 ----
        $fields[$field_id] = $handler->definition;
        $fields[$field_id]['field_alias'] = $handler->field_alias;
      }
  
      // Build feature. We create one feature per field per row.
+     $this->view->row_index = 0;
      foreach ($records as $id => $record) {
        $feature = array();
        // In order for any kind of substitution/replacement
        // token/convert to link/trim/etc. functionality to work, we
        // have to call advanced_render on each field in the record
***************
*** 462,472 ****
--- 463,475 ----
  
        // Only add features with WKT data
        if (!empty($feature['wkt'])) {
          $features[] = $feature;
        }
+       $this->view->row_index++;
      }
+     unset($this->view->row_index);
      return $features;
    }
  
    /**
     * Renders views (map)
***************
*** 634,645 ****
      $output .= theme($this->theme_functions(), $this->view, $this->options, $map, $group_name);
      return $output;
    }
  }
  
- 
  function _openlayers_views_clean($dirty_name) {
    $cleaning = strip_tags($dirty_name);
    $cleaning = drupal_strtolower(str_replace(' ', '_', $cleaning));
    $cleaning = preg_replace("/[^a-z0-9_.]+/i", "", $cleaning);
    return $cleaning;
! }
\ No newline at end of file
--- 637,647 ----
      $output .= theme($this->theme_functions(), $this->view, $this->options, $map, $group_name);
      return $output;
    }
  }
  
  function _openlayers_views_clean($dirty_name) {
    $cleaning = strip_tags($dirty_name);
    $cleaning = drupal_strtolower(str_replace(' ', '_', $cleaning));
    $cleaning = preg_replace("/[^a-z0-9_.]+/i", "", $cleaning);
    return $cleaning;
! }
