Example using downloaded OSM tile data?

May 15, 2012 at 11:44 AM
Edited May 15, 2012 at 11:46 AM

Hello,

I'm trying to figure out how to create a TileSource using downloaded OpenStreetMap data. However, no data gets displayed on the map:

 

      ITileProvider provider = new FileTileProvider(new BruTile.Cache.FileCache(@"C:\Users\test\Downloads\OSM\Scotland", "dbf"));
      TileSource src = new TileSource(provider, new BruTile.PreDefined.SphericalMercatorInvertedWorldSchema());
      TileAsyncLayer osmLayer = new TileAsyncLayer(src, "TileLayer - OSM");
      this.mapBox1.Map.BackgroundLayer.Add(osmLayer);

 

 

If I use an OsmTileSource instead the data displays fine, but it comes from the web!
I've had a look at examples and am getting nowhere. Can someone provide me with an example of how I can get the data from file to be displayed?
Thanks.
Coordinator
May 16, 2012 at 3:01 PM

You use the extension dbf. Isn't this a shapefile you downloaded from cloudmade? http://downloads.cloudmade.com/europe/northern_europe/united_kingdom/scotland#downloads_breadcrumbs

If so, this is not a tile format. There are other sample in the sharpmap code that show shape files (shp + dbf).