RedBubble works on a Google Map

Yet another simple application of the photography querying code I recently wrote:

The querying tool that I wrote knows which items on my main site are also on RedBubble. This means that it's one simple query to emit a KML file that would show all of those works on a Google Map. The code looks something like this:
#!/usr/bin/env ruby

require 'photography'
include Photography

...KML header/document start emitted here...

# For each photograph that is on RedBubble...
Albums.new.load.images.select {|i| i.for_sale? }.each {|i|
...KML Placemark emitted here...

...end of KML document emitted here...
Nice and simple.

The resulting file can then be fed to Google Maps, Google Earth or Virtual Earth. It can also be used to create an embedded map.

No comments:

Post a Comment