engine/lib/location.php File Reference

(r6838/r6794)

Go to the source code of this file.

Classes

interface  Locatable
 Define an interface for geo-tagging entities. More...

Packages

package  Elgg
 

Elgg CSS file.


Enumerations

enum  MILE
enum  KILOMETER

Functions

 elgg_geocode_location ($location)
 Encode a location into a latitude and longitude, caching the result.
 get_entities_in_area ($lat, $long, $radius, $type="", $subtype="", $owner_guid=0, $order_by="", $limit=10, $offset=0, $count=false, $site_guid=0, $container_guid)
 Return entities within a given geographic area.
 list_entities_location ($location, $type="", $subtype="", $owner_guid=0, $limit=10, $fullview=true, $viewtypetoggle=false, $navigation=true)
 List entities in a given location.
 list_entities_in_area ($lat, $long, $radius, $type="", $subtype="", $owner_guid=0, $limit=10, $fullview=true, $viewtypetoggle=false, $navigation=true)
 List items within a given geographic area.

Enumeration Type Documentation

enum KILOMETER

Definition at line 278 of file location.php.

enum MILE

Definition at line 277 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 module to be installed activated in order to work.

Parameters:
String $location The location, e.g. "London", or "24 Foobar Street, Gotham City"

Definition at line 54 of file location.php.

References $CONFIG, $return, execute_delayed_write_query(), get_data_row(), sanitise_string(), and trigger_plugin_hook().

get_entities_in_area ( lat,
long,
radius,
type = "",
subtype = "",
owner_guid = 0,
order_by = "",
limit = 10,
offset = 0,
count = false,
site_guid = 0,
container_guid 
)

Return entities within a given geographic area.

Parameters:
real $lat Latitude
real $long Longitude
real $radius The radius
string $type The type of entity (eg "user", "object" etc)
string $subtype The arbitrary subtype of the entity
int $owner_guid The GUID of the owning user
string $order_by The field to order by; by default, time_created desc
int $limit The number of entities to return; 10 by default
int $offset The indexing offset, 0 by default
boolean $count Set to true to get a count rather than the entities themselves (limits and offsets don't apply in this context). Defaults to false.
int $site_guid The site to get entities for. Leave as 0 (default) for the current site; -1 for all sites.
int|array $container_guid The container or containers to get entities from (default: all containers).
Returns:
array A list of entities.

Definition at line 104 of file location.php.

References $CONFIG, $container_guid, $count, $limit, $offset, $owner_guid, $query, $subtype, $type, get_access_sql_suffix(), get_data(), get_data_row(), get_subtype_id(), and sanitise_string().

Referenced by list_entities_in_area().

list_entities_in_area ( lat,
long,
radius,
type = "",
subtype = "",
owner_guid = 0,
limit = 10,
fullview = true,
viewtypetoggle = false,
navigation = true 
)

List items within a given geographic area.

Parameters:
real $lat Latitude
real $long Longitude
real $radius The radius
string $type The type of entity (eg "user", "object" etc)
string $subtype The arbitrary subtype of the entity
int $owner_guid The GUID of the owning user
int $limit The number of entities to display per page (default: 10)
true|false $fullview Whether or not to display the full view (default: true)
true|false $viewtypetoggle Whether or not to allow gallery view
true|false $pagination Display pagination? Default: true
Returns:
string A viewable list of entities

Definition at line 267 of file location.php.

References $count, $entities, $fullview, $limit, $offset, $owner_guid, $subtype, $type, elgg_view_entity_list(), get_entities_in_area(), and get_input().

list_entities_location ( location,
type = "",
subtype = "",
owner_guid = 0,
limit = 10,
fullview = true,
viewtypetoggle = false,
navigation = true 
)

List entities in a given location.

Parameters:
string $location Location
string $type The type of entity (eg "user", "object" etc)
string $subtype The arbitrary subtype of the entity
int $owner_guid The GUID of the owning user
int $limit The number of entities to display per page (default: 10)
true|false $fullview Whether or not to display the full view (default: true)
true|false $viewtypetoggle Whether or not to allow gallery view
true|false $pagination Display pagination? Default: true
Returns:
string A viewable list of entities

Definition at line 248 of file location.php.

References $fullview, $limit, $owner_guid, $subtype, $type, and list_entities_from_metadata().

 All Classes Namespaces Files Functions Variables Enumerations
Generated on Thu Sep 2 00:13:01 2010 for Elgg by  doxygen 1.6.3