1 | <?php |
||
25 | class Bounds |
||
26 | { |
||
27 | /** |
||
28 | * @var Coordinate |
||
29 | */ |
||
30 | protected $northWest; |
||
31 | |||
32 | /** |
||
33 | * @var Coordinate |
||
34 | */ |
||
35 | protected $southEast; |
||
36 | |||
37 | /** |
||
38 | * @param Coordinate $northWest |
||
39 | * @param Coordinate $southEast |
||
40 | */ |
||
41 | public function __construct(Coordinate $northWest, Coordinate $southEast) |
||
46 | |||
47 | /** |
||
48 | * Getter |
||
49 | * |
||
50 | * @return Coordinate |
||
51 | */ |
||
52 | public function getNorthWest() |
||
56 | |||
57 | /** |
||
58 | * Getter |
||
59 | * |
||
60 | * @return Coordinate |
||
61 | */ |
||
62 | public function getSouthEast() |
||
66 | |||
67 | /** |
||
68 | * @return float |
||
69 | */ |
||
70 | public function getNorth() |
||
74 | |||
75 | /** |
||
76 | * @return float |
||
77 | */ |
||
78 | public function getSouth() |
||
82 | |||
83 | /** |
||
84 | * @return float |
||
85 | */ |
||
86 | public function getWest() |
||
90 | |||
91 | /** |
||
92 | * @return float |
||
93 | */ |
||
94 | public function getEast() |
||
98 | |||
99 | /** |
||
100 | * Calculates the center of this bounds object and returns it as a |
||
101 | * Coordinate instance. |
||
102 | * |
||
103 | * @return Coordinate |
||
104 | */ |
||
105 | public function getCenter() |
||
111 | |||
112 | /** |
||
113 | * @return float |
||
114 | */ |
||
115 | protected function getCenterLng() |
||
135 | } |
||
136 |