aequitas
asked this on February 19, 2011 17:42
How do I create a POI (3d object) who's location is dependent on the phone? 2 or 3 feet in front of the phone. I am sending out cards to advertise my layer art project (arsactual.com) and would like to include a qr code which brings up a 3d object that the user can use to hear the message, go to the website, and conect to the real layer. I guess it has to be on its own separate layer as there is no way to dismiss the object and proceed through the rest of the layer if i made it a poi on my full layer.
Comments latest first
Have a look at a PHP class that I created. It allows you to take the coordinates of the user and add calculate the lat/lon that is X meters away from the users under a given bearing (angle).
Not without pride I'd like to mention the class got awarded the PHPClasses.org innovation award ;)
The class is hosted at http://www.mennobieringa.nl/downloads/
Why not taking the lon and lat parameters from the request and return a poi with lat+y and lon+x
Where x and y are the distances in degrees.
I am using this code in my filters:
public function getPOIs(Filter $filter = NULL){
$result=parent::getPOIs($filter);
if(empty($filter)){
return $result;
}
foreach($result as $poi){
switch ($poi->id) {
case 1: //Norte
$poi->lat=$filter->lat+0.00004;
$poi->lon=$filter->lon;
break;
Hello everybody,
Try to check this example of SQL query which will update coordinates of POI with id =1 and consequently this POI should be displayed around your current position. This SQL query should be written in your php file before SQL query which retrieves POIs .
Example :
$sql1 = $db->prepare("
UPDATE `POI_Table`
SET lat=".$value['lat']."+0.00133,
lon=".$value['lon']."
WHERE id=1");
$sql1->execute();
Best Regards,
Alex
I'm also very interested in this. I have an application that requires POIs that are at the actual geo-coords but also has a version where they can be relative to the user if the user is not at the actual location. Any insight on how the Layar "Office Demo" does it. It appears to pick an initial location when the layer comes up and computes relative to that location from there on.
Cheers, Steve
the layar 'easy arrows' seems to do this already, but I'm also curious how this is done.