| 1 |
<?php // $Id: geo_field.module,v 1.11 2009/02/24 16:47:50 vauxia Exp $ |
<?php // $Id: geo_field.module,v 1.12 2009/02/28 15:43:49 vauxia Exp $ |
| 2 |
|
|
| 3 |
/** |
/** |
| 4 |
* @file |
* @file |
| 36 |
'geo_field_wkt' => array( |
'geo_field_wkt' => array( |
| 37 |
'arguments' => array('element' => NULL), |
'arguments' => array('element' => NULL), |
| 38 |
), |
), |
|
'geo_formatter_default' => array( |
|
|
'arguments' => array('element' => NULL), |
|
|
'file' => 'geo_field.formatters.inc', |
|
|
), |
|
|
'geo_formatter_lat' => array( |
|
|
'arguments' => array('element' => NULL), |
|
|
'file' => 'geo_field.formatters.inc', |
|
|
), |
|
|
'geo_formatter_lon' => array( |
|
|
'arguments' => array('element' => NULL), |
|
|
'file' => 'geo_field.formatters.inc', |
|
|
), |
|
|
'geo_formatter_georss' => array( |
|
|
'arguments' => array('element' => NULL), |
|
|
'file' => 'geo_field.formatters.inc', |
|
|
), |
|
|
'geo_formatter_svg' => array( |
|
|
'arguments' => array('element' => NULL), |
|
|
'file' => 'geo_field.formatters.inc', |
|
|
), |
|
| 39 |
); |
); |
| 40 |
} |
} |
| 41 |
|
|
| 42 |
/** |
/** |
|
* Implementation of hook_field_formatter_info(). |
|
|
*/ |
|
|
function geo_field_formatter_info() { |
|
|
// TODO some other formatters: asKML, asGML, asGeoRSS, etc |
|
|
// TODO Can we do math on the field? area, length, etc? |
|
|
return array( |
|
|
'default' => array( |
|
|
'label' => t('Well Known Text'), |
|
|
'field types' => array_keys(geo_field_info()), |
|
|
), |
|
|
'lat' => array( |
|
|
'label' => t('Latitude'), |
|
|
'field types' => array_keys(geo_field_info()), |
|
|
), |
|
|
'lon' => array( |
|
|
'label' => t('Longitude'), |
|
|
'field types' => array_keys(geo_field_info()), |
|
|
), |
|
|
'georss' => array( |
|
|
'label' => t('GeoRSS'), |
|
|
'field types' => array_keys(geo_field_info()), |
|
|
), |
|
|
'svg' => array( |
|
|
'label' => t('SVG'), |
|
|
'field types' => array_keys(geo_field_info()), |
|
|
), |
|
|
); |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
| 43 |
* Implementation of hook_field_info(). |
* Implementation of hook_field_info(). |
| 44 |
*/ |
*/ |
| 45 |
function geo_field_info() { |
function geo_field_info() { |