You are here

function leaflet_leaflet_map_info in Leaflet 2.1.x

Same name and namespace in other branches
  1. 8 leaflet.module \leaflet_leaflet_map_info()
  2. 7 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" rel="noopener noreferrer" target="_blank">OpenStreetMap</a> contributors',
          ],
        ],
      ],
    ],
  ];
}