Editing a GeoRSS Feed

You can carry out basic or advanced modifications to the GeoRSS feed.

This task shows you how to:

Perform Basic Modifications

You can extend the RSS/ATOM description of an item using GeoRSS tags to display them on the globe. Displaying content on the globe needs the feed items to be geolocated thanks to the GeoRSS standard.

For more information about the GeoRSS standard, browse the following Internet site: http://georss.org.

Before you begin: This GeoRSS implemention concerns the GeoRSS Simple and the GeoRSS W3C specifications, not the GeoRSS GML encoding:
  • The GeoRSS W3C specification allows basic geolocated features such as latitude, longitude and altitude (see http://georss.org/w3c for more information).
  • The GeoRSS Simple specification allows more complex features such as multipoint, line, box, etc. (see http://georss.org/simple for more information).
  1. Declare the GeoRSS prefixes of the feed source:
    xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" <!-- W3C implementation -->
    
    xmlns:georss="http://www.georss.org/georss" <!-- GeoRSS Simple implementation -->
  2. Add geolocation information on the feed items.
    Below is an example to add a GeoRSS point:
    <?xml version="1.0"?>
    <rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
                        xmlns:georss="http://www.georss.org/georss">
        <channel>
            ...
            <item>
                <title>An example annotation</title>
                <link>http://example.com/geo</link>
                <description>Just an example</description>
                <georss:point>45.256 -71.92</georss:point> <!-- Here ! -->
            </item>
            ...
        </channel>
    </rss>
    

Perform Advanced Modifications

In the GeoRSS implementation, you can use two different modes to display items: Country Mode and Marker Mode. Each mode can be directly configured in the feed source for each item.

Country Mode

Country Mode lets you color a country for the current item.

  1. To define the display mode, use the <featureTypeTag> tag.
    GeoRSS TagAllowed ValueSample ValueMandatory (Yes/No)Default ValueComments
    <featureTypeTag>countrycountryYespustuleThis tag needs to be explicitly declared.
  2. To define display options, use the <relationshipTag> tag.
    GeoRSS TagAllowed ValueSample ValueMandatory (Yes/No)Default ValueComments
    <relationshipTag>countrycode=XXX[/color=#XXXXX] countrycode=FRA/color=#1AF43D Yescolor=red Country code: ISO3 code of the country to be colorized.

    Color: hexadecimal color (html color).

Important: You can handle only one colorized country per feed item. In case of multiple declared countries for one item, the globe uses the first country. In the same country is declared for two or more items, the globe uses the last declared country in the feed source.

Below is an ATOM sample to add a yellow colorized country (France):

[...]
<entry>
    <title>Sample Title</title>
    <published>2013-04-03T10:16:55Z</published>
    <updated>2013-04-03T10:16:55Z</updated>
    <content type="html">Sample content</content>
    <author>
      <name>Sample author</name>
    </author>
    <georss:featureTypeTag>country</georss:featureTypeTag>
    <georss:relationshipTag>countrycode=FRA/color=#BCF345</georss:relationshipTag>
</entry>
[...]

Marker Mode

Marker Mode lets you add a marker on the globe for the current item.

  1. To define the display mode, use the <featureTypeTag> tag.
    GeoRSS TagAllowed ValueSample ValueMandatory (Yes/No)Default ValueComments
    <featureTypeTag>pustulepustuleNopustuleThis is the default globe mode.
  2. To define display options, use the <relationshipTag> tag.
    GeoRSS TagAllowed ValueSample ValueMandatory (Yes/No)Default ValueComments
    <relationshipTag>color=yellow|black|green|red color=green Nocolor=red Only four colors are available for this mode.

Important: You can handle only one GeoRSS point per feed item (one item = one marker or one colorized country). In case of multiple points, the globe automatically uses the first point as marker. You can use more complex GeoRSS types such as boxes, lines, and so on. They are kept in the item's geolocation data but are not used by the globe.

Below are three examples to add a red country on the globe:

  • [...]
    <entry>
        <title>Sample Title</title>
        <published>2013-04-03T10:16:55Z</published>
        <updated>2013-04-03T10:16:55Z</updated>
        <content type="html">Sample content</content>
        <author>
          <name>Sample author</name>
        </author>
        <georss:point>46.813938 3.560120</georss:point>
        <georss:featureTypeTag>pustule</georss:featureTypeTag>
        <georss:relationshipTag>color=red</georss:relationshipTag>
    </entry>
    [...]
    
  • [...]
    <entry>
        <title>Sample Title</title>
        <published>2013-04-03T10:16:55Z</published>
        <updated>2013-04-03T10:16:55Z</updated>
        <content type="html">Sample content</content>
        <author>
          <name>Sample author</name>
        </author>
        <georss:point>46.813938 3.560120</georss:point> <!-- GeoRSS Simple syntax -->
        <!-- no display options: the default values are used (pustule mode and red color)-->
    </entry>
    [...]
    
  • [...]
    <entry>
        <title>Sample Title</title>
        <published>2013-04-03T10:16:55Z</published>
        <updated>2013-04-03T10:16:55Z</updated>
        <content type="html">Sample content</content>
        <author>
          <name>Sample author</name>
        </author>
        <geo:lat>46.813938</geo:lat> <!-- GeoRSS W3C syntax -->
        <geo:long>3.560120</geo:long>
    </entry>
    [...]