You are here

function geofield_field_widget_info in Geofield 7

Same name and namespace in other branches
  1. 7.2 geofield.widgets.inc \geofield_field_widget_info()

Implements hook_field_widget_info().

File

./geofield.widgets.inc, line 11
Provides field widget hooks for geofield module.

Code

function geofield_field_widget_info() {
  $widgets = array();

  // OpenLayers dependant widget
  if (module_exists('openlayers')) {
    $widgets['geofield_openlayers'] = array(
      'label' => t('Openlayers Map'),
      'field types' => array(
        'geofield',
      ),
    );
  }
  $widgets['geofield_wkt'] = array(
    'label' => t('Well Known Text (WKT)'),
    'field types' => array(
      'geofield',
    ),
  );
  $widgets['geofield_geojson'] = array(
    'label' => t('GeoJSON'),
    'field types' => array(
      'geofield',
    ),
  );
  $widgets['geofield_latlon'] = array(
    'label' => t('Latitude / Longitude'),
    'field types' => array(
      'geofield',
    ),
  );
  $widgets['geofield_bounds'] = array(
    'label' => t('Bounds'),
    'field types' => array(
      'geofield',
    ),
  );
  $widgets['geofield_textfields'] = array(
    'label' => t('All Textfields'),
    'field types' => array(
      'geofield',
    ),
  );
  $widgets['geofield_geolocation'] = array(
    'label' => 'HTML5 Geolocation',
    'field types' => array(
      'geofield',
    ),
  );
  return $widgets;
}