You are here

public function Leaflet::getSettings in Geolocation Field 8.2

Same name and namespace in other branches
  1. 8.3 modules/geolocation_leaflet/src/Plugin/geolocation/MapProvider/Leaflet.php \Drupal\geolocation_leaflet\Plugin\geolocation\MapProvider\Leaflet::getSettings()

Provide map provider specific settings ready to handover to JS.

Parameters

array $settings: Current general map settings. Might contain unrelated settings as well.

Return value

array An array only containing keys defined in this plugin.

Overrides MapProviderBase::getSettings

1 call to Leaflet::getSettings()
Leaflet::alterRenderArray in modules/geolocation_leaflet/src/Plugin/geolocation/MapProvider/Leaflet.php
Alter render array.

File

modules/geolocation_leaflet/src/Plugin/geolocation/MapProvider/Leaflet.php, line 44

Class

Leaflet
Provides Leaflet.

Namespace

Drupal\geolocation_leaflet\Plugin\geolocation\MapProvider

Code

public function getSettings(array $settings) {
  $settings = parent::getSettings($settings);
  $settings['zoom'] = (int) $settings['zoom'];
  return $settings;
}