Revision
1.6 -
(
show annotations)
(
download)
(
as text)
Tue Jun 9 04:22:43 2009 UTC
(5 months, 2 weeks ago)
by
vauxia
Branch:
MAIN
CVS Tags:
DRUPAL-6--1-0-ALPHA1
Changes since
1.5: +7 -11 lines
File MIME type: text/x-php
Allow CCK Formatter modules to define expected gis inputs ( point, linestring, etc) via hook_field_formatter_info()
1. A module declares CCK formatters using the usual syntax, but includes the
"gis input" key:
function geo_field_formatter_info(
return array(
'default' => array(
'label' => t('Well Known Text'),
'field types' => $field_types,
'gis types' => array('point', 'linestring', 'polygon'),
'gis input' => 'wkt',
),
'lat' => array(
'label' => t('Latitude'),
'field types' => $field_types,
'gis types' => array('point'),
'gis input' => 'array',
),
);
}
2. Geo's CCK modules retrieve data in WKB format
3. On nodeapi:view, geo performs an on-the-fly conversion from WKB to the
expected input format ( e.g. wkt, array, and so-on)
- Implemented this for all included formatters.