From the course: HTML5: Geolocation

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Getting the coordinates

Getting the coordinates - HTML Tutorial

From the course: HTML5: Geolocation

Start my 1-month free trial

Getting the coordinates

The first step in implementing HTML5 geolocation is to learn how to get a set of coordinates. This is actually very simple. What we have here is 02-coordinates-working, and this is a working copy of 02-coordinates-start. I made this working copy just for this purpose, and I suggest that you do the same thing: take your -start file and make a working copy and work from that. It's very straightforward. It's pretty much where we left off in the last lesson, with a couple of small changes, and so we get down here into the JavaScript and you can see there's a few things been added to init. This is really just about setting up this table. We have this global variable t, which is a bwTable object, and that comes from the bwH5.js JavaScript library. This is for displaying tabular information on the page. This is something that I use in most of my HTML5 API courses. So if you have been taking these courses, that should be pretty familiar to you. Here is the HTML. It's just very simple. There's…

Contents