Skip to main content
A newer version of this page is available. .

OpenStreetMapDataProvider Class

The class that loads map images from a web resource that provides data in the OpenStreetMap format.

Namespace: DevExpress.UI.Xaml.Map

Assembly: DevExpress.UI.Xaml.Map.v18.2.dll

Declaration

public class OpenStreetMapDataProvider :
    MapDataProviderBase

Remarks

Before using map images in the OpenStreetMap format, please review the Copyright and License and Tile usage policy pages. To control which web resource should be used in your application as an OpenStreetMap data provider, you should assign a specific value for the OpenStreetMapDataProvider.TileUriTemplate property. Note that, by default, this property is set to obtain data from the OpenStreetMap official web service.

Example

This lesson demonstrates how to create a simple map application which connects to the OpenStreetMap data provider.

<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:OpenStreetMapLesson"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Map="using:DevExpress.UI.Xaml.Map"
    x:Class="OpenStreetMapLesson.MainPage"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">

        <Map:MapControl >
            <Map:MapControl.Layers>
                <Map:ImageTilesLayer>
                    <Map:ImageTilesLayer.DataProvider>
                        <Map:OpenStreetMapDataProvider/>
                    </Map:ImageTilesLayer.DataProvider>
                </Map:ImageTilesLayer>
            </Map:MapControl.Layers>
        </Map:MapControl>

    </Grid>
</Page>

Inheritance

Object
Windows.UI.Xaml.DependencyObject
See Also