function hook_leaflet_default_map_formatter_alter in Leaflet 2.1.x
Same name and namespace in other branches
- 8 leaflet.api.php \hook_leaflet_default_map_formatter_alter()
- 2.0.x leaflet.api.php \hook_leaflet_default_map_formatter_alter()
Alter the Leaflet Map Default Formatter settings.
Allow other modules to add/alter the map js settings.
Parameters
array $map_settings: The array of geofield map element settings.
\Drupal\Core\Field\FieldItemListInterface $items: The field values to be rendered.
1 invocation of hook_leaflet_default_map_formatter_alter()
- LeafletDefaultFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ LeafletDefaultFormatter.php - This function is called from parent::view().
File
- ./
leaflet.api.php, line 152 - API documentation for Administration menu.
Code
function hook_leaflet_default_map_formatter_alter(array &$map_settings, FieldItemListInterface &$items) {
// Make custom alterations to $map_settings, eventually using the $items
// context.
}