You are here

public function MapTypeStyle::getSettingsForm in Geolocation Field 8.3

Same name and namespace in other branches
  1. 8.2 modules/geolocation_google_maps/src/Plugin/geolocation/MapFeature/MapTypeStyle.php \Drupal\geolocation_google_maps\Plugin\geolocation\MapFeature\MapTypeStyle::getSettingsForm()

Provide a generic map settings form array.

Parameters

array $settings: The current map settings.

array $parents: Form specific optional prefix.

Return value

array A form array to be integrated in whatever.

Overrides MapFeatureBase::getSettingsForm

File

modules/geolocation_google_maps/src/Plugin/geolocation/MapFeature/MapTypeStyle.php, line 33

Class

MapTypeStyle
Provides map styling support.

Namespace

Drupal\geolocation_google_maps\Plugin\geolocation\MapFeature

Code

public function getSettingsForm(array $settings, array $parents) {
  $form['style'] = [
    '#title' => $this
      ->t('JSON styles'),
    '#type' => 'textarea',
    '#default_value' => $settings['style'],
    '#description' => $this
      ->t('A JSON encoded styles array to customize the presentation of the Google Map. See the <a href=":styling">Styled Map</a> section of the Google Maps website for further information.', [
      ':styling' => 'https://developers.google.com/maps/documentation/javascript/styling',
    ]),
  ];
  return $form;
}