1 | <?php |
||
18 | class Location extends BaseElement { |
||
19 | |||
20 | /** |
||
21 | * @var LatLongValue |
||
22 | */ |
||
23 | private $coordinates; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | private $address; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | private $icon = ''; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | private $group = ''; |
||
39 | |||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | private $inlineLabel = ''; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | private $visitedIcon = ''; |
||
49 | |||
50 | 75 | public function __construct( LatLongValue $coordinates, string $title = '', string $text = '' ) { |
|
55 | |||
56 | 1 | public static function newFromLatLon( float $lat, float $lon ): self { |
|
57 | 1 | return new self( new LatLongValue( $lat, $lon ) ); |
|
58 | } |
||
59 | |||
60 | 7 | public function getCoordinates(): LatLongValue { |
|
63 | |||
64 | 16 | public function getJSONObject( string $defText = '', string $defTitle = '', string $defIconUrl = '', |
|
93 | |||
94 | 16 | public function hasIcon(): bool { |
|
97 | |||
98 | public function getIcon(): string { |
||
101 | |||
102 | 2 | public function setIcon( string $icon ) { |
|
105 | |||
106 | /** |
||
107 | * Returns the address corresponding to this location. |
||
108 | * If there is none, and empty sting is returned. |
||
109 | */ |
||
110 | 16 | public function getAddress(): string { |
|
117 | |||
118 | /** |
||
119 | * Returns whether Location is assigned to a group. |
||
120 | */ |
||
121 | 16 | public function hasGroup(): bool { |
|
124 | |||
125 | public function getGroup(): string { |
||
128 | |||
129 | 1 | public function setGroup( string $group ) { |
|
132 | |||
133 | 16 | public function hasInlineLabel(): bool { |
|
136 | |||
137 | 1 | public function getInlineLabel(): string { |
|
140 | |||
141 | 1 | public function setInlineLabel( string $label ) { |
|
144 | |||
145 | 16 | public function hasVisitedIcon(): bool { |
|
148 | |||
149 | public function getVisitedIcon(): string { |
||
152 | |||
153 | public function setVisitedIcon( string $visitedIcon ) { |
||
156 | |||
157 | } |
||
158 |
This method has been deprecated.