logo About the ACME GeoRSS Map Viewer

Synopsis

This is a Google Maps app that displays GeoRSS files. It implements two different varieties of GeoRSS, plus all of Yahoo!'s enhancements to GeoRSS including address geocoding, plus a couple of things from basic RSS that Yahoo! missed. Feel free to use it with your own GeoRSS and Yahoo! Simple Map files.


Background

GeoRSS is a simple XML-based file format used for adding location information to data items. It is based on RSS 2.0, plus a couple additional elements - <geo:lat> and <geo:long> - that let you specify the geographical location of each <item> element.

There's also another variety of GeoRSS called Simple GeoRSS, which uses a different syntax - <georss:point> - for the location info.

Yahoo! took GeoRSS and added a bunch more elements of their own. The most significant difference is that the latitude and longitude elements are optional in Yahoo!'s version. If you prefer, you can specify the location by street address. Yahoo! then does geocoding behind the scenes to turn the addresses into latitude and longitude.

Creating a Yahoo! Simple Map is just a matter of writing a fairly simple XML file, while creating even the simplest Google Maps app requiries writing a program in JavaScript. Since most people are not programmers, you might expect Yahoo! Simple Maps to vastly outnumber Google Maps apps. In fact, the reverse seems to be true: there are many more Google Maps apps than Yahoo! Simple Maps. Why? I think it's just because Google Maps is prettier and has a more pleasant user-interface. Yahoo! eventually decided the same thing, and came out with AJAX and Flash APIs that are just as nice as Google's. But they are also as complicated to program as Google's.

So, this page tries to give you the best of both worlds. It reads the same XML data files used by Yahoo! Simple Maps, does the same geocoding, but it displays the data as a Google Map. This lets you combine the ease of creating a Yahoo! Simple Map with the nice user-interface of a Google Maps app.

This page also does automatic clustering. This means if your map has a whole bunch of markers on it, then instead of trying to display them all and slowing down to a crawl, the markers will get grouped together into cluster markers. If you zoom in further so that fewer markers are in the map area, they will show up as individual markers again.


Try It

Paste your own GeoRSS URL here:

Examples

Here are some sample maps:

California State Parks
Alan Brown put together a great map of all the California State Parks. It uses groups for different types of parks, so it's very colorful.
California Prisons
Ducky Sherwood's map of California prison facilities.
BART and Caltrain stations Together
Jeffrey McManus made a map of BART stations, and Trifon made one of Caltrain stations. You can view them separately, or mashed together on one map.
Yahoo! Traffic Alerts near
Yahoo! has an API for fetching traffic alerts. It is available in GeoRSS form, so it just drops right in here. This form interface lets you show up to three different locations on the same map.
Golden Gate Sunsets
I made my own GeoRSS map showing the spots from which you can watch the setting sun right in the middle of the Golden Gate Bridge.
UC Berkeley Plaques
Here's one of the various informational plaques around the University of California Berkeley campus.
Miscellany
Joe Crawford's San Diego Bloggers, Jamie Glenn's San Francisco Dog Parks, Asher Blum's Sunnyvale Street Maintenance, potrerohillsf.com's Potrero Hill Robberies, my own Dirty Harry Movie Locations.

If you have an example you'd like to show off in the list above, just let me know.


Usage

To use the map page, you first make a GeoRSS XML file and put it on a web server somewhere. Then you take the URL for the map page and the URL for your XML file and stick them together, like so:

http://www.acme.com/GeoRSS/?xmlsrc=http://example.com/yourxmlfile.xml

You can display more than one XML file in the same map if you like:

http://www.acme.com/GeoRSS/?xmlsrc=http://example.com/xmlfile1.xml&xmlsrc=http://example.com/xmlfile2.xml

GeoRSS

Here's an annotated sample GeoRSS file showing all the different elements implemented by this map page, in context. Most of them are optional. For more details, follow the links in the key:

Basic XML Basic RSS GeoRSS Simple GeoRSS Yahoo! Simple Maps
<?xml version="1.0"?>standard XML header
<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:ymaps="http://api.maps.yahoo.com/Maps/V1/AnnotatedMaps.xsd">standard rss header, with namespace declarations
  <channel>start of channel
    <title>Berkeley People</title>channel's title
    <link>http://www.ci.berkeley.ca.us/</link>channel's link
    <description>Directly opposite the Golden Gate.</description>channel's description
    <managingEditor>jef@example.com</managingEditor>responsible for page
    <webMaster>webmaster@example.com</webMaster>responsible for whole site
    <image>start of image
      <url>http://www.ci.berkeley.ca.us/Images/logoshad.gif</url>image's url
      <title>Berkeley</title>image's title
      <description>City of Berkeley</description>image's description
      <link>http://www.ci.berkeley.ca.us/</link>image's link
      <width>124</width>image's width
      <height>123</height>image's height
    </image>end of image
    <geo:lat>37.86885</geo:lat>channel's latitude
    <geo:long>-122.27293</geo:long>channel's longitude
    <georss:point>37.86885 -122.2729</georss:point>channel's location
    <ymaps:ZoomLevel>4</ymaps:ZoomLevel>Yahoo!-style zoom level
    <ymaps:Groups>start of groups
      <group>start of group
        <title>K00l Kidz</title>group's title
        <id>K</id>group's id
        <ymaps:BaseIcon>http://www.example.com/icon.gif</ymaps:BaseIcon>group's icon
      </group>end of group
    </ymaps:Groups>end of groups
    <item>start of item
      <title>Jef</title>item's title
      <link>http://www.acme.com/jef/</link>item's link
      <description>Jef Poskanzer</description>item's link
      <author>jef@example.com</author>author's email address
      <geo:lat>37.88188</geo:lat>item's latitude
      <geo:long>-122.29524</geo:long>item's longitude
      <georss:point>37.86885 -122.2729</georss:point>item's location
      <ymaps:Address>1234 Sample St.</ymaps:Address>item's street address
      <ymaps:CityState>Berkeley CA</ymaps:CityState>item's city & state
      <ymaps:Zip>94702</ymaps:Zip>item's ZIP code
      <ymaps:Country>US</ymaps:Country>item's 2-letter country code
      <ymaps:PhoneNumber>1-510-555-1212</ymaps:PhoneNumber>item's phone number
      <ymaps:GroupId>K</ymaps:GroupId>item's group id
      <ymaps:BaseIcon>http://www.example.com/myicon.gif</ymaps:BaseIcon>item's icon
      <ymaps:ExtraLink href="http://www.example.com/">Example</ymaps:ExtraLink>an extra URL for the item's popup
      <ymaps:ExtraImage>start of extra image
        <url>http://www.example.com/example.gif</url>extra image's URL
        <title>Example</title>extra image's title
        <link>http://www.example.com/</link>extra image's link
      </ymaps:ExtraImage>end of extra image
      <ymaps:ItemUrl>http://www.example.com/page.html</ymaps:ItemUrl>HTML page for displaying inside an <iframe> in the popup
    </item>end of item
  </channel>end of channel
</rss>end of rss

Maps courtesy of the Google Maps API and the Yahoo! Simple Maps API.
ACME Laboratories
email