You are here

function hook_leaflet_map_prebuild_alter in Leaflet 7

Alters the js settings passed to the leaflet map.

This hook is called when the leaflet map is being rendered and attaching the client side javascript settings.

Parameters

$settings: A javascript settings array used for building the leaflet map.

See also

leaflet_map_get_info()

hook_leaflet_map_info()

1 invocation of hook_leaflet_map_prebuild_alter()
leaflet_build_map in ./leaflet.module
Attach Leaflet-required client files and return renderable array for a map.

File

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

Code

function hook_leaflet_map_prebuild_alter(&$settings) {
  $settings['mapId'] = 'my-map-id';
  $settings['features']['icon'] = 'my-icon-url';
}