Function: getLocation
Parameters: array of user ids
Returns: array of longitude/latitudes

Description:

Returns the Longitude/Latitude of the users specified in the array of userIDs.

Usage:

<?php
include_once 'situated.class.php';
$obj = new Situated();
$userslocations = array();
$ids = $obj->getUsers();

//get the locations of these users’ homes (creepy!)
if(sizeof($ids) > 0){
foreach($ids as $id){
$location = $obj->getLocation(array($id->id));
if($location[$id->id] != ”){
array_push($userslocations, array(“name”=>$id->username,”latlong”=>$location[$id->id]));
}
}
}
?>
<html><body><pre><?print_r($userslocations);?></pre></body></html>
…..

Advertisements