Edit this page

OpenStreetMapProvider

RadMap can visualize data from the OpenStreetMaps REST services. You can enable tile caching to a local folder setting a new LocalFileCacheProvider to the OpenStreetMapProvider.CacheProvider property.

Figure 1: OpenStreetMapProvider

map-openstreetmapprovider 001

Using OpenStreetMapProvider

string cacheFolder = @"..\..\cache";
OpenStreetMapProvider osmProvider = new OpenStreetMapProvider();
LocalFileCacheProvider cache = new LocalFileCacheProvider(cacheFolder);
osmProvider.CacheProvider = cache;
this.radMap1.MapElement.Providers.Add(osmProvider);

Dim cacheFolder As String = "..\..\cache"
Dim osmProvider As New OpenStreetMapProvider()
Dim cache As New LocalFileCacheProvider(cacheFolder)
osmProvider.CacheProvider = cache
Me.radMap1.MapElement.Providers.Add(osmProvider)