
176
|
Chapter 4, Mapping (on) the Web
#39 View Your Photo Thumbnails on a Flash Map
HACK
Adding Thumbnail Links to Your RSS Feed
For Movable Type, you can specify the URL of the image thumbnail as fol-
lows, in either the
keywords or text_more fields:
<meta>
<lat>36.9716 </lat>
<lon>-122.0253</lon>
<imgurl>/images/powerkite.jpg</imgurl>
</meta>
In order for MT to turn this into RSS, you’ll need to add following to your
RSS 2.0 template, inside the
MTMeta tag:
<MTMetaValueExists name="imgurl">
<photo:thumbnail><$MTMetaValue name="imgurl"$></photo:thumbnail>
</MTMetaValueExists>
Notice that we use a photo:thumbnail element to specify the location of the
thumbnail in the RSS feed. This means we’ll also have to declare the
photo
namespace in the RSS root node in the same template, as follows:
<rss version="2.0"
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
xmlns:photo="http://pheed.com/photo/">
For Radio Userland, the Location tool also provides this facility. Below the
post form, there’s an input field for the thumbnail URL. When you provide
a URL, it’s automatically added to the RSS feed.
Configuring worldKit to Display the Thumbnails
With the data feed in place, all that’s left to do is to install and configure
worldKit. worldKit relies on a file called config.xml for its configuration
details. Here’s an example:
<worldkitconf>
<width>500</width>
<height>250</height>
<displaytype>daynight</displaytype> ...