Example 3: Adding a WMS-layer to the map

It's really easy to add a WMS-layer to the SharpMap map
Add the code below to the the code you've written so far in this tutorial

SharpMap.Layers.WmsLayer wmsL = new SharpMap.Layers.WmsLayer(
    "US Cities", 

//Force PNG format. Else we can't see through
//Force version 1.1.0
wmsL.Version = "1.1.0";
//Add layer named 2 in the service (Cities)
//Set the SRID
wmsL.SRID = 4326;

//Add layer to map

You should now have a Map with cities shown on them (like below)

Last edited Jan 8, 2015 at 8:10 AM by FObermaier, version 3