-
Notifications
You must be signed in to change notification settings - Fork 0
/
vojo_cdh_monterrey.module
88 lines (77 loc) · 2.29 KB
/
vojo_cdh_monterrey.module
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
<?php
/**
* Implements hook_jcarousel_skin_info().
*/
function vojo_cdh_monterrey_jcarousel_skin_info() {
$skins = array();
$skins['cdhmonterrey'] = array(
'title' => t('CDH Monterrey'),
'file' => 'jcarousel_skin/jcarousel-cdhmonterrey.css',
);
return $skins;
}
/** --------- OPENLAYERS ------------------------------------------------------ **/
/**
* Define custom styles for rendering the markers on a map.
* Implements hook_openlayers_styles().
* http://drupal.org/node/620602
*/
function vojo_cdh_monterrey_openlayers_styles() {
$styles = array();
$style = new stdClass();
$style->api_version = 1;
$style->name = 'vojo_cdh_monterrey_default';
$style->title = t('CDH Monterrey Default style');
$style->description = t('Basic default style for the CDH Monterrey website.');
$style->data = array(
'pointRadius' => 6,
'fillColor' => '#ffffff',
'strokeColor' => '#6CD5E2',
'strokeWidth' => 4,
'fillOpacity' => 0.6,
'strokeOpacity' => 0.6
);
$styles[ $style->name ] = $style;
$style = new stdClass();
$style->api_version = 1;
$style->name = 'vojo_cdh_monterrey_selected';
$style->title = t('CDH Monterrey Selected style');
$style->description = t('Basic selected style for the CDH Monterrey website.');
$style->data = array(
'pointRadius' => 15,
'fillColor' => '#ffffff',
'strokeColor' => '#6CD5E2',
'strokeWidth' => 10,
'fillOpacity' => 1.0,
'strokeOpacity' => 1.0
);
$styles[ $style->name ] = $style;
$style = new stdClass();
$style->api_version = 1;
$style->name = 'vojo_cdh_monterrey_temporary';
$style->title = t('CDH Monterrey Temporary style');
$style->description = t('Basic temporary style for the CDH Monterrey website.');
$style->data = array(
'pointRadius' => 8,
'fillColor' => '#ffffff',
'strokeColor' => '#6CD5E2',
'strokeWidth' => 6,
'fillOpacity' => 0.5,
'strokeOpacity' => 0.5
);
$styles[ $style->name ] = $style;
return $styles;
}
/**
* Tell ctools that we have custom marker styles.
* Implements hook_ctools_plugin_api().
* http://drupal.org/node/620602
*/
function vojo_cdh_monterrey_ctools_plugin_api($module, $api) {
if ($module == "openlayers") {
switch ($api) {
case 'openlayers_styles':
return array('version' => 1);
}
}
}