Skip to content

Commit

Permalink
Fix issue with calculating distance using google matrix
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com>
  • Loading branch information
sampoyigi committed Sep 22, 2023
1 parent 980b1b6 commit 2698e39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Geolite/Provider/GoogleProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ public function distance(DistanceInterface $distance): ?Model\Distance
{
$endpoint = array_get($this->config, 'endpoints.distance');
$url = $this->prependDistanceQuery($distance, sprintf($endpoint,
$distance->getFrom()->getLatitude(),
$distance->getFrom()->getLongitude(),
$distance->getTo()->getLatitude(),
$distance->getTo()->getLongitude()
$distance->getTo()->getLongitude(),
$distance->getFrom()->getLatitude(),
$distance->getFrom()->getLongitude()
));

try {
Expand Down

0 comments on commit 2698e39

Please sign in to comment.