You are here

function leaflet_leaflet_map_info in Leaflet 8

Same name and namespace in other branches
  1. 7 leaflet.module \leaflet_leaflet_map_info()
  2. 2.1.x leaflet.module \leaflet_leaflet_map_info()
  3. 2.0.x leaflet.module \leaflet_leaflet_map_info()

Implements hook_leaflet_map_info().

File

./leaflet.module, line 65
Contains the leaflet.module file.

Code

function leaflet_leaflet_map_info() {
  return [
    'OSM Mapnik' => [
      'label' => 'OSM Mapnik',
      'description' => t('Leaflet default map.'),
      'settings' => [
        'dragging' => TRUE,
        'touchZoom' => TRUE,
        'scrollWheelZoom' => TRUE,
        'doubleClickZoom' => TRUE,
        'zoomControl' => TRUE,
        'attributionControl' => TRUE,
        'trackResize' => TRUE,
        'fadeAnimation' => TRUE,
        'zoomAnimation' => TRUE,
        'closePopupOnClick' => TRUE,
      ],
      'layers' => [
        'earth' => [
          'urlTemplate' => '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
          'options' => [
            'attribution' => '&copy; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors',
          ],
        ],
      ],
    ],
  ];
}