1 | <?php |
||
24 | class DivIcon extends Type |
||
25 | { |
||
26 | /** |
||
27 | * @var string the variable name. If not null, then the js icon creation script |
||
28 | * will be returned as a variable: |
||
29 | * |
||
30 | * ``` |
||
31 | * var iconName = L.divIcon({...}); |
||
32 | * // after it can be shared among other markers |
||
33 | * L.marker({icon: iconName, ...).addTo(map); |
||
34 | * L.marker({icon: iconName, ...).addTo(map); |
||
35 | * ``` |
||
36 | * If null, the js icon creation script will be returned to be used as constructor so it can be used within another |
||
37 | * constructor options: |
||
38 | * |
||
39 | * ``` |
||
40 | * L.marker({icon: L.icon({...}), ...).addTo(map); |
||
41 | * ``` |
||
42 | */ |
||
43 | public $name; |
||
44 | /** |
||
45 | * @var string a custom class name to assign to both icon and shadow images. Empty by default. |
||
46 | */ |
||
47 | public $className; |
||
48 | /** |
||
49 | * @var string a custom HTML code to put inside the div element, empty by default. |
||
50 | */ |
||
51 | public $html; |
||
52 | /** |
||
53 | * @var Point size of the icon image in pixels. |
||
54 | */ |
||
55 | private $_iconSize; |
||
56 | /** |
||
57 | * @var Point the coordinates of the "tip" of the icon (relative to its top left corner). The icon will be aligned so |
||
58 | * that this point is at the marker's geographical location. Centered by default if size is specified, also can be |
||
59 | * set in CSS with negative margins. |
||
60 | */ |
||
61 | private $_iconAnchor; |
||
62 | |||
63 | /** |
||
64 | * @param Point $iconSize |
||
65 | */ |
||
66 | 3 | public function setIconSize(Point $iconSize) |
|
70 | |||
71 | /** |
||
72 | * @return Point |
||
73 | */ |
||
74 | 3 | public function getIconSize() |
|
78 | |||
79 | /** |
||
80 | * @param Point $iconAnchor |
||
81 | */ |
||
82 | 3 | public function setIconAnchor(Point $iconAnchor) |
|
86 | |||
87 | /** |
||
88 | * @return Point |
||
89 | */ |
||
90 | 3 | public function getIconAnchor() |
|
94 | |||
95 | /** |
||
96 | * @return \yii\web\JsExpression the js initialization code of the object |
||
97 | */ |
||
98 | 3 | public function encode() |
|
108 | |||
109 | /** |
||
110 | * @return array the configuration options of the array |
||
111 | */ |
||
112 | 3 | public function getOptions() |
|
130 | } |
||
131 |