コード例 #1
0
 * 
 * @abstract	This tutorial will create a simple scavenger hunt. The user is provided with several markings in his environment. Once he is close to one of those,
 * 				he/she can hit the scan button and scan the glue man to find a treasure. 
 * 				 				
 * 				Learnings:
 * 					- GUI buttons
 * 					- switching between GLUE and Location Based information
 * 					- tracking handling
 **/
require_once '../ARELLibrary/arel_xmlhelper.class.php';
if (!empty($_GET['l'])) {
    $position = explode(",", $_GET['l']);
} else {
    trigger_error("user position (l) missing. For testing, please provide a 'l' GET parameter with your request. e.g. pois/search/?l=23.34534,11.56734,0");
}
//create the xml start
ArelXMLHelper::start(NULL, "arel/index.html", NULL);
//start by defining some positions of geo referenced POIs and give those names and thumbnails
$treasureLocations = array(array("37.772547,-122.418437,0", "San Francisco", "NorthAmerica"), array("48.160747,11.551219,0", "Munich", "Europe"), array("48.857261,2.3493,0", "Paris", "Europe"), array("40.73269,-73.995094,0", "New York", "NorthAmerica"), array("-33.92399,18.463669,0", "Cape Town", "Africa"), array("30.062557,31.246433,0", "Cairo", "Africa"), array("-37.813107,144.96304,0", "Melbourne", "Australia"), array("3.139145,101.689396,0", "Kuala Lumpur", "Asia"), array("35.685187,139.692306,0", "Tokio", "Asia"), array("19.019279,72.849541,0", "Mumbai", "Asia"), array("-12.042007,-77.040482,0", "Lima", "SouthAmerica"), array("51.493355,-0.127945,0", "London", "Europe"));
//display the POIs as defined in the Constructor
foreach ($treasureLocations as $i => $findPOI) {
    //title of the POI
    $title = "Treasure " . $findPOI[1];
    //create the POI
    $poi = ArelXMLHelper::createLocationBasedPOI($i, $title, explode(",", $findPOI[0]), "thumb.png", "icon.png", "A beautiful city", NULL);
    //20000km -> 20'000'000m -> see them all over the world
    $poi->setMaxDistance(20000000);
    ArelXMLHelper::outputObject($poi);
}
ArelXMLHelper::end();
exit;
コード例 #2
0
 *  
 * @abstract	Using junaio with LLA Markers or other references for creating highly accurate indoor experiences
 * 				 				
 * 				Learnings:
 * 					- receive encoded lat, long, alt positions from the LLA markers
 * 					- manually override the users positions (deactivate the GPS)
 * 					- switching POIs visible on the fly
 **/
require_once '../ARELLibrary/arel_xmlhelper.class.php';
//make sure to provide the lla marker tracking configuration
ArelXMLHelper::start(NULL, "arel/index.html", ArelXMLHelper::TRACKING_LLA_MARKER);
//first arrow
$arrowObject = ArelXMLHelper::createLocationBasedModel3D("arrow1", "Arrow", "resources/arrow.zip", "resources/arrow.png", array(37.783248, -122.403244, 0), array(600, 600, 600), new ArelRotation(ArelRotation::ROTATION_EULERRAD, array(1.57, 0, 2.37)));
//set the poi invisible in liveview, mapview/listview and radar
$arrowObject->setVisibility(false, false, false);
//move the arrow a little down
$arrowObject->setTranslation(array(0, 0, -1500));
ArelXMLHelper::outputObject($arrowObject);
//second arrow
$arrowObject = ArelXMLHelper::createLocationBasedModel3D("arrow2", "Arrow", "resources/arrow.zip", "resources/arrow.png", array(37.783212, -122.403192, 0), array(600, 600, 600), new ArelRotation(ArelRotation::ROTATION_EULERRAD, array(1.57, 0, 2.37)));
//set the poi invisible in liveview, mapview/listview and radar
$arrowObject->setVisibility(false, false, false);
//move the arrow a little down
$arrowObject->setTranslation(array(0, 0, -1500));
ArelXMLHelper::outputObject($arrowObject);
//1. Sound POI
$oObject = ArelXMLHelper::createLocationBasedPOI("conf1", "Conference Room 1", array(37.783294, -122.403299, 0), "resources/1.png", "resources/1.png", "This is Conference Room 1 with many interesting sessions going on today.", array());
//set the poi invisible in liveview, mapview/listview and radar
$oObject->setVisibility(false, false, false);
ArelXMLHelper::outputObject($oObject);
ArelXMLHelper::end();
コード例 #3
0
 *  			
 **/
require_once '../ARELLibrary/arel_xmlhelper.class.php';
//use the Arel Helper to start the output with arel
//start output
ArelXMLHelper::start(NULL, "/arel/index.html", ArelXMLHelper::TRACKING_GPS);
//1. Sound POI
$oObject = ArelXMLHelper::createLocationBasedPOI("1", "Hello Sound POI", array(48.1231, 11.218648, 0), "/resources/thumb_sound.png", "/resources/icon_sound.png", "This is our Sound POI", array());
//output the object
ArelXMLHelper::outputObject($oObject);
//2. Image POI
$oObject = ArelXMLHelper::createLocationBasedPOI("2", "Hello Image POI", array(48.12325, 11.218691, 0), "/resources/thumb_image.png", "/resources/icon_image.png", "This is our Image POI\n\nThe image source is: http://www.flickr.com/photos/ediamjunaio/5206110815/", array(array("Show Image", "imageButton", "http://farm5.static.flickr.com/4104/5206110815_7ea891be0b.jpg")));
//output the object
ArelXMLHelper::outputObject($oObject);
//3. Video POI
$oObject = ArelXMLHelper::createLocationBasedPOI("3", "Hello Video POI", array(48.12307, 11.218636, 0), "/resources/thumb_video.png", "/resources/icon_video.png", "This is our Video POI", array(array("Start Movie", "movieButton", "http://dev.junaio.com/publisherDownload/tutorial/movie.mp4")));
//output the object
ArelXMLHelper::outputObject($oObject);
//4. Custom POPup POI
$oObject = ArelXMLHelper::createLocationBasedPOI("4", "Custom PopUp", array(48.12317, 11.21867, 0), "/resources/thumb_custom.png", "/resources/icon_custom.png", array());
//add some parameters we will need with AREL
$oObject->addParameter("description", "This is my special POI. It will do just what I want.");
$oObject->addParameter("url", "http://www.junaio.com");
//output the object
ArelXMLHelper::outputObject($oObject);
//5. Phone Call POI
$oObject = ArelXMLHelper::createLocationBasedPOI("5", "Do Phone Call", array(48.12302, 11.218644, 0), "/resources/thumb_custom.png", "/resources/icon_custom.png", array());
//output the object
ArelXMLHelper::outputObject($oObject);
//end the output
ArelXMLHelper::end();
コード例 #4
0
 * 				Please make sure to follow the Google Analytics Terms of service.
 * 				 				
 * 				Learnings:
 * 					- using Google Analytics with junaio
 * 					- calling javascript methods from a popup button
 **/
require_once '../ARELLibrary/arel_xmlhelper.class.php';
//use the Arel Helper to start the output with arel
//start output
ArelXMLHelper::start(NULL, "/arel/index.php?analyticsuser="******"1", "Hello Sound POI", array(48.1231, 11.218648, 0), "/resources/thumb_sound.png", "/resources/icon_sound.png", "This is our Sound POI", array(array("Start Audio", "soundButton", "javascript: startSound(\"http://dev.junaio.com/publisherDownload/tutorial/test.mp3\")")));
//output the object
ArelXMLHelper::outputObject($oObject);
//2. Image POI
$oObject = ArelXMLHelper::createLocationBasedPOI("2", "Hello Image POI", array(48.12325, 11.218691, 0), "/resources/thumb_image.png", "/resources/icon_image.png", "This is our Image POI\n\nThe image source is: http://www.flickr.com/photos/ediamjunaio/5206110815/", array(array("Show Image", "imageButton", "javascript: openImage(\"http://farm5.static.flickr.com/4104/5206110815_7ea891be0b.jpg\")")));
//output the object
ArelXMLHelper::outputObject($oObject);
//3. Video POI
$oObject = ArelXMLHelper::createLocationBasedPOI("3", "Hello Video POI", array(48.12307, 11.218636, 0), "/resources/thumb_video.png", "/resources/icon_video.png", "This is our Video POI", array(array("Start Movie", "movieButton", "javascript: startVideo(\"http://dev.junaio.com/publisherDownload/tutorial/movie.mp4\")")));
//output the object
ArelXMLHelper::outputObject($oObject);
//4. Custom POPup POI
$oObject = ArelXMLHelper::createLocationBasedPOI("4", "Custom PopUp", array(48.12317, 11.21867, 0), "/resources/thumb_custom.png", "/resources/icon_custom.png");
//add some parameters we will need with AREL
$oObject->addParameter("description", "This is my special POI. It will do just what I want.");
$oObject->addParameter("url", "http://www.junaio.com");
//output the object
ArelXMLHelper::outputObject($oObject);
//end the output
ArelXMLHelper::end();