This project has moved and is read-only. For the latest updates, please go here.

How to Integrate SharpMap with Tilecache+Mapserver

Oct 21, 2009 at 10:11 AM


I am new to SharpMap. I setup Mapserver as WMS server, and tried to display map using SharpMap, it works, but peformance is not very good.

so I am trying to pre-cache tiles and use Tilecache as a proxy between my app and Mapperver. It seems not to work. I know Tilecache uses WMS-C protocol, so I wonder if SharpMap support WMS-C. Or the approach I am using is completely wrong?


Oct 22, 2009 at 10:20 AM

Hi senlinl,

Yes, the TiledWmsLayer uses the WMS-C protocol. The current implementation is slow because it requests all tiles sequentially one by one. A possible improvement (that is somewhere on my todo list) is to request the tiles async in parallel. I won't have time for this on short term. If I get to it I will use the BruTile lib to do the requests, and will use WaitHandles for all the threads to return. If you want to implement it for yourself you can take a look at:

This approach will make it faster but what you really want in a tiling client is to render the tiles when they arrive. You need a completely different architecture for this and I have worked on this as part of the BruTile project. Here is a Silverlight sample BruTile in action:

I have plans to integrate SharpMap with BruTile. One way is to add a SharpMap TileProvider in BruTile. Another way is to add some kind of BruTile renderer to SharpMap. Its all work in progress but I foresee a bright future :)



Nov 5, 2009 at 4:04 PM

Hi Paul,

I visited your website and after being impressed by the demo Martijn gave, I had a closer look at BruTile. And really it looks great (good quality and fast)!

As I want to territory maps ( based a.o. on ESRI shapefiles and Lat/Long markers I'm thinking of using SharpMap and BruTile for a desktop environment (WinForms or WPF). Basically the same concept as Erik descripted in your discussion area.

Did you make any progress using SharpMap and if so do you have an example demonstrating it?

If the future is that bright; you might consider wearing sunglasses like the CQC guys.

Keep up the good work,


Nov 14, 2009 at 10:49 AM

Hi Frank,

I just committed a sample with the SharpMapTile provider. It is in BruTileWpf.