Freelance journalist & editor
Welcome to the Where Am I page, which accompanies a column in the August 2009 issue of Personal Computer World.
To start with, let's have a map showing where I was when the picture at the top right of this page was taken - it's a simple example of how to add a Google map to your own web site:
Then, use the onload attribute of the page body tag to call your function. As you can see, here I've set the map type to Google's hybrid view.
Where are you coming from?
If you're visiting this page from a browser that uses the W3C geolocation API, we can add a map that shows where you are. It's not the only API to do that, but it should become the standard way, so let's see what we can find out about where you are.
If you see a request at the top of the page to allow your location to be sent to the web site, choose OK.
Your latitude and longitude should replace this text.
If you're using Mozilla 3.5 or later, and a WiFi connection, you should see a map centred roughly on your location; in future the W3C API will allow browsers to send information derived from multiple sources, including GPS units, so mobile phone browsers in particular will be able to show users exactly where they are. You can read more about GeoLocation in the August 2009 issue of Personal Computer World. This page was previous coded to work with the Geode plugin instead, but amended in April 2010.
This is a sample page to show how easy it can be to add mapping features to your own web site, for the August 2009 PCW Hands On Web Development column
Useful additional links: