OpenStreetMap
OpenStreetMap is an open source map that is freely editable by the public. This can be added as data to your application with the following Mapnik, CycleMap, NoName, and Osmarender style types. See OpenStreetMap for more information.
Adding OpenStreetMap
You can add OpenStreetMap 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).
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"
- In the Map element, add a OpenStreetMapLayer with an ID of OSMLayer and CycleMap as the Style as shown in the following code sample:
<esri:Map x:Name="MyMap" > <esri:OpenStreetMapLayer ID="OSMLayer" Style="CycleMap" /> </esri:Map>
- Run the application.