Skip to content

Commit a68fdb8

Browse files
committed
Fix reverse() method in ArcGISOnline, Geonames, TomTom providers
1 parent 7caa152 commit a68fdb8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Geocoder/Provider/ArcGISOnline.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function geocode($address)
108108
*/
109109
public function reverse($latitude, $longitude)
110110
{
111-
$query = sprintf(self::REVERSE_ENDPOINT_URL, $this->protocol, $coordinates[1], $coordinates[0]);
111+
$query = sprintf(self::REVERSE_ENDPOINT_URL, $this->protocol, $longitude, $latitude);
112112
$json = $this->executeQuery($query);
113113

114114
if (property_exists($json, 'error')) {

src/Geocoder/Provider/Geonames.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function reverse($latitude, $longitude)
8181
throw new InvalidCredentials('No username provided.');
8282
}
8383

84-
$query = sprintf(self::REVERSE_ENDPOINT_URL, $coordinates[0], $coordinates[1], $this->getLimit(), $this->username);
84+
$query = sprintf(self::REVERSE_ENDPOINT_URL, $latitude, $longitude, $this->getLimit(), $this->username);
8585

8686
return $this->executeQuery($query);
8787
}

src/Geocoder/Provider/TomTom.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function reverse($latitude, $longitude)
8181
throw new InvalidCredentials('No Map API Key provided.');
8282
}
8383

84-
$query = sprintf(self::REVERSE_ENDPOINT_URL, $this->apiKey, $coordinates[0], $coordinates[1]);
84+
$query = sprintf(self::REVERSE_ENDPOINT_URL, $this->apiKey, $latitude, $longitude);
8585

8686
return $this->executeQuery($query);
8787
}

0 commit comments

Comments
 (0)