You are here

public static function GeofieldMapWidget::defaultSettings in Geofield Map 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldWidget/GeofieldMapWidget.php \Drupal\geofield_map\Plugin\Field\FieldWidget\GeofieldMapWidget::defaultSettings()

Defines the default settings for this plugin.

Return value

array A list of default settings, keyed by the setting name.

Overrides GeofieldLatLonWidget::defaultSettings

1 call to GeofieldMapWidget::defaultSettings()
GeofieldMapWidget::settingsForm in src/Plugin/Field/FieldWidget/GeofieldMapWidget.php
Returns a form to configure settings for the widget.

File

src/Plugin/Field/FieldWidget/GeofieldMapWidget.php, line 202

Class

GeofieldMapWidget
Plugin implementation of the 'geofield_map' widget.

Namespace

Drupal\geofield_map\Plugin\Field\FieldWidget

Code

public static function defaultSettings() {
  return [
    'default_value' => [
      'lat' => '0',
      'lon' => '0',
    ],
    'map_library' => 'gmap',
    'map_google_api_key' => '',
    'map_google_places' => [
      'places_control' => FALSE,
      'places_additional_options' => '',
    ],
    'map_dimensions' => [
      'width' => '100%',
      'height' => '450px',
    ],
    'map_type_google' => 'roadmap',
    'map_type_leaflet' => 'OpenStreetMap_Mapnik',
    'map_type_selector' => TRUE,
    'zoom_level' => 5,
    'zoom' => [
      'start' => 6,
      'focus' => 12,
      'min' => 1,
      'max' => 22,
    ],
    'click_to_find_marker' => FALSE,
    'click_to_place_marker' => FALSE,
    'geoaddress_field' => [
      'field' => '0',
      'hidden' => FALSE,
      'disabled' => TRUE,
    ],
  ] + parent::defaultSettings();
}