@@ 45-53 (lines=9) @@ | ||
42 | ->setEast($point1->getDistance($point3, $distanceCalculator)) |
|
43 | ->setSouth($point3->getDistance($point2, $distanceCalculator)); |
|
44 | ||
45 | case CardinalDirection::CARDINAL_DIRECTION_SOUTHWEST: |
|
46 | $bounds = new Bounds( |
|
47 | new Coordinate($point2->getLat(), $point1->getLng()), |
|
48 | new Coordinate($point1->getLat(), $point2->getLng()) |
|
49 | ); |
|
50 | $point3 = new Coordinate($bounds->getSouth(), $bounds->getEast()); |
|
51 | return CardinalDirectionDistances::create() |
|
52 | ->setNorth($point3->getDistance($point2, $distanceCalculator)) |
|
53 | ->setEast($point1->getDistance($point3, $distanceCalculator)); |
|
54 | ||
55 | case CardinalDirection::CARDINAL_DIRECTION_NORTHEAST: |
|
56 | $bounds = new Bounds( |
|
@@ 55-63 (lines=9) @@ | ||
52 | ->setNorth($point3->getDistance($point2, $distanceCalculator)) |
|
53 | ->setEast($point1->getDistance($point3, $distanceCalculator)); |
|
54 | ||
55 | case CardinalDirection::CARDINAL_DIRECTION_NORTHEAST: |
|
56 | $bounds = new Bounds( |
|
57 | new Coordinate($point1->getLat(), $point2->getLng()), |
|
58 | new Coordinate($point2->getLat(), $point1->getLng()) |
|
59 | ); |
|
60 | $point3 = new Coordinate($bounds->getNorth(), $bounds->getWest()); |
|
61 | return CardinalDirectionDistances::create() |
|
62 | ->setSouth($point3->getDistance($point2, $distanceCalculator)) |
|
63 | ->setWest($point1->getDistance($point3, $distanceCalculator)); |
|
64 | ||
65 | case CardinalDirection::CARDINAL_DIRECTION_SOUTHEAST: |
|
66 | $bounds = new Bounds($point2, $point1); |