You are here

function geolocation_data_property_info in Geolocation Field 7

Defines info for the properties of the geolocation field data structure.

1 call to geolocation_data_property_info()
geolocation_property_info_callback in ./geolocation.module
Callback to alter the property info of geolocation fields.

File

./geolocation.module, line 44
A geolocation field using the Field API.

Code

function geolocation_data_property_info() {

  // Build an array of basic property information for the geolocation field.
  $properties = array(
    'lat' => array(
      'label' => 'Latitude',
      'type' => 'decimal',
      'required' => TRUE,
      'description' => '',
      'getter callback' => 'entity_property_verbatim_get',
    ),
    'lng' => array(
      'label' => 'Longitude',
      'type' => 'decimal',
      'description' => '',
      'required' => TRUE,
      'getter callback' => 'entity_property_verbatim_get',
    ),
    'lat_sin' => array(
      'label' => 'the sine of latitude',
      'description' => '',
      'type' => 'decimal',
      'getter callback' => 'entity_property_verbatim_get',
    ),
    'lat_cos' => array(
      'label' => 'the cosine of latitude',
      'description' => '',
      'type' => 'decimal',
      'getter callback' => 'entity_property_verbatim_get',
    ),
    'lng_rad' => array(
      'label' => 'the radian longitude',
      'description' => '',
      'type' => 'decimal',
      'getter callback' => 'entity_property_verbatim_get',
    ),
    'latlng' => array(
      'label' => 'the latlng of point',
      'description' => '',
      'type' => 'string',
      'getter callback' => 'geolocation_return_latlon',
    ),
  );
  return $properties;
}