User: vauxia Branch: HEAD Date: Tue, 09 Jun 2009 04:22:44 +0000 Modified files: /modules/geo geo.module /modules/geo/includes geo.formatters.inc Log message: 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. Links: http://cvs.drupal.org/diff.php?path=contributions/modules/geo/geo.module&old... http://cvs.drupal.org/diff.php?path=contributions/modules/geo/includes/geo.f...