| 1 |
<?php
|
| 2 |
// $Id$
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* GMap views support.
|
| 7 |
*/
|
| 8 |
|
| 9 |
/**
|
| 10 |
* Implementation of hook_views_handlers().
|
| 11 |
*/
|
| 12 |
/*
|
| 13 |
function gmap_views_handlers() {
|
| 14 |
return array(
|
| 15 |
'info' => array(
|
| 16 |
'path' => drupal_get_path('module', 'gmap'),
|
| 17 |
),
|
| 18 |
'handlers' => array(
|
| 19 |
'gmap_plugin_style_gmap' => array(
|
| 20 |
'parent' => 'views_plugin_style',
|
| 21 |
),
|
| 22 |
),
|
| 23 |
);
|
| 24 |
}
|
| 25 |
|
| 26 |
*/
|
| 27 |
|
| 28 |
|
| 29 |
function template_preprocess_gmap_view_gmap(&$vars) {
|
| 30 |
$vars['map_object'] = $vars['rows'];
|
| 31 |
// Rows is actually our map object.
|
| 32 |
unset($vars['rows']);
|
| 33 |
|
| 34 |
// Theme the map.
|
| 35 |
$vars['map'] = theme('gmap', array('#settings' => $vars['map_object']));
|
| 36 |
}
|