You are here

function hook_leaflet_default_widget_alter in Leaflet 2.1.x

Alter the Leaflet Map Default Widget settings.

Allow other modules to add/alter the map js settings.

Parameters

array $map_settings: The array of geofield map element settings.

Drupal\leaflet\Plugin\Field\FieldWidget\LeafletDefaultWidget $leafletDefaultWidget: The Leaflet default Widget.

1 invocation of hook_leaflet_default_widget_alter()
LeafletDefaultWidget::formElement in src/Plugin/Field/FieldWidget/LeafletDefaultWidget.php

File

./leaflet.api.php, line 115
API documentation for Administration menu.

Code

function hook_leaflet_default_widget_alter(array &$map_settings, LeafletDefaultWidget $leafletDefaultWidget) {

  // Make custom alterations to $map_settings, eventually using the $items
  // context.
}