You are here

function hook_leaflet_map_info_alter in Leaflet 8

Same name and namespace in other branches
  1. 2.1.x leaflet.api.php \hook_leaflet_map_info_alter()
  2. 2.0.x leaflet.api.php \hook_leaflet_map_info_alter()

Alters the map definitions defined by hook_leaflet_map_info().

The settings array maps to the settings available to the leaflet map object, http://leafletjs.com/reference.html#map-properties.

Parameters

array $map_info: Map info array.

2 invocations of hook_leaflet_map_info_alter()
LeafletService::leafletMapGetInfo in src/LeafletService.php
Get all available Leaflet map definitions.
leaflet_map_get_info in ./leaflet.module
Get all available Leaflet map definitions.

File

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

Code

function hook_leaflet_map_info_alter(array &$map_info) {

  // Set a custom iconUrl for the default map type.
  $map_info['OSM Mapnik']['icon']['iconUrl'] = '/sites/default/files/icon.png';
}