You are here

function ip_geoloc_get_address in IP Geolocation Views & Maps 8

Same name and namespace in other branches
  1. 7 ip_geoloc_api.inc \ip_geoloc_get_address()

Returns the formatted address reverse-geocoded from the supplied lat,long.

See the CALLER BEWARE note at ip_geoloc_reverse_geocode().

Parameters

string|double $latitude: e.g. "-37.87" or -37.87

string|double $longitude: e.g. "144.98" or 144.98

string $lang: optional language specification as a two-letter code, e.g. 'ja' (Japanese).

Return value

string Formatted address component as received from Google or empty string.

File

./ip_geoloc_api.inc, line 468
API functions of IP geolocation module

Code

function ip_geoloc_get_address($latitude, $longitude, $lang = NULL) {
  return $google_address = ip_geoloc_reverse_geocode($latitude, $longitude, $lang) ? $google_address['formatted_address'] : '';
}