Tuesday, June 2, 2009

Who and where are you?

Here's a cool hack: earlier today I created a two column Google Spreadsheet, and built a form front-end. One column is for location, the other column is the caption for that location. Using the Google Maps gadget for Google Spreadsheets, I was able to create a real-time map of the data in the spreadsheet. The gadget contains a "publish gadget" option, which provides the javascript to display the embedded map. Finally, I grabbed the HTML from the embedded form and added it to an HTML/Javascript gadget on Blogger right below the map itself. The result is a real-time, updated map showing the locations of visitors to my blog:



Go ahead! Add your location and be like all the cool kids:


Your location:
(City, State/Country)
[Zip only doesn't work]
Caption:


I'm going to work on tweaking the Maps gadget so that URLs in the caption balloons are clickable... but I'm interested to see where this heads. Thoughts?

15 comments:

  1. Rick,

    This looks interesting. Already I can see a use for it for a blog blog roll I have for one of my blogs. I add people to a Google Map as part of a blogroll and something like this could save me that step because they could do it themselves. Curious to see what other uses people can think of.

    BTW, I see you got rid of that commenting form you were using before. Why didn't you go with the Wall or comment form from Google Friend Connect so you could have threaded comments?

    ReplyDelete
  2. Hi Rick,
    very nice tip!
    But, my location are not in the map ;-).

    ReplyDelete
  3. @NoodleGei Strangely enough, it's visible on the map in the spreadsheet, but when the map is embedded on the blog, it's not there. (This is also true of an entry from Japan.) I think you've found a bug! :)

    I've checked with the spreadsheets team, will hopefully report back with a fix shortly.

    ReplyDelete
  4. @MrBrownThumb I'd been using JS-Kit (http://www.js-kit.com), and decided that I needed to get more familiar with what our users see when managing comments before I venture off and use 3rd party tools. :)

    We continue to work on enhancements, but if you're looking for some cool comment-specific features, JS-Kit's got a pretty good solution. (And they recently built in support for Google Friend Connect, which makes your followers/members gadget more useful.)

    ReplyDelete
  5. Hi Rick,
    is it possible, that you have set the (Data)Cell-Range from A2 - C10 in the Map-Gadget?
    That's in your Code: "http%253A%252F%252Fspreadsheets.google.com%252Ftq%253Frange%253DB2%25253AC10%2526header ....."

    Sorry, for my bad english ;-)

    ReplyDelete
  6. @NoodleGei Sure enough, that was it! I'll take complete ownership for this - hadn't realized that the range was hard-wired in the script. Nice catch!

    ReplyDelete
  7. @Rick
    Fine, it work's ;-).
    I'm working with some Docs-stuff in my Blogger-Blog (look my alternative Feedburner-Counter im my Blog-Sidebar).
    But, don't use the Google Translator, this do not work with content in iFrames.

    Blogger and Google-Docs are very, very nice Products!

    ReplyDelete
  8. You can delete this comment. I'm just testing openID by commenting on your blogg.

    ReplyDelete
  9. This is a bit much for some of us in Africa...

    http://williamandchristina.blogspot.com/

    ReplyDelete
  10. hi,Rick Klau nice to meet you,i like google map

    ReplyDelete
  11. Why not use the geolocation api to automatically locate the user? http://code.google.com/apis/gears/api_geolocation.html#example

    ReplyDelete
  12. @Sean
    The geolocation API work with Gears.
    How many users have installed Gears?

    ReplyDelete
  13. Hi Rick

    Great widget, would it be difficult to modify it to accept latitude and longitude rather than geographical address?

    Thanks

    sherkinisland.blogspot.com

    ReplyDelete