function leaflet_widget_field_widget_info in Leaflet Widget for Geofield 7
Same name and namespace in other branches
- 7.2 leaflet_widget.module \leaflet_widget_field_widget_info()
Implements hook_field_widget_info().
File
- ./
leaflet_widget.module, line 6
Code
function leaflet_widget_field_widget_info() {
$widgets = array();
$base_layers = leaflet_widget_base_layers();
$urls = array_keys($base_layers);
$widgets['leaflet_widget_widget'] = array(
'label' => 'Leaflet.widget',
'description' => 'Provides a map powered by Leaflet and Leaflet.widget.',
'field types' => array(
'geofield',
),
'settings' => array(
'map' => array(
'base_url' => array_shift($urls),
'center' => array(
'lat' => 0.0,
'lng' => 0.0,
),
'auto_center' => TRUE,
'zoom' => 10,
),
),
'behaviors' => array(
'multiple values' => FIELD_BEHAVIOR_CUSTOM,
'default value' => FIELD_BEHAVIOR_NONE,
),
);
return $widgets;
}