HTML5 Geolocation API Primer Tutorial
โœ‚๐Ÿƒ๐Ÿพโ€โ™€๏ธ๐Ÿƒ๐Ÿผโ€โ™‚๏ธ
๐Ÿ“–

HTML5 Geolocation API Primer Tutorial

HTML5 Geolocation API Primer Tutorial

Weโ€™ve written a small HTML5 Geolocation API web application today, that has at its core the great advice from this great link, so, thanks.

You might recall from recent times here at this blog our admiration for these โ€œwhereโ€ based applications that start you off with WiFi at the beginning of your travel but donโ€™t rely on an internet connection from then on, at Google offline maps that we referred to with the โ€œDid you know?โ€ section of the recent HTML Marquee and Data Feeds and the Cache Primer Tutorial.

Well, today, we start off on a homegrown HTML5 Geolocation API web application that works best โ€ฆ

  • at the launch of the web application weโ€™d prefer you to have WiFi connection current โ€ฆ then โ€ฆ
  • as required, the Geolocation API functionality confirms that you allow the location of the device to be accessed โ€ฆ and if you say โ€œYesโ€ then โ€ฆ
  • you see an HTML table made up of three columns โ€ฆ
    1. Start location: Name (optionally user defined), Latitude, Longitude fields (Geolocation API defined, and only relying on Javascript client once okayed initially), and a Google Charts Map Chart (that needs WiFi) โ€ฆ that will show and work with a current WiFi connection to the internet โ€ฆ is set once and then Javascript setTimeout moves dynamic changes to location being reflected by the next two columns, namely โ€ฆ
    2. Travel location: Optional Name (optionally user defined), Latitude, Longitude fields (Geolocation API defined, and only relying on Javascript client once okayed initially), and a Google Charts Map Chart (that needs WiFi) โ€ฆ that will show initially but will only work during the trip with a WiFi connection to the internet within reach of your device โ€ฆ you can click the โ€œTravelโ€ link to set the dynamic location changes to only show on โ€ฆ
    3. End location: Name (optionally user defined, at any time), Latitude, Longitude fields (Geolocation API defined, and only relying on Javascript client once okayed initially), and a Google Charts Map Chart (that needs WiFi) โ€ฆ that will show initially but will only work during the trip with a WiFi connection to the internet within reach of your device or perhaps because you get to resume a WiFi connection to the internet at your destination
So gave this a test run on an iPad, at basecamp with WiFi, and then walking via a half way point (where there was no WiFi)
Halfway with no WiFi
up to the top of the street (where there was no WiFi),

At the top of the road with no WiFi
and then back to the halfway point,
Back to halfway
returning back to base
Back to base, and WiFi
at the end.

The tutorialโœ‚picture today shows the end iPad screenshot of an execution run where there was always a WiFi connection.

For your perusal you could try examining the HTML and Javascript programming source code you could call moving_or_notโšซhtml and/or its corresponding liveโœ‚run link.

If this was interesting you may be interested in this too.

This entry was posted in eLearning, Event-Driven Programming, Trips, Tutorials and tagged , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *