Click or drag to resize
GeoRssLayer Class
GeoRSS Layer.
Inheritance Hierarchy

Namespace: Esri.ArcGISRuntime.Layers
Assembly: Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 10.2.7.0 (10.2.7.1234)
Syntax
public sealed class GeoRssLayer : GraphicsLayer

The GeoRssLayer type exposes the following members.

Constructors
  NameDescription
Public methodGeoRssLayer
Initializes a new instance of the GeoRssLayer class.
Public methodGeoRssLayer(Uri)
Creates a new instance of the GeoRssLayer class.
Top
Methods
  NameDescription
Public methodCheckAccess
Determines whether the calling thread has access to this DispatcherObject.
(Inherited from DispatcherObject.)
Public methodClearSelection
Unselects all graphics in the layer
(Inherited from GraphicsLayer.)
Public methodClearValue(DependencyProperty)
Clears the local value of a property. The property to be cleared is specified by a DependencyProperty identifier.
(Inherited from DependencyObject.)
Public methodClearValue(DependencyPropertyKey)
Clears the local value of a read-only property. The property to be cleared is specified by a DependencyPropertyKey.
(Inherited from DependencyObject.)
Public methodCoerceValue
Coerces the value of the specified dependency property. This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject.
(Inherited from DependencyObject.)
Public methodEquals
Determines whether a provided DependencyObject is equivalent to the current DependencyObject.
(Inherited from DependencyObject.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Gets a hash code for this DependencyObject.
(Inherited from DependencyObject.)
Public methodGetLocalValueEnumerator
Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject.
(Inherited from DependencyObject.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue
Returns the current effective value of a dependency property on this instance of a DependencyObject.
(Inherited from DependencyObject.)
Public methodHitTestAsync(ViewBase, Point)
Performs a Hit Test against the GraphicsLayer at the given screen point, relative to the upper left of the map.
(Inherited from GraphicsLayer.)
Public methodHitTestAsync(ViewBase, Point, Int32)
Performs a Hit Test against the GraphicsLayer at the given screen point, relative to the upper left of the map.
(Inherited from GraphicsLayer.)
Public methodHitTestAsync(ViewBase, Point, CancellationToken)
Performs a Hit Test against the GraphicsLayer at the given screen point, relative to the upper left of the map.
(Inherited from GraphicsLayer.)
Public methodHitTestAsync(ViewBase, Rect, Int32)
Performs a Hit Test against the GraphicsLayer at the given the intersecting rectangle relative to the upper left of the map.
(Inherited from GraphicsLayer.)
Public methodHitTestAsync(ViewBase, Point, Int32, CancellationToken)
Performs a Hit Test against the GraphicsLayer at the given screen point, relative to the upper left of the map.
(Inherited from GraphicsLayer.)
Public methodHitTestAsync(ViewBase, Rect, Int32, CancellationToken)
Performs a Hit Test against the GraphicsLayer at the given the intersecting rectangle relative to the upper left of the map.
(Inherited from GraphicsLayer.)
Public methodCode exampleInitializeAsync
Loads the metadata for this layer based on the current configuration.
(Inherited from Layer.)
Public methodInvalidateProperty
Re-evaluates the effective value for the specified dependency property
(Inherited from DependencyObject.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnGraphicItemsChanged
Called when graphics are added to or removed from the layer
(Inherited from GraphicsLayer.)
Protected methodOnInitializeGraphicsLayerRequestedAsync
Override this method to initialize any properties and settings prior to using the map.
(Overrides GraphicsLayerOnInitializeGraphicsLayerRequestedAsync.)
Protected methodOnPropertyChanged(DependencyPropertyChangedEventArgs)
Invoked whenever the effective value of any dependency property on this DependencyObject has been updated. The specific dependency property that changed is reported in the event data.
(Inherited from DependencyObject.)
Protected methodOnPropertyChanged(String)
Notifies listeners that a property value has changed.
(Inherited from Layer.)
Public methodReadLocalValue
Returns the local value of a dependency property, if it exists.
(Inherited from DependencyObject.)
Public methodSetCurrentValue
Sets the value of a dependency property without changing its value source.
(Inherited from DependencyObject.)
Protected methodSetLayerInitializationFailed
status must be failed - if not throw
(Inherited from Layer.)
Protected methodSetLayerStatus
Status cannot be failed or it will throw. To set Status to LayerStatus.Failed, call SetLayerInitializationFailed.
(Inherited from Layer.)
Public methodSetValue(DependencyProperty, Object)
Sets the local value of a dependency property, specified by its dependency property identifier.
(Inherited from DependencyObject.)
Public methodSetValue(DependencyPropertyKey, Object)
Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property.
(Inherited from DependencyObject.)
Protected methodShouldSerializeProperty
Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.
(Inherited from DependencyObject.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdateAsync
Reloads the RSS feed from the endpoint.
Public methodVerifyAccess
Enforces that the calling thread has access to this DispatcherObject.
(Inherited from DispatcherObject.)
Top
Fields
  NameDescription
Public fieldStatic memberServiceUriProperty
Identifies the ServiceUri dependency property.
Top
Properties
  NameDescription
Public propertyDefaultSpatialReference
Gets the default spatial reference.
(Inherited from Layer.)
Public propertyDependencyObjectType
Gets the DependencyObjectType that wraps the CLR type of this instance. 
(Inherited from DependencyObject.)
Public propertyDispatcher
Gets the Dispatcher this DispatcherObject is associated with.
(Inherited from DispatcherObject.)
Public propertyDisplayName
Gets or sets the display name.
(Inherited from Layer.)
Public propertyFullExtent
Gets the full extent of the layer in it's default spatial reference.
(Inherited from Layer.)
Public propertyGraphics
Gets or sets the graphics collection.
(Inherited from GraphicsLayer.)
Public propertyGraphicsSource
Gets or sets a collection used to contain the graphics of the GraphicsLayer.
(Inherited from GraphicsLayer.)
Public propertyID
Gets or sets an ID associated with this layer.
(Inherited from Layer.)
Public propertyInitializationException
Gets the initialization exception.
(Inherited from Layer.)
Public propertyIsSealed
Gets a value that indicates whether this instance is currently sealed (read-only).
(Inherited from DependencyObject.)
Public propertyIsVisible
Gets or sets the layer visibility.
(Inherited from Layer.)
Public propertyCode exampleLabeling
Gets or sets the LabelProperties which is used to enable labeling of a GraphicsLayer.
(Inherited from GraphicsLayer.)
Public propertyMaxScale
Gets or sets the maximum scale to display this layer at. A small number allows the map to display the layer when zooming further in.
(Inherited from Layer.)
Public propertyMinScale
Gets or sets the minimum scale to render this layer at. A large number allows the map to display the layer when zooming further out.
(Inherited from Layer.)
Public propertyOpacity
Gets or sets the opacity.
(Inherited from Layer.)
Public propertyRenderer
Gets or sets the renderer used for generating symbols.
(Inherited from GraphicsLayer.)
Public propertyCode exampleRenderingMode
Gets or sets a value indicating which rendering mode to use.
(Inherited from GraphicsLayer.)
Public propertySceneProperties
Gets or sets the scene properties.
(Inherited from GraphicsLayer.)
Public propertySelectedGraphics
Gets the selected graphics.
(Inherited from GraphicsLayer.)
Public propertySelectionColor
Gets or sets the color for selected graphics.
(Inherited from GraphicsLayer.)
Public propertyServiceUri
Gets or sets the URI for the RSS feed
Public propertyShowLegend
Gets or sets a value indicating whether this layer should show in a legend
(Inherited from Layer.)
Public propertyStatus
The Layer's Status, indicating whether it is being/has been initialized, or initialization failed.
(Inherited from Layer.)
Top
Events
  NameDescription
Public eventLegendChanged
Occurs when the legend of the layer changed.
(Inherited from GraphicsLayer.)
Public eventPropertyChanged
Occurs when a property value changes.
(Inherited from Layer.)
Top
Remarks

Only GeoRSS-simple feeds are supported.

The graphic will not have a symbol associated with them. You should specify a renderer on this layer, or manually assign symbols to the graphics when the graphics collection gets features added.

Examples

Creates a GeoRssLayer based on the United States Geological Survey earthquake feed and assigned a SimpleRenderer.

Code example using the GeoRSSLayer Class.

XAML
<Window x:Class="GeoRSSLayerWindow.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
        Height="600" Width="800"
        Tag="GeoRSSLayerWindow" >

    <Grid>
        <Grid.Resources>

            <!-- Create a custom SimpleMarkerSymbol earthquake locations. -->
            <esri:SimpleRenderer x:Key="MySimpleRenderer">
                <esri:SimpleMarkerSymbol Color="#FF0A57FC" Size="12" Style="Triangle" />
            </esri:SimpleRenderer>

        </Grid.Resources>

        <!-- Add a MapView Control. Set the WrapAround mode to True so that map can pan around continuously. -->
        <esri:MapView x:Name="MapView1" WrapAround="True">

            <!-- Add a Map. -->
            <esri:Map  x:Name="MyMap">

                <!-- Add a backdrop ArcGISTiledMapServiceLayer. -->
                <esri:ArcGISTiledMapServiceLayer 
                    ServiceUri="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer" />

                <!-- Add a GeoRssLayer. A custom SimpleRenderer is applied based on the settings in the XAML file 
                in the Grid.Resources section. -->
                <esri:GeoRssLayer ID="MyGeoRssLayer" Renderer="{StaticResource MySimpleRenderer}"
                                  ServiceUri="http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_week.atom"  />
            </esri:Map>
        </esri:MapView>


        <StackPanel Width="300" HorizontalAlignment="Right" VerticalAlignment="Top" Background="Black"
                    Orientation="Vertical">

            <!-- Add a button for the user to manually refresh the GeoRssLayer data feed. -->
            <Button Margin="3" Content="Update" Click="OnLayerUpdateButtonClick"/>

            <!-- Textbox to display a message if the GeoRssLayer data feed refresh was successful. -->
            <TextBlock x:Name="OutputTextBox" Foreground="White"/>

        </StackPanel>
    </Grid>

</Window>

SPECIAL NOTE: The XAML displayed above comes from a C# project. If you are a VB.NET developer, you will need to modify the text for the x:Class namespace from "GeoRSSLayerWindow.MainWindow" to be just "MainWindow".

// NOTE: Creates a GeoRssLayer based on the United States Geological Survey earthquake feed and assigned 
// a SimpleRenderer.

namespace GeoRSSLayerWindow
{
    public partial class MainWindow : System.Windows.Window
    {
        public MainWindow()
        {
            InitializeComponent();
            Init();

        }

        private async void Init()
        {
            var layer = MapView1.Map.Layers["MyGeoRssLayer"];
            await layer.InitializeAsync();

        }

        private async void OnLayerUpdateButtonClick(object sender, System.Windows.RoutedEventArgs e)
        {

            try
            {
                // Clear out any existing messages to the user.
                OutputTextBox.Text = "";

                // Get the GeoRssLayer from the Map. The GeoRssLayer was previously added in the Xaml.
                Esri.ArcGISRuntime.Layers.GeoRssLayer myGeoRssLayer = null;
                myGeoRssLayer = MapView1.Map.Layers[1] as Esri.ArcGISRuntime.Layers.GeoRssLayer;

                // Ensure we have a something for the GeoRssLayer
                if (myGeoRssLayer != null)
                {

                    // Reload the information about the GeoRssLayer from the feed source.
                    await myGeoRssLayer.UpdateAsync();

                    // Display a message to the user that the GeoRssLayer was updated successfully.
                    OutputTextBox.Text = "The GeoRssLayer was updated successfully.";

                }


            }
            catch (System.Exception ex)
            {

                // There was some problem with the application. Provide details to the user. 
                System.Windows.MessageBox.Show(ex.Message);

            }

        }

    }
}
See Also
Supported Platforms
This type is supported on the following ArcGIS Runtime .NET SDK platforms:
Windows Desktop
Windows Phone
Windows Store
Additional Examples
Hyperlink to ExampleDescription
GeoRSSLayerWindowCreates a GeoRssLayer based on the United States Geological Survey earthquake feed and assigned a SimpleRenderer.