1 | <?php namespace Cornford\Googlmapper\Models; |
||
8 | class Location implements ObjectableInterface { |
||
9 | |||
10 | /** |
||
11 | * Mapper instance. |
||
12 | * |
||
13 | * @var Mapper |
||
14 | */ |
||
15 | protected static $mapper; |
||
16 | |||
17 | /** |
||
18 | * Search. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $search; |
||
23 | |||
24 | /** |
||
25 | * Address. |
||
26 | * |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $address; |
||
30 | |||
31 | /** |
||
32 | * Type. |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $type; |
||
37 | |||
38 | /** |
||
39 | * Latitude. |
||
40 | * |
||
41 | * @var float |
||
42 | */ |
||
43 | protected $latitude; |
||
44 | |||
45 | /** |
||
46 | * Longitude. |
||
47 | * |
||
48 | * @var float |
||
49 | */ |
||
50 | protected $longitude; |
||
51 | |||
52 | /** |
||
53 | * Place Id. |
||
54 | * |
||
55 | * @var string |
||
56 | */ |
||
57 | protected $placeId; |
||
58 | |||
59 | /** |
||
60 | * Public constructor. |
||
61 | * |
||
62 | * @param array $parameters |
||
63 | */ |
||
64 | public function __construct(array $parameters = []) |
||
74 | |||
75 | /** |
||
76 | * Get the mapper instance. |
||
77 | * |
||
78 | * @return Mapper |
||
79 | */ |
||
80 | protected function getMapper() |
||
84 | |||
85 | /** |
||
86 | * Set the mapper instance. |
||
87 | * |
||
88 | * @param Mapper $mapper |
||
89 | * |
||
90 | * @return void |
||
91 | */ |
||
92 | protected function setMapper(Mapper $mapper) |
||
96 | |||
97 | /** |
||
98 | * Get the locations search. |
||
99 | * |
||
100 | * @return string |
||
101 | */ |
||
102 | public function getSearch() |
||
106 | |||
107 | /** |
||
108 | * Set the locations search. |
||
109 | * |
||
110 | * @param string $search |
||
111 | * |
||
112 | * @return void |
||
113 | */ |
||
114 | protected function setSearch($search) |
||
118 | |||
119 | /** |
||
120 | * Get the locations address. |
||
121 | * |
||
122 | * @return string |
||
123 | */ |
||
124 | public function getAddress() |
||
128 | |||
129 | /** |
||
130 | * Set the locations address. |
||
131 | * |
||
132 | * @param string $address |
||
133 | * |
||
134 | * @return void |
||
135 | */ |
||
136 | protected function setAddress($address) |
||
140 | |||
141 | /** |
||
142 | * Get the locations type. |
||
143 | * |
||
144 | * @return string |
||
145 | */ |
||
146 | public function getType() |
||
150 | |||
151 | /** |
||
152 | * Set the locations type. |
||
153 | * |
||
154 | * @param string $type |
||
155 | * |
||
156 | * @return void |
||
157 | */ |
||
158 | protected function setType($type) |
||
162 | |||
163 | /** |
||
164 | * Get the locations latitude. |
||
165 | * |
||
166 | * @return float |
||
167 | */ |
||
168 | public function getLatitude() |
||
172 | |||
173 | /** |
||
174 | * Set the locations latitude. |
||
175 | * |
||
176 | * @param float $latitude |
||
177 | * |
||
178 | * @return void |
||
179 | */ |
||
180 | protected function setLatitude($latitude) |
||
184 | |||
185 | /** |
||
186 | * Get the locations longitude. |
||
187 | * |
||
188 | * @return float |
||
189 | */ |
||
190 | public function getLongitude() |
||
194 | |||
195 | /** |
||
196 | * Set the locations longitude. |
||
197 | * |
||
198 | * @param float $longitude |
||
199 | * |
||
200 | * @return void |
||
201 | */ |
||
202 | protected function setLongitude($longitude) |
||
206 | |||
207 | /** |
||
208 | * Get the place id. |
||
209 | * |
||
210 | * @return string |
||
211 | * |
||
212 | * @return string |
||
213 | */ |
||
214 | public function getPlaceId() |
||
218 | |||
219 | /** |
||
220 | * Set the place id. |
||
221 | * |
||
222 | * @param string $placeId |
||
223 | * |
||
224 | * @return void |
||
225 | */ |
||
226 | protected function setPlaceId($placeId) |
||
230 | |||
231 | /** |
||
232 | * Create a new map from location. |
||
233 | * |
||
234 | * @param array $options |
||
235 | * |
||
236 | * @return Mapper |
||
237 | */ |
||
238 | public function map(array $options = []) |
||
242 | |||
243 | /** |
||
244 | * Create a new street view map from location. |
||
245 | * |
||
246 | * @param integer $heading |
||
247 | * @param integer $pitch |
||
248 | * @param array $options |
||
249 | * |
||
250 | * @return Mapper |
||
251 | */ |
||
252 | public function streetview($heading, $pitch, array $options = []) |
||
256 | |||
257 | } |
||
258 |