Using BruTile on standalone PCs

Aug 18, 2011 at 2:40 PM

Hello every one. Can I use BruTile working with *.osm files(from on standalone PC(offline).


        const string filePath = @"D:\Temp\���������\gis_OSM\Map\";

        SharpMap.Map _globalMap;

        /// <summary>
        /// ����������� ������ osmMAP
        /// </summary>
        public osmMAP(System.Drawing.Size _mapSize)
            _globalMap = new SharpMap.Map(_mapSize);
            BruTile.PreDefined.SphericalMercatorWorldSchema prSchema=new SphericalMercatorWorldSchema();
            var fSource = new TileSource(new FileTileProvider(new FileCache(filePath, "osm")), prSchema);

            var osmLayer = new TileLayer(new OsmTileSource(), "OSM");
            var osmFileLayer = new TileLayer(fSource, "OSM FileLayer");

        public System.Drawing.Image getImage()
            return _globalMap.GetMap();

Using this code I can see just backcolor of SharpMap.Forms.MapImage. If I add osmLayer it works great. 


Aug 19, 2011 at 11:12 AM


As I replied in SharpMap forum, you are probably not using a tilesource. You could try SharpMap's shapefile provider.


Aug 19, 2011 at 11:15 AM

Thank you Paul. I've already read it ;)