forked from digitick/yii-jquery-gmap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEGmap3MapStyle.php
103 lines (98 loc) · 2.98 KB
/
EGmap3MapStyle.php
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
<?php
/**
* EGmap3 Yii extension
*
* Object oriented PHP interface to GMAP3 Javascript library for
* Google Maps.
*
* @copyright © Digitick <www.digitick.net> 2011
* @license GNU Lesser General Public License v3.0
* @author Ianaré Sévi
*
*/
/**
* A collection of selectors and stylers that define how the map should be styled.
* Selectors specify what map elements should be affected and stylers specify
* how those elements should be modified.
*
* @author Ianaré Sévi
*/
class EGmap3MapTypeStyle extends EGmap3OptionBase
{
/**
* @var string Selects the element type to which a styler should be applied.
* An element type distinguishes between the different representations of a
* feature. Optional; if elementType is not specified, the value is assumed
* to be 'all'.
*/
public $elementType;
/**
* @var string Selects the feature, or group of features, to which a styler
* should be applied. Optional; if featureType is not specified,
* the value is assumed to be 'all'.
*/
public $featureType;
/**
*
* @var EGmap3MapTypeStyler The style rules to apply to the selectors.
* The rules are applied to the map's elements in the order they are listed
* in this array.
*/
public $stylers;
public function getOptionChecks()
{
return array(
'elementType' => array('all', 'geometry', 'labels'),
'stylers' => 'arrayOfClass:EGmap3MapTypeStyler',
);
}
}
/**
* Affects how a map's elements will be styled.
* Each MapTypeStyler should contain one and only one key. If more than one key
* is specified in a single MapTypeStyler, all but one will be ignored.
* For example: var rule = {hue: '#ff0000'}.
*/
class EGmap3MapTypeStyler extends EGmap3OptionBase
{
/**
* @var float Modifies the gamma by raising the lightness to the given power.
* Valid values: Floating point numbers, [0.01, 10],
* with 1.0 representing no change.
*/
public $gamma;
/**
* @var string Sets the hue of the feature to match the hue of the color
* supplied. Note that the saturation and lightness of the feature is
* conserved, which means that the feature will not match the color supplied
* exactly. Valid values: An RGB hex string, i.e. '#ff0000'.
*/
public $hue;
/**
* @var boolean Inverts lightness. A value of true will invert the lightness
* of the feature while preserving the hue and saturation.
*/
public $invert_lightness;
/**
* @var integer Shifts lightness of colors by a percentage of the original
* value if decreasing and a percentage of the remaining value if increasing.
* Valid values: [-100, 100].
*/
public $lightness;
/**
* @var integer Shifts the saturation of colors by a percentage of the
* original value if decreasing and a percentage of the remaining value if
* increasing. Valid values: [-100, 100].
*/
public $saturation;
/**
* @var type Valid values: 'on', 'off' or 'simplifed'.
*/
public $visibility;
public function getOptionChecks()
{
return array(
'visibility' => array('on', 'off', 'simplifed'),
);
}
}