Click or drag to resize
OpenStreetMapLayer Class
OpenStreetMap tiled layer.
Inheritance Hierarchy

Namespace: Esri.ArcGISRuntime.Layers
Assembly: Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: (
public sealed class OpenStreetMapLayer : WebTiledLayer

The OpenStreetMapLayer type exposes the following members.

Public methodOpenStreetMapLayer
Initializes a new instance of the OpenStreetMapLayer class.
Public methodCheckAccess
Determines whether the calling thread has access to this DispatcherObject.
(Inherited from DispatcherObject.)
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.)
Protected methodGetTileDataAsync
Gets the tile data.
(Inherited from TiledMapServiceLayer.)
Protected methodGetTileUriAsync
Gets the tile URI.
(Inherited from WebTiledLayer.)
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 methodCode exampleInitializeAsync
Loads the metadata for this layer based on the current configuration.
(Inherited from Layer.)
Protected methodInvalidate
Causes tiled layer to clear tiles.
(Inherited from TiledLayer.)
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 methodOnInitializeTiledLayerRequestedAsync
Override this method to initialize any properties and settings prior to using the map.
(Inherited from WebTiledLayer.)
Protected methodOnPropertyChanged(String)
Notifies listeners that a property value has changed.
(Inherited from Layer.)
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.)
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 methodVerifyAccess
Enforces that the calling thread has access to this DispatcherObject.
(Inherited from DispatcherObject.)
Public propertyBrightness
Gets or sets layer brightness level.
(Inherited from TiledLayer.)
Public propertyContrast
Gets or sets layer contrast level.
(Inherited from TiledLayer.)
Public propertyCopyrightText
Gets or sets the attribution to the Web Tiled Layer provider.
(Inherited from WebTiledLayer.)
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 propertyGamma
Gets or sets layer gamma level.
(Inherited from TiledLayer.)
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 propertyLevelValues
Gets or sets the level values to use when replacing the {level} parameter in the TemplateUrl. This optional property is useful when the TemplateUrl is expecting non numeric level values. This is mainly used for the WMTS layers that are converted to WebTiledLayers when added to a webmap. The WMTS layers may use non numeric level values.
(Inherited from WebTiledLayer.)
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 propertyResamplingMode
Gets or sets the resampling mode.
(Inherited from TiledLayer.)
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.)
Public propertySubDomains
Gets or sets the sub domains. The sub domain values are used to replace the {subDomain} parameter in the TemplateUri.
(Inherited from WebTiledLayer.)
Public propertyTemplateUri
Gets or sets the template URI to the Web Tiled Layer. The template uri contains a parameterized uri. The template can contain the following templated parameters: {subDomain}, {level}, {row} and {col}.

Example of OpenStreetMap template URI: http://{subDomain}{level}/{col}/{row}.png

(Inherited from WebTiledLayer.)
Public propertyTileInfo
Gets the tiling scheme.
(Inherited from TiledLayer.)
Public eventPropertyChanged
Occurs when a property value changes.
(Inherited from Layer.)

This sample shows how to create your own open street map layer.

<esri:Map x:Name="map">
  <esri:OpenStreetMapLayer ID="OSM" />

Please read the usage guidelines for using OpenStreetMapLayer in your application at

OpenStreetMap is released under the Create Commons "Attribution-Share Alike 2.0 Generic" license.


Demonstrates adding an OpenStreetMap Layer to the Map in XAML.

Code example using the OpenStreetMapLayer Class.

<Window x:Class="OpenStreetMapLayerWindow.MainWindow"
        Height="600" Width="800">

    <!-- This sample demonstrates adding an OpenStreetMap Layer to the Map in XAML.-->

    <Grid x:Name="LayoutRoot" >

        <!-- Add a MapView Control. -->
        <esri:MapView x:Name="MapView1" WrapAround="True">

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

                <!-- Add an OpenStreetMapLayer. -->
                <esri:OpenStreetMapLayer ID="OSMLayer"/>


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 "OpenStreetMapLayerWindow.MainWindow" to be just "MainWindow".

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
OpenStreetMapLayerWindowDemonstrates adding an OpenStreetMap Layer to the Map in XAML.