BruTile 0.6.4 not working with SharpMap

May 15, 2012 at 5:30 PM

BruTile 0.6.4 wont work with SharpMap whereas the 0.5.1 build does.

The map seems to never render.

This can be verified using the 'Async Tile Layers' sample app in SharpMap by changing the reference to the new version of BruTile.

Or just create a simple MapBox app as follows:

OsmTileSource ts = new OsmTileSource();
TileAsyncLayer osmLayer = new TileAsyncLayer(ts, "TileLayer - OSM");
      var gf = new GeometryFactory(new PrecisionModel(), 3857);
      var mathTransform = LayerTools.Wgs84toGoogleMercator.MathTransform;
      var geom = GeometryTransform.TransformBox(
          new Envelope(-4.2602, -4.2000, 56.515581, 56.51000),
      this.mapBox1.Map.Zoom = 8500;




May 16, 2012 at 2:46 PM

I looked at the problem but didn't fix it yet. I saw the SharpMap project itself is referring to a version of BruTile in nuget/packages. I think this is automatically fetched from nuget. The WinFormSample (with the TileLayerAsync sample) references a BruTile version in the ExternalReferences folder. This should also refer to the nuget version. This fixed the problem in my local version. 

Oh, and you need too change two cases of IList<ITileInfo> into var for it to compile.

May 16, 2012 at 3:46 PM

I committed the fix to SharpMap now.

May 30, 2012 at 9:47 AM