GeoRSS

GeoRSS adds encoding of geographic coordinates to a Really Simple Syndication (RSS) feed. RSS is a web feed format used to publish information such as, news items. This allows developers to add geographically referenced data feeds to applications.

Adding a GeoRSS feed

You can add a GeoRSS Feed in Extensible Application Markup Language (XAML). They should be inserted inside a Map control element below any base layers. If you have not already done so, create a WPF application with a map (see Creating a map for details).

NoteNote:

The code in this topic requires a reference to the ESRI.ArcGIS.Client and ESRI.ArcGIS.Client.Toolkit.Datasources assemblies. The XAML of the Window (for example, MainWindow.xaml) needs to have the following Extensible Markup Language (XML) namespace declaration:

xmlns:esri="http://schemas.esri.com/arcgis/client/2009"
  1. In the Map element, add a GeoRssLayer with Source as the uniform resource locator (URL) for your GeoRSS feed. Place this below any data that will display beneath the GeoRSS feed as shown in the following code sample:
    <esri:Map x:Name="MyMap" >
        <esri:ArcGISTiledMapServiceLayer ID="World Topo Map" 
           Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
        <esri:GeoRssLayer Source="http://earthquake.usgs.gov/earthquakes/catalogs/1day-M2.5.xml" />
    </esri:Map>
    
  2. In the Grid.Resources, create the renderer you will use to display the geometry of the GeoRSS feed.
    <Grid>
            <Grid.Resources>
                <esri:SimpleRenderer x:Key="MySimpleRenderer">
                    <esri:SimpleRenderer.Symbol>
                        <esri:SimpleMarkerSymbol Color="Red" Style="Circle" Size="10" />
                    </esri:SimpleRenderer.Symbol>
                </esri:SimpleRenderer>
            </Grid.Resources>
            <esri:Map x:Name="MyMap" >
               <esri:ArcGISTiledMapServiceLayer ID="World Topo Map" 
                  Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
               <esri:GeoRssLayer Source="http://earthquake.usgs.gov/earthquakes/catalogs/1day-M2.5.xml" />
    </esri:Map>
    
  3. Assign the renderer to the GeoRSS feed.
    <Grid>
            <Grid.Resources>
                <esri:SimpleRenderer x:Key="MySimpleRenderer">
                    <esri:SimpleRenderer.Symbol>
                        <esri:SimpleMarkerSymbol Color="Red" Style="Circle" Size="10" />
                    </esri:SimpleRenderer.Symbol>
                </esri:SimpleRenderer>
            </Grid.Resources>
            <esri:Map x:Name="MyMap" >
                <esri:ArcGISTiledMapServiceLayer ID="World Topo Map" 
                           Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
                <esri:GeoRssLayer Source="http://earthquake.usgs.gov/earthquakes/catalogs/1day-M2.5.xml" Renderer="{StaticResource MySimpleRenderer}">
    </esri:Map>
    
  4. Add a MapTip to display information.
    <Grid>
            <Grid.Resources>
                <esri:SimpleRenderer x:Key="MySimpleRenderer">
                    <esri:SimpleRenderer.Symbol>
                        <esri:SimpleMarkerSymbol Color="Red" Style="Circle" Size="10" />
                    </esri:SimpleRenderer.Symbol>
                </esri:SimpleRenderer>
            </Grid.Resources>
            <esri:Map x:Name="MyMap" >
                <esri:ArcGISTiledMapServiceLayer ID="World Topo Map" 
                           Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
                <esri:GeoRssLayer Source="http://earthquake.usgs.gov/earthquakes/catalogs/1day-M2.5.xml" Renderer="{StaticResource MySimpleRenderer}">
                    <esri:GeoRssLayer.MapTip>
                        <Border Padding="5" Background="White" esri:GraphicsLayer.MapTipHideDelay="0:0:0.5">
                            <StackPanel>
                                <TextBlock Text="{Binding [Title]}" FontWeight="Bold" FontSize="12" />
                            </StackPanel>
                        </Border>
                    </esri:GeoRssLayer.MapTip>
                </esri:GeoRssLayer>
            </esri:Map>
    
1/27/2015