GCM
This is the project homepage for Google Calendar Map (GCM), a way to view calendar events on a google map. View the source code on github or go straight to the working GCM prototype. This page will change but always contain the latest and greatest on this project.
- About
- Definitions
- Uses
- Key Features
- Calendar Setup
- URL Options
- Examples
- Screenshots
- Influences and Related
- Browser Compatibility
- Wish List
- Changelog
About
Paraphrased from my first GCM blog:
Basically it takes a google calendar and plots all the events on a map. Well, at least all events that have a valid map address. The mashup works with any google calendar, as long as its public. You provide the URL of a google calendar XML Feed to GCM, then its javascript code eats it up and spits out markers on the map and lists all events on the right side. The list is really a table, with sortable columns (sort by date, event name, address).
The map acts like a filter - you only see events that occur on the map canvas. For example, if the map is zoomed in to show downtown Chicago, you might only see events in grant park. But if you zoom way out you will see events in north chicago or suburbs, too. This is great when there is a calendar with tons of events going on all over the place.
For more details on this project, check out my GCM presentation from January 2010. Also make sure to read the Key Features below.
Definitions
- calendar - a google calendar for now. Only events in the calendar with valid addresses will appear on map.
- event - contains name, location, date, and description. More than one event can be at same location or same time. Can be repeating
- map canvas - the area of the map you can see on the browser. If an event location is not on the map canvas, it will not be shown on the results list. To zoom out or change map canvas to show all events, remove the map filter by clicking “[x] Filtered by map”
- location - ‘where’ the event is. This should be an address, otherwise GCM can’t put it on a map. Examples of locations that are not addresses include ”Mom’s house” or “Top of Sears Tower”
- marker - an icon at a location on the map canvas. When clicked, reveals details on events at that address (may be more than one event at same location)
- results list - on right pane, list of events that are on map. The results are filtered and sortable by name, date, location. When filtered, it be a subset of all the eventsThis may be all events in date range or a subset.
- filters - appears above results list. Currently there are just 2 filters - map and date. Existing filters are always listed, and can be removed by clicking them. When all filters are removed, all events are displayed in results list (map will change if necessary to show all events, too).
Uses
- User: Going to a neighborhood, want to see what events occur in that neighborhood
- use map to jump to that neighborhood, and the map change triggers results list and markers to update
- User: Going to attend a specific event, want to see what else is nearby
- use results list to highlight event, which triggers map to center on event
- Promoter: My band, book tour, historic buildings seminar, archeological dig, etc .. has several events in several places on different dates. I want to show them all.
Key Features
- Map as a Filter
Move or zoom the map to the area you care about. The markers and the results list update instantly and automatically, hiding events that are not on the map canvas - Date slider as a Filter
Show only events that occur between a specific start date and end date. You can click “Change dates” to pick a large window, say 6 months. Once all events for those 6 months is loaded and decoded (a few seconds), you can used the date sliders to filter events to a certain week or weekend or whatever. Instantly. It’s fun, try it out! - Event Address Debugger
If you’re not sure how many of your events have valid addresses as locations, this feature makes it easy to find out. All event locations are decoded, and if any are not valid addresses, a “Warning [3]” will appear above the results list. Clicking on it displays a table of the problematic events. Just click “Event Details” to load that specific google calendar event. If you are logged into google and have edit permissions, you can update it immediately, save, and reload GCM. - Map Link
Share a specific events calendar with exact map location and zoom level - just like the “link” button on google maps - Simple
First time users - Grab any Google calendar’s XML link, drop it in - it just works. Or grab the “Map Link” and email or IM it to a friend. - Instant
When you drag date sliders to a specific day, results list updates instantly. Likewise, moving the map will instantly update results list to only show those events on the map canvas. - Sortable Results
Events in Results List are sortable by name, date, and location - Jump to an address, city, or zip - just type it in the box
- Multiple events can exist on one location
Calendar Setup
First, make your calendar public (if it ain’t your calendar, ask owner for XML feed URL).
- In the Google Calendar interface, locate “My Calendar” box on the left.
- Click the arrow next to the calendar you need.
- A menu will appear. Click “Share this calendar”
- Check “Make this calendar public”
- Make sure “Share only my free/busy information” is unchecked.
- Click “Save”
Second, find your calendar’s XML feed URL
- In the Google Calendar interface, locate the “My Calendar” box on the left
- Click the arrow next to the calendar you need.
- A menu will appear. Click “Calendar settings”
- In the “Calendar Address” section of the screen, click the XML badge.
- Your feed’s URL will appear. Copy It
Third, add your URL to the “Add Calendar” box on the main page
- Before (no calendar)
http://chadnorwood.com/gcm/ - After (example with calendar)
http://chadnorwood.com/gcm/?u=http://www.google.com/calendar/feeds/webdog6@gmail.com/public/basic
URL Options
This section explains how some of the (un)documented options for http://chadnorwood.com/gcm work. Options are standard key=value params in the URL.
- Timezone
- as of 2011-9-21, gcm defaults to browser’s timezone. Adding tz=cal to URL will use calendar’s timezone. Ex: http://chadnorwood.com/gcm/?tz=cal&u=https://www.google.com/calendar/feeds/dnr6osjdrtn4fqpf70ep8ck1rc%40group.calendar.google.com/public/basic
- Startdate, Enddate
- sd=2011-2-12
- ed=2011-2-24
Examples
Potential Examples:
- Garage sales on craigslist
- Homeowners: Open Houses
- Chicago Summer Festivals
- Tour schedule for bands
Actual Working Examples
Screenshots
more here
Influences and Related
- UI
- Google. Duh.
- kayak.com filters
- padmapper.com
- Code
- jquery
- jquery-ui
As of September 2010, this is very much a prototype. That means lots of trying out things to see what works. There are many bits and pieces from other projects, more details coming soon.
Browser Compatibility
Tested to work with the following browsers:
- Safari 5
- Chrome on Mac
- Firefox 3.6
- IE8
- IE7 (sorta, must scroll to right)
Wish List
- Text box as a Filter
- type chars in a box and only events that contain those chars will show
- Code cleanup
- Lots here
Changelog
2009-6-12 - Initial release of prototype
2009-8-4 - change to 200 max events (from 25)
2009-11-19 - updated to work with new google maps api .
2010-01 - made a test version using date sliders.
2010-6-20 - fixed slider handles so they do not overlap.
2010-9-12 - Second version of GCM prototype. Initial one moved to gcm2009.
2011-1-9 - Added basic support for recurring events.
2011-3-29 - Finished some under-the-hood coding and released source code as mapfilter project on github. Read more on the GCM on github blog post.
2011-9-21 - Added timezone support. See details in URL Options above.







Hi there,
Would love to hear your thoughts on Arrive: http://arriveapp.com
It doesn’t do anywhere near what GCM does, but it is very useful to find event locations quickly and easily. I am happy to provide you with a free copy to try out.
Keep up the good work, and thanks in advance if you have any feedback.
I’ve some calendars with daily events. They aren’t mapped in GCM.
Do you have a plan to install a solution for that issue ?
thanx and so long oTTo
Thank you very much for your work on this, Chad! I see a lot of great potential here. Just a few quick ideas related to features for your next iterations of the tool:
1. More customization allowed for date ranges to include. Defaulting to 60 days out is okay. Giving users the ability to change that to 30, or 90 or ??? would be even better. Also, having fields that people can use to type in specific dates in addition to the slide-bar would be wonderful too.
2. Similar to Otto’s comment, allowing the proper inclusion of recurring events. I have some weekly events on a test calendar I’ve used, and it only displayed the events on one date.
3. The ability to combine multiple calendar feeds into one display. I know how to combine multiple XML links into one Google Reader feed. However, I don’t know how to bring the link to that combined feed into your tool (if it is possible). What would be even better, however, would be the ability to add multiple calendars during the initial compilation process.
Thanks again! If you need some help with testing or ???, I’ll do what I can. This would be a HUGE benefit to a few of the non-profits that I serve. - Derek
Zack - arriveapp looks cool, but i’m not sure why i’d want it - it doesn’t really save me any time - I already copy addresses into my calendar event description, then on my iphone, i can just click on it and it maps it for me.
Derek (and Otto) -
1. You can already pick initial start and end dates - click on “change dates” and window will popup with calendar date picker. Reload and done !!
2. Recurring - I just fixed this today. Note it is pretty basic - only lists one of a recurring event if more than one is within slider range.
3. Multiple calendars - that’s on my list, but will wait till after my rewrite, which i just started. I expect that to take several weeks.
cheers,
chad
Hi Chad,
is it possible that your GCM server has a problem ? All my links and also yours on this page doesn’t bring the results desired with firefox 3.6 and IE !?
cheers oTTo
This is absolutely superb Chad, I’ve been looking for something like this for ages, and no-one has come close.
I have a request though, as I wish to embed this into my wordpress-based website.
Is there any way that some of the elements can be inserted as separate items into a different page? So there’d be some code to insert the map, some code to insert the timetable of events, some code to insert the slider, etc etc? Sure the whole lot could be inserted as an iframe, but that’s not really what I’m after.
Thanks again for making such an awesome project man.
Chad
I am a San Francisco based back-end developer who is just getting my feet wet in Javascript - I found a link to your project while researching JS, and wow, this is a cool application.
Is there any place you have published the source code? Is this open-source? I am learning JS based on examples and open source code I can find, so it would be really helpful for a novice like me to understand how you put this together.
You will find my email in the metadata of this post (I assume you have access to it).
Thanks
Bob
Hey, its not working for me… my gcal is http://www.google.com/calendar/feeds/obeewnn%40gmail.com/public/basic
does it work for you? i tried on ff3.6 and ie7. this would be soooo awesome if i cud get it to work.
Russell - I am redoing the code and plan to release it soon on github. The released code will be split into UI and non-UI releated js files. This will make it easier to customize UI, like just put calendar events on a map and hide the list and slider stuff.
Bob - I am cleaning up the code and plan to release on github soon - stay tuned
Taylor - You’re right, it was tripping over a couple events without location. I fixed and verified your link works on Safari, FF 3.6, and IE8 - http://chadnorwood.com/gcm/?u=http://www.google.com/calendar/feeds/obeewnn%2540gmail.com/public/basic
Looking forward to a github release so the the state government I work for can modify it for use on our own domain. One of the best most useful projects I’ve ever seen. Much props.
Just came across it. It works amazing. I’ve been trying to find a mapping solution for my site for a couple years. Is there anyone to embed this google map without the sidebar onto a wordpress page?
Kudos on a fantastic app - thanks a lot!
+1 for an embeddable map.
+100 for the ability to add lines between locations in date order (e.g. for a trip itinerary visualizer).
Cheers!
oh, and while I’m asking - how about the ability to export as KML for import into Google Earth?
I’d be happy to donate!
hi chad!
great tool - but one thing i’d like to change: your gmc shows not the current time. i’d like to change it to a timezone in germany. maybe berlin should fit.
how do i change this?
thanx a lot, mathias
Could you use several google calendars as data sources? Im trying to have a “live” map showing current locations of events based on the time of the calendar event. This includes several calendars though.
#1 wish: I too would love to be able to embed this map on my website.
Thanks so much for your great work (and straightforward instructions)
Chad,
This is such a great solution. I have noticed that the event times are shown in Central time once loaded into the map. The default time zone from my map is Eastern, and I also have some events on the calendar that are specifically tied to Mountain Time Zone, but all of them are displayed for Central. Being from Chicago, I’m assuming this is something on your end…any thoughts about how to change it so it displays in other time zones?
Thanks
We have a google calendar at:
https://www.google.com/calendar/embed?src=yvettebikesfortheworld%40gmail.com&ctz=America/New_York
But when we display a corresponding google map, the times are an hour off:
http://chadnorwood.com/gcm/?z=7&lat=38.97766&lng=-77.07671&m=0&sd=0&ed=42&u=https://www.google.com/calendar/feeds/yvettebikesfortheworld%40gmail.com/public/basic
Probably because your utility is based in Chicago and our calendar data is eastern time? Is there a daylight saving option? Or a timezone option?
Thanks in advance
Just in case anyone else has this problem, here are the lines of code I modified to get event times to display properly in Washington DC as opposed to Chicago:
diff cnMapFilter.js.old cnMapFilter.js
410c410
// ‘ctz’ : ‘America/Chicago’,
801c801,802
// was -8
> return s + “-07:00″; // chicago offset
(oops, repost with html)
Just in case anyone else has this problem, here are the lines of code I modified to get event times to display properly in Washington DC as opposed to Chicago:
diff cnMapFilter.js.old cnMapFilter.js
410c410
// ‘ctz’ : ‘America/Chicago’,
801c801,802
// was -8
> return s + “-07:00″; // chicago offset
All - Timezones are tricky and need a fix. You can hardcode using a fix like Ben made above, but a proper solution would be to incorporate code from something like https://bitbucket.org/pellepim/jstimezonedetect
I hope to get that fix in there soon.
Supporting multiple calendars - i built it so this could be possible without too much work, I may add this if i have time.
Other features, like making it a wordpress plugin, more modular, KML export, and adding lines on map connecting locations - I’m not sure when these will get addressed, but welcome code.
All - Timezones should work much better now, see URL Options above. Code detects the timezone your browser is in, and shows times based on that. To see if it identified your timezone correctly, hover over “Date” in the table header, or look at console logs. Ex:
http://chadnorwood.com/gcm/?u=http://www.google.com/calendar/feeds/jo0ubvoi1gutr95kdtl1245u3g@group.calendar.google.com/public/basic&debuglevel=3
Code Details on github (commit1, commit2)
Chad, I am looking for a way to filter the data by category that I am pulling into your map application. I know you have date filtering - is this something that is possible with the current code structure?
Thanks,
Scott
@Scott Weiss Yes, adding categories is possible, but requires some customization since google calendar events do not have a category field. For example, you could standardize on something like putting the category in the description, and have GCM look for that, build a list of all categories found for a given calendar, and then present that list on the web page with checkboxes to show/hide events for each category. Perhaps starting event description with .. CATEGORY: “My category name”
Wow I want to do it but I don’t know how to install or load it, could you be specific on how to do it. Thanks wish I could do Austin, TX events with this.
Is there anyway I can get directions from event to event on the map so I don’t have to input the destination each time? Thanks
Frank - Instructions on how to “make it go” are on http://chadnorwood.com/gcm/
Lindsey - I just copy and paste. Pick one event, copy address, click on the other event marker on the map, click on directions, it opens google maps, then paste the first event address.
Have fun!
Hi!
Thank you for your amazing project. I’m using it and I noticed something is missing. When I create a recurring event, it appears only once and others doesn’t appear. It would be nice that recurring events appear and make a filter to show or hide recurring events.
What do you think about that?
Do you think you can add this fonctionality?
Thank you very much for your support.
Julien
@chad
Hi Chad,
what is the state of your “multiple calendars” feature?
I think you can make a lot of people happy with it.
thanx and so long oTTo