iPhone 3.0 Geolocation Javascript API

I’ve been looking to update the design of my personal website, and while clicking through templates on ThemeForest I had a great idea! One of the contact pages used a Google map to show the office location. While this is nothing new, it was an inspiration to put the iPhone 3Gs to good use.
Being an internet marketing consultant and struggling affiliate earner, I don’t really work from an office. Sure, my beastly Dell sits on a desk at home, but most of the time I’m on the move with a phone and laptop. What if I wrote a simple php script that could be accessed with an iPhone and update the latitude and longitude of my current location automatically. I’ll secure it with a password, and only update it I want. Plus by not showing the exact coordinates, and controlling the zoom level on the map it’s somewhat private.
The second piece is to create a dynamic contact page on my personal site that uses the latest location data from mySQL and the Google Maps API. BOOOM SHAKKA Now I have a real contact page that’s a topic of conversation in itself. People can see where I am, reach out via twitter, phone or email and then meet up for a beer! I’ll be sure to post the php code on this blog when I finish the script. In the meantime see the basic starter code below.
View the code here:
http://blog.bemoko.com/2009/06/17/iphone-30-geolocation-javascript-api/
Tags: api, geolocation, iPhone, javascript







Tue, Oct 20, 2009
Tips