This example uses the OpenStreetMapDataProvider class to connect the Map Control to the OpenStreetMap image tile service.
Review the Copyright and License and Tile usage policy pages before using map images in the OpenStreetMap format.
To use the OpenStreetMap provider, you should provide the UserAgent parameter with a valid value to identify your application.
Set the OpenStreetMapDataProvider.TileUriTemplate property to a tile's URL. You can use the public OpenStreetMap server that has limitations described in the Tile usage policy. To do this, set TileUriTemplate to "https://.tile.openstreetmap.org///.png" . You can also deploy your own tile server.
Files to Review
Documentation
Does this example address your development requirements/objectives?
(you will be redirected to DevExpress.com to submit your response)
Example Code
XAML<Window x:Class="DXMapLesson2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxm="http://schemas.devexpress.com/winfx/2008/xaml/map"
Title="MainWindow" Height="350" Width="525" >
<Grid>
<dxm:MapControl Name="mapControl1">
<dxm:ImageLayer>
<dxm:ImageLayer.DataProvider>
<dxm:OpenStreetMapDataProvider TileUriTemplate="http://{subdomain}.tile.MyCustomOSMProvider.org/{tileLevel}/{tileX}/{tileY}.png"
WebRequest="OnWebRequest"/>
</dxm:ImageLayer.DataProvider>
</dxm:ImageLayer>
<!--region #Elements-->
<dxm:MapControl.ZoomTrackbarOptions>
<dxm:ZoomTrackbarOptions Margin="16" Orientation="Horizontal" VerticalAlignment="Bottom" />
</dxm:MapControl.ZoomTrackbarOptions>
<dxm:MapControl.ScrollButtonsOptions>
<dxm:ScrollButtonsOptions VerticalAlignment="Bottom" HorizontalAlignment="Right" />
</dxm:MapControl.ScrollButtonsOptions>
<dxm:MapControl.ScalePanelOptions>
<dxm:ScalePanelOptions HorizontalAlignment="Right" VerticalAlignment="Bottom" Visible="False" />
</dxm:MapControl.ScalePanelOptions>
<dxm:MapControl.CoordinatesPanelOptions>
<dxm:CoordinatesPanelOptions VerticalAlignment="Top" HorizontalAlignment="Right" />
</dxm:MapControl.CoordinatesPanelOptions>
<!--endregion #Elements-->
</dxm:MapControl>
</Grid>
</Window>