Using Geolocation

MINI LESSONS ››

MINI LESSON

Geolocation is the ability of your web browser to report the current location of your computer or mobile device. These values are reported as latitude and longitude coordinates, which ToolBook can access via the web browser on the device. Information on the current location can then be used within a ToolBook lesson, allowing you to create location-aware training.


A few situations in which ToolBook’s geolocation services could be used effectively:



Browsers/devices and geolocation support

At the time ToolBook 10.5 was released, geolocation was supported only by some browsers/devices. Any browser and device combination that supports the W3C standard API should integrate with ToolBook courseware. Platforms that are known to support this standard include:

Desktop Browsers

Firefox 3.5 and higher

Safari 5.0 and higher

Mobile Devices

iPhone/iPod touch 3.0 and higher, iPad

Android 2.0 and higher

Platforms that do not support the W3C standard include

Internet Explorer 6, 7 or 8

Windows Mobile 6.5


Common reasons for failures

Geolocation values are not reported in the following cases:



Given the above facts, a lesson design recommendation is that geolocation be used to make course content more personalized, but not to make the course design depend on geolocation information being known.


What is the typical user experience with geolocation?

When users access geolocation-aware content, they will view a dialog or an alert bar across the top of the browser asking them for permission to access their current location. Typically, the options presented to the user are Allow or Deny.  


Please note that geolocation information accessible to ToolBook is not generated from ToolBook. It is provided by a mobile device or browser using technologies such as GPS, Cell Tower Triangulation, IP Address origin information, or information on the location of known wireless networks. In other words, ToolBook merely asks the browser for the location, and the browser in turn asks the device for the location. ToolBook does not generate this information and therefore is not in control of the accuracy, or availability of this information.  


A further word of caution here: There is always a margin of error with any reported location, which is referred to as Accuracy, a fluctuating value reported in meters. For example, if the reported Accuracy is 800, this means the current geolocation could be off by plus or minus 800 meters. Avoid using geolocation values which are reported with unacceptably large Accuracy values.


How does ToolBook implement geolocation?

Geolocation has been implemented by introducing five book properties, adding events to the book, background and page, and using a specific geolocation function in the Actions Editor:

Book Properties

Events

Function

getGeolocationDistance(latitude1,longitude1,latitude2,longitude2)


ToolBook determines the values of latitude1 and longitude1 from the user's current position, but for latitude2 and longitude2, you will need to specify the latitude and longitude values (in decimal degrees format) of the known location used as the point of reference.


Programming tip:

The getGeolocationDistance function should not be used without first programmatically checking to see if the reported latitude/longitude are non-Zero values. If you don't do this, you will in effect be measuring from wherever location 0, 0 is on the globe.


General Overview

Here's a general overview of the ToolBook implementation of geolocation support. Actions Editor logic can be written to do the following:


Finding the latitude and longitude coordinates of any given location, using Google Maps



KEYWORDS: 23788 P23788




Created with the Personal Edition of HelpNDoc: Write EPub books for the iPad