This repository has been archived by the owner on Jun 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
farm_map.default_openlayers_maps.inc
112 lines (108 loc) · 3.2 KB
/
farm_map.default_openlayers_maps.inc
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?php
/**
* @file
* farm_map.default_openlayers_maps.inc
*/
/**
* Implements hook_default_openlayers_maps().
*/
function farm_map_default_openlayers_maps() {
$export = array();
$ol_map = new stdClass();
$ol_map->disabled = FALSE; /* Edit this to true to make a default ol_map disabled initially */
$ol_map->api_version = 1;
$ol_map->machine_name = 'farm_map_geofield';
$ol_map->name = 'Farm Map: Geofield Widget';
$ol_map->description = 'Farm map for use in Geofield widgets.';
$ol_map->factory_service = 'openlayers.Map:OLMap';
$ol_map->options = array(
'width' => 'auto',
'height' => '500px',
'view' => array(
'center' => array(
'lat' => 0,
'lon' => 0,
),
'rotation' => 0,
'zoom' => 2,
'minZoom' => 0,
'maxZoom' => 24,
),
'layers' => array(
0 => 'farm_map_geofield_widget_layer_group',
1 => 'farm_map_layer_group',
),
'controls' => array(
0 => 'openlayers_control_zoom',
1 => 'openlayers_control_scaleline',
2 => 'farm_map_control_layer_switcher',
3 => 'farm_map_control_geolocate',
/**
* @todo
* https://www.drupal.org/node/2543186
*/
// 4 => 'openlayers_control_fullscreen',
),
'interactions' => array(
0 => 'openlayers_interaction_doubleclickzoom',
1 => 'openlayers_interaction_dragpan',
2 => 'openlayers_interaction_mousewheelzoom',
3 => 'openlayers_interaction_pinchzoom',
),
'components' => array(
0 => 'farm_map_component_geofield_widget',
1 => 'farm_map_component_geofield_zoom_to_source',
2 => 'farm_map_component_progress_bar',
),
'renderer' => 'canvas',
);
$export['farm_map_geofield'] = $ol_map;
$ol_map = new stdClass();
$ol_map->disabled = FALSE; /* Edit this to true to make a default ol_map disabled initially */
$ol_map->api_version = 1;
$ol_map->machine_name = 'farm_map_geofield_formatter';
$ol_map->name = 'Farm Map: Geofield Formatter';
$ol_map->description = 'Farm map for use in Geofield formatters.';
$ol_map->factory_service = 'openlayers.Map:OLMap';
$ol_map->options = array(
'width' => 'auto',
'height' => '500px',
'view' => array(
'center' => array(
'lat' => 0,
'lon' => 0,
),
'rotation' => 0,
'zoom' => 2,
'minZoom' => 0,
'maxZoom' => 24,
),
'layers' => array(
0 => 'farm_map_geofield_formatter_layer_group',
1 => 'farm_map_layer_group',
),
'controls' => array(
0 => 'openlayers_control_zoom',
1 => 'openlayers_control_scaleline',
2 => 'farm_map_control_layer_switcher',
/**
* @todo
* https://www.drupal.org/node/2543186
*/
// 3 => 'openlayers_control_fullscreen',
),
'interactions' => array(
0 => 'openlayers_interaction_doubleclickzoom',
1 => 'openlayers_interaction_dragpan',
2 => 'openlayers_interaction_mousewheelzoom',
3 => 'openlayers_interaction_pinchzoom',
),
'components' => array(
0 => 'farm_map_component_geofield_zoom_to_source',
1 => 'farm_map_component_progress_bar',
),
'renderer' => 'canvas',
);
$export['farm_map_geofield_formatter'] = $ol_map;
return $export;
}