
174
|
Chapter 4, Mapping (on) the Web
#38 Add Location to Weblogs and RSS Feeds
HACK
Adding Location Tags to Movable Type
To publish RSS2+Geo with Movable Type, we’ll build on Timothy App-
nel’s Meta plug-in (http://mt-plugins.org/archives/entry/meta.php). It’s
described as “a simple lightweight Movable Type plugin for displaying
embedded meta data in either keywords or text_more fields represented in a
basic XML format.” The plug-in uses an XML format with a
meta root ele-
ment and a single layer of XML elements and values, which are then avail-
able as key-value pairs to any Movable Type template.
Install the plug-in on your Movable Type server, and choose either the
keywords or text_more field for entering geographic metadata. (We’ll assume
keywords from here on.) Make sure that field is visible on the Edit Entry
screen, via the “Customize the display of this page” link. When writing an
entry, you can specify the location of the entry with a small bit of markup,
indicating its latitude and longitude:
<meta>
<lat>36.9716</lat>
<lon>-122.0253</lon>
</meta>
In order for this meta markup to show up in your RSS feed, you’ll next need
to edit the RSS 2.0 template on the Edit Templates screen, adding the fol-
lowing code. There are several Movable Type tags implemented by the Meta
plug-in. Used as follows within an RSS
item, a latitude and longitude will be
added to the RSS feed whenever they are present: