This repository was archived by the owner on Apr 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathleaflet.api.php
More file actions
65 lines (63 loc) · 2.1 KB
/
leaflet.api.php
File metadata and controls
65 lines (63 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* @file
* API documentation for Administration menu.
*/
/**
* Define one or map definitions to be used when rendering a map.
* leaflet_map_get_info() will grab every defined map, and the returned
* associative array is then passed to leaflet_render_map(), along with a
* collection of features.
*
* The settings array maps to the settings available
* to leaflet map object, http://leaflet.cloudmade.com/reference.html#map-properties
*
* Layers are the available base layers for the map and, if you enable the
* layer control, can be toggled on the map.
*
* @return array
*/
function hook_leaflet_map_info() {
return array(
'OSM Mapnik' => array(
'label' => 'OSM Mapnik',
'description' => t('Leaflet default map.'),
'settings' => array(
'dragging' => TRUE,
'touchZoom' => TRUE,
'scrollWheelZoom' => TRUE,
'doubleClickZoom' => TRUE,
'zoomControl' => TRUE,
'attributionControl' => TRUE,
'trackResize' => TRUE,
'fadeAnimation' => TRUE,
'zoomAnimation' => TRUE,
'closePopupOnClick' => TRUE,
'layerControl' => TRUE,
// 'minZoom' => 10,
// 'maxZoom' => 15,
// 'zoom' => 15, // set the map zoom fixed to 15
),
'layers' => array(
'earth' => array(
'urlTemplate' => 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
'options' => array(
'attribution' => 'OSM Mapnik'
)
),
),
// Uncomment the lines below to use a custom icon
// 'icon' => array(
// 'iconUrl' => '/sites/default/files/icon.png',
// 'iconSize' => array('x' => '20', 'y' => '40'),
// 'iconAnchor' => array('x' => '20', 'y' => '40'),
// 'popupAnchor' => array('x' => '-8', 'y' => '-32'),
// 'shadowUrl' => '/sites/default/files/icon-shadow.png',
// 'shadowSize' => array('x' => '25', 'y' => '27'),
// 'shadowAnchor' => array('x' => '0', 'y' => '27'),
// ),
// Enable and configure plugins in the plugins array.
'plugins' => array(),
),
);
}