You are here

public static function GeolocationGoogleWidget::defaultSettings in Geolocation Field 8.3

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

Defines the default settings for this plugin.

Return value

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

Overrides GeolocationMapWidgetBase::defaultSettings

File

modules/geolocation_google_maps/src/Plugin/Field/FieldWidget/GeolocationGoogleWidget.php, line 36

Class

GeolocationGoogleWidget
Plugin implementation of the 'geolocation_googlegeocoder' widget.

Namespace

Drupal\geolocation_google_maps\Plugin\Field\FieldWidget

Code

public static function defaultSettings() {
  $settings = parent::defaultSettings();
  $settings[self::$mapProviderSettingsFormId]['map_features']['control_geocoder'] = [
    'enabled' => TRUE,
    'weight' => -100,
  ];
  $settings[self::$mapProviderSettingsFormId]['map_features']['control_recenter']['enabled'] = TRUE;
  $settings[self::$mapProviderSettingsFormId]['map_features']['control_locate']['enabled'] = TRUE;
  return $settings;
}