1 | <?php |
||
28 | class PolyLine extends Layer |
||
29 | { |
||
30 | use PopupTrait; |
||
31 | |||
32 | /** |
||
33 | * @var LatLng[] |
||
34 | */ |
||
35 | private $_latLngs = []; |
||
36 | /** |
||
37 | * @var LatLngBounds |
||
38 | */ |
||
39 | private $_bounds; |
||
40 | |||
41 | /** |
||
42 | * @param array $latLngs |
||
43 | * |
||
44 | * @throws \yii\base\InvalidParamException |
||
45 | */ |
||
46 | 27 | public function setLatLngs(array $latLngs) |
|
56 | |||
57 | /** |
||
58 | * @return \dosamigos\leaflet\types\LatLng[] |
||
59 | */ |
||
60 | 21 | public function getLatLngs() |
|
64 | |||
65 | /** |
||
66 | * Returns the latLngs as array objects |
||
67 | * @return array |
||
68 | */ |
||
69 | 21 | public function getLatLngstoArray() |
|
77 | |||
78 | /** |
||
79 | * Returns the LatLngBounds of the polyline. |
||
80 | * @return LatLngBounds |
||
81 | */ |
||
82 | 18 | public function getBounds() |
|
86 | |||
87 | /** |
||
88 | * Sets bounds after initialization of the [[LatLng]] objects that compound the polyline. |
||
89 | */ |
||
90 | 21 | protected function setBounds() |
|
94 | |||
95 | /** |
||
96 | * Returns the javascript ready code for the object to render |
||
97 | * @return string |
||
98 | */ |
||
99 | 9 | public function encode() |
|
112 | |||
113 | } |
||
114 |