engine/lib/location.php File Reference

Go to the source code of this file.

Namespaces

namespace  Elgg::Core
 

Activate a plugin or plugins.


Enumerations

enum  MILE
enum  KILOMETER

Functions

 elgg_geocode_location ($location)
 Encode a location into a latitude and longitude, caching the result.
 elgg_get_entities_from_location (array $options=array())
 Return entities within a given geographic area.
 elgg_list_entities_from_location (array $options=array())
 Returns a viewable list of entities from location.

Enumeration Type Documentation

enum KILOMETER

Definition at line 157 of file location.php.

enum MILE

Definition at line 156 of file location.php.


Function Documentation

elgg_geocode_location ( location  ) 

Encode a location into a latitude and longitude, caching the result.

Works by triggering the 'geocode' 'location' plugin hook, and requires a geocoding plugin to be installed.

Parameters:
string $location The location, e.g. "London", or "24 Foobar Street, Gotham City"
Returns:
string|false

Definition at line 18 of file location.php.

elgg_get_entities_from_location ( array $  options = array()  ) 

Return entities within a given geographic area.

Also accepts all options available to elgg_get_entities().

See also:
elgg_get_entities
Parameters:
array $options Array in format:

latitude => FLOAT Latitude of the location

longitude => FLOAT Longitude of the location

distance => FLOAT/ARR ( latitude => float, longitude => float, ) The distance in degrees that determines the search box. A single float will result in a square in degrees.

Warning:
The Earth is round.
See also:
ElggEntity::setLatLong()
Returns:
mixed If count, int. If not count, array. false on errors.
Since:
1.8.0

Definition at line 80 of file location.php.

elgg_list_entities_from_location ( array $  options = array()  ) 

Returns a viewable list of entities from location.

Parameters:
array $options Options array
See also:
elgg_list_entities()
elgg_get_entities_from_location()
Returns:
string The viewable list of entities
Since:
1.8.0

Definition at line 150 of file location.php.

 All Classes Namespaces Files Functions Variables Enumerations
Generated on Sat May 18 00:01:23 2013 for Elgg by  doxygen 1.6.3