You are here

public static function GoogleMaps::getDefaultSettings in Geolocation Field 8.2

Same name and namespace in other branches
  1. 8.3 modules/geolocation_google_maps/src/Plugin/geolocation/MapProvider/GoogleMaps.php \Drupal\geolocation_google_maps\Plugin\geolocation\MapProvider\GoogleMaps::getDefaultSettings()

Provide a populated settings array.

Return value

array The settings array with the default map settings.

Overrides GoogleMapsProviderBase::getDefaultSettings

File

modules/geolocation_google_maps/src/Plugin/geolocation/MapProvider/GoogleMaps.php, line 55

Class

GoogleMaps
Provides Google Maps.

Namespace

Drupal\geolocation_google_maps\Plugin\geolocation\MapProvider

Code

public static function getDefaultSettings() {
  return array_replace_recursive(parent::getDefaultSettings(), [
    'minZoom' => static::$MINZOOMLEVEL,
    'maxZoom' => static::$MAXZOOMLEVEL,
    'rotateControl' => FALSE,
    'gestureHandling' => 'auto',
    'map_features' => [
      'marker_infowindow' => [
        'enabled' => TRUE,
      ],
      'control_locate' => [
        'enabled' => TRUE,
      ],
      'control_zoom' => [
        'enabled' => TRUE,
      ],
      'control_maptype' => [
        'enabled' => TRUE,
      ],
    ],
  ]);
}