[ Bjarni R. Einarsson / blog: IS EN ]

Travel blog

2009-06-21 13:36

Ewelina and I have a pair of joint blogs to document our travels around the world:

If Ewelina can keep up with writing and translating, both should end up with roughly the same content. So go there if you want to know about our trip. This blog will probably stay relatively quiet for the next few months, although when I have nerdy things to write about they will still end up here.

So here comes something nerdy about the blog itself!

When setting up the blogs, we decided we wanted to have a map. Preferably an interactive, easily updated one. It took me a while to figure out all the bits and pieces, but these are the tools I ended up using:

  • Godaddy for a domain: sacrifiction.net (Ewelina invented that word!)
  • Google's Blogger for the blog itself
  • Google's My Maps to put placemarks on the map
  • Google's Javascript Maps API for embedding the map in the blog

The trickiest part was figuring out how to get the data from My Maps in a format usable by the Maps API. Try as I might, I couldn't find any documentation on this anywhere, even though it seems like an obvious use-case to me. Oh well. Documenting is hard, let's go coding...

The trick? In My Maps, there is a RSS feed link button. If you copy the URL it references, then that can be used as an overlay source in the Maps API. Even better, if you edit the URL to replace the word 'georss' with 'kml', you get a full KML feed which includes lines, areas and custom place markers. Voila, problem solved!

Oddly enough, using the Maps API and the KML feed also loads faster in my browser than the embedding iframe solution suggested by the My Maps interface.

     Re: Travel blog (yacoob)

Comments are closed.

Nýtt í dagbókinni