Using Google Latitude API w/ Google Maps

Google, Google, Google eh! I’ve known about Google Latitude for a while now, I’ve been signed up for ages, just never used it!

I decided to take a look the other day and found it pretty nice how it does passive “check-ins”, thats more my style, none of this fourwalla rubbish!

Heres an easy way to plot your current location on Google Maps :]

[php]
## QUERY STRING
$latitude = json_decode(file_get_contents(‘http://www.google.com/latitude/apps/badge/api?user=<– USER ID –>&type=json’));
## CURRENT LOCATION
echo $latitude->features[0]->properties->reverseGeocode;
## TIME AT LOCATION
echo $latitude->features[0]->properties->timeStamp;
## IMAGE URL :]
echo $latitude->features[0]->properties->placardUrl;

?>


[/php]

You will first of all ofcourse have to go sign up to Google Latitude aswell as get yourself a nice API Key from Google Maps for your domain name. Once this is done, fill in your User ID in the JSON query string and the API Key in the Google Maps javascript call.