Hi Andrew,
Please download the “Map Suite WmsServer Edition Web How Do I Samples” I mentioned in post 7927 at first.
Then download the attached pre.zip (1.4 MB), this file is the pre-generated tiles with watermark, bu default please unzip it into disk D.
And you can open the DisplayASimpleMapWmsLayerPlugin.cs file then replace the GetMapConfigurationCore function by the code as below:
protected override MapConfiguration GetMapConfigurationCore(string style, string crs)
{
// Get the directory to the sample data
string worldLayerFilePath = Directory.GetParent(Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).FullName).FullName + Path.DirectorySeparatorChar + "SampleData" + Path.DirectorySeparatorChar + "Countries02.shp";
// Create the world layer from a shapefile and add a style to it
ShapeFileFeatureLayer worldLayer = new ShapeFileFeatureLayer(worldLayerFilePath);
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
// Create a MapConfiguration and add the layer to it
MapConfiguration mapConfiguration = new MapConfiguration();
mapConfiguration.Layers.Add("WorldLayer", worldLayer);
FileBitmapTileCache cache = new FileBitmapTileCache(@"D:\", "pre");
cache.TileAccessMode = TileAccessMode.ReadOnly;
mapConfiguration.TileCache = cache;
return mapConfiguration;
}
I tested that with our latest dll, it works well.
Regards,
Don