February 25, 2008

gCalMap: Google Calendar and Calendar Map Views, Side By Side

In a previous post (that got picked up by both Lifehacker and a wired.com blog, no less ;-) I described how to Display Google Calendar Events on a Map.

Today, I got an email from Martin Wunderlich containing a couple of queries about the mashup, that pointed me to a demo page displaying a calendar side by side with a Google map displaying the calendar feed.

I've been meaning to do something like this for a week or two, so this was all the prompting I needed... Here then is a side-by-side calendar agend view and map display mashup.

The view can be generated from a single (cal) argument passed via the url. For example, http://ouseful.open.ac.uk/blogarchive/calmaptest.php?cal=u0aq4g3cjf6g6nnesa8mv0l77g@group.calendar.google.com.

The value of the cal argument is taken from the settings view of a public Google Calendar:

This calendar ID is then passed to the geocal pipe to obtain the KML feed that provides the map overlay, and also used to pull in the calendar agenda view.

To display your own calendar, simply replace the calendar ID in the above example URL with the calendar ID for the calendar you wish to display...

...or paste the calendar ID here to link to the gCalMap view:

If you want to embed the view in your own web pages, you should be able to just embed the gCalMap page in an iframe.

If I get a chance, I'll have a go at producing a customisable 'embed code' generator for the gCalMap view.

Note that for the geocoding to work correctly, you must specify the location of each event in the calendar in the event's 'where' entry box.

PS here's a Google calendar events map embed code generator - give it a gCal id and get an iframe containing a map view of the events in return...

Posted by ajh59 at February 25, 2008 10:19 PM
Comments