I would like to add a WorldMapKitRenderLayer that comes with the World Map Kit product as one of the WMS layers. I tried creating this sample plugin
public class WorldMapKitLayerPlugin : WmsLayerPlugin
{
protected override MapConfiguration GetMapConfigurationCore(string style, string crs)
{
var wmkLayer = new WorldMapKitRenderLayer(@"c:\gis\wmk");
wmkLayer.LoadLayers();
MapConfiguration mapConfiguration = new MapConfiguration();
mapConfiguration.Layers.Add("WMK", wmkLayer);
return mapConfiguration;
}
// In this method you need to return the name of the Layer that WMS will expose.
// You will use this name on the client to specify the layer you want to consume
protected override string GetNameCore()
{
return "World Map Kit";
}
// In this method you need to return the projections that are supported by your data.
// It is your responsability to project the data in the MapConfiguration for each projection
// type you specify here.
protected override Collection<string> GetProjectionsCore()
{
return new Collection<string> { "EPSG:4326" };
}
// In this method you need to return the bounding box of the layer.
protected override RectangleShape GetBoundingBoxCore(string crs)
{
return new RectangleShape(-126.826171875, 57.104766845702, -70.83984375, 18.960235595702);
}
}
and got message that this layer is not supported. What I want to do is create a layer that is styled similar to the WorldMapKitRenderLayer available on WMS, without having to redo the code. How can this be done?
TIA.