public function Provider::reverse in Geocoder 7.2
Reverse geocode latitude and longitude.
Parameters
float $latitude: The latitude
float $longitude: The longitude
Return value
AddressCollection|FALSE
Overrides ProviderInterface::reverse
1 method overrides Provider::reverse()
- Random::reverse in src/
Plugin/ Geocoder/ Provider/ Random.php - Reverse geocode latitude and longitude.
File
- src/
Plugin/ Geocoder/ Provider.php, line 110 - Contains \Drupal\geocoder\Plugin\Geocoder\Provider.
Class
Namespace
Drupal\geocoder\Plugin\GeocoderCode
public function reverse($latitude, $longitude) {
$cid = $this
->getCacheCid($latitude, $longitude);
if ($value = $this
->cache_get($cid)) {
return $value;
}
try {
$value = $this
->getHandler()
->reverse($latitude, $longitude);
} catch (\Exception $e) {
throw $e;
}
$this
->cache_set($cid, $value);
return $value;
}