Chapter 12

Adding Advanced Functionality


  • How to work with dedicated XML files
  • How to create advanced interactions
  • How to use LLA markers
  • How to retrieve data from databases

In this chapter, you will complete your junaio skills by learning how to include advanced functionality, such as separating the XML from the PHP file and storing your POIs in either a dedicated XML file or in a database. You will learn about Latitude, Longitude, Altitude (LLA) markers and how they can be used in environments where no GPS signal can be received. You will also learn how interaction events can be created to provide click events to perform actions when POIs have been selected. Before you get started, make sure you’ve read Chapters 10 and 11.


In the previous junaio chapters, you have created a PHP file that hosts the XML. Because this file contained a mix of PHP and the XML that represents the POIs, it can be problematic to maintain — especially when you start to add several POIs to the file. Typical errors include missing an opening or closing angled bracket or including unintentional extra characters. Such errors can be extremely difficult to track down since errors are exposed only at runtime.

A better approach to managing your POIs is to use a dedicated XML file and add POIs via a dedicated tool, such as XML Notepad. This enables the tool to report any errors with the XML and display where the error has occurred. Keeping your POIs in ...

Get Professional Augmented Reality Browsers for Smartphones: Programming for junaio, Layar, and Wikitude now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.