Location: An API for working with locations.

Public API for the Location module.

Functions & methods

NameDescription
location_distance_betweenGiven two points in lat/lon form, returns the distance between them.
location_driving_directions_linkTakes two locations and tries to return a deep-link to driving directions.
location_get_postalcode_dataTry to extract the the Latitude and Longitude data from the postal code.
location_latlon_exactCurrently, this is not a priority until there is an implementable use for exact longitude, latitude coordinates for an location. The idea is that this call will eventually retrieve information through a web-service. Whereas location_latlon_rough()…
location_latlon_roughTakes an location and returns a "rough" latitude/longitude pair based on the postal code data available for the given country.
location_map_linkGet a deep-link to a mapping service such as Yahoo! Maps or MapPoint given an location. The call is delegated based on the 'country' value in the $location parameter.
_location_supported_countriesReturns an associative array of countries currently supported by the location system where -> the keys represent the two-letter ISO code and -> the values represent the English name of the country. The array is sorted the index (i.e., by the…

./location.inc, line 4