diff --git a/src/Entity/Offering.php b/src/Entity/Offering.php index dcbae52..2179f13 100644 --- a/src/Entity/Offering.php +++ b/src/Entity/Offering.php @@ -146,7 +146,7 @@ class Offering public function getCoordinate(): ?Coordinate { - $coordinate = new Coordinate($this->long, $this->lat); + $coordinate = new Coordinate($this->lat, $this->lng); return $coordinate; } diff --git a/src/Service/PlzToCoordinate.php b/src/Service/PlzToCoordinate.php index 2c6e9ea..e465d81 100644 --- a/src/Service/PlzToCoordinate.php +++ b/src/Service/PlzToCoordinate.php @@ -15,7 +15,7 @@ class PlzToCoordinate { try { $lat = $result->records[$i]->fields->geo_point_2d[0]; - $long = $result->records[$i]->fields->geo_point_2d[0]; + $long = $result->records[$i]->fields->geo_point_2d[1]; } catch (\Throwable $th) { // throw $th; }