-
Notifications
You must be signed in to change notification settings - Fork 6
/
EGmap3MarkerOptions.php
146 lines (140 loc) · 3.62 KB
/
EGmap3MarkerOptions.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?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
*
*/
/**
* Map marker options.
* @link http://code.google.com/intl/fr/apis/maps/documentation/javascript/reference.html#MarkerOptions
*/
class EGmap3MarkerOptions extends EGmap3OptionBase
{
/**
* @var boolean If true, the marker receives mouse and touch events.
* Default value is true.
*/
public $clickable;
/**
* @var string Mouse cursor to show on hover
*/
public $cursor;
/**
* @var boolean If true, the marker can be dragged. Default value is false.
*/
public $draggable;
/**
* @var boolean If true, the marker shadow will not be displayed.
*/
public $flat;
/**
* @var mixed Icon for the foreground
*/
public $icon;
/**
* @var boolean If false, rendering will not be optimized for this marker.
*/
public $optimized;
/**
* @var boolean If false, disables raising and lowering the marker on drag.
* True by default.
*/
public $raiseOnDrag;
/**
* @var mixed Shadow image
*/
public $shadow;
/**
* @var EGmap3MarkerShape Image map region definition used for drag/click.
*/
public $shape;
/**
* @var string Rollover text
*/
public $title;
/**
* @var boolean If true, the marker is visible
*/
public $visible;
/**
* @var integer All markers are displayed on the map in order of their zIndex,
* with higher values displaying in front of markers with lower values.
* By default, markers are displayed according to their vertical position
* on screen, with lower markers appearing in front of markers further up
* the screen.
*/
public $zIndex;
public function getOptionChecks()
{
return array(
'shadow' => 'class:EGmap3MarkerShape',
);
}
}
/**
* A structure representing a Marker icon or shadow image.
*/
class EGmap3MarkerImage extends EGmap3OptionBase
{
/**
* @var EGmap3Point The position at which to anchor an image in correspondance to
* the location of the marker on the map. By default, the anchor is located
* along the center point of the bottom of the image.
*/
public $anchor;
/**
* @var EGmap3Point The position of the image within a sprite, if any.
* By default, the origin is located at the top left corner of the
* image (0, 0).
*/
public $origin;
/**
* @var EGmap3Size The size of the entire image after scaling, if any.
* Use this property to stretch/shrink an image or a sprite.
*/
public $scaledSize;
/**
* @var EGmap3Size The display size of the sprite or image. When using sprites,
* you must specify the sprite size. If the size is not provided,
* it will be set when the image loads.
*/
public $size;
/**
* @var string The URL of the image or sprite sheet.
*/
public $url;
public function getOptionChecks()
{
return array(
'anchor' => 'point',
'origin' => 'point',
'scaledSize' => 'size',
'size' => 'size',
);
}
}
/**
* This object defines the marker shape to use in determination of a marker's
* clickable region. The shape consists of two properties — type and coord —
* which define the general type of marker and coordinates specific to that
* type of marker.
*/
class EGmap3MarkerShape extends EGmap3OptionBase
{
/**
* @var array The format of this attribute depends on the value of the type
* and follows the w3 AREA coords specification found at
* @link http://www.w3.org/TR/REC-html40/struct/objects.html#adef-coords.
*/
public $coords;
/**
* @var string Describes the shape's type and can be circle, poly or rect.
*/
public $type;
}