using System; using System.Collections.ObjectModel; using System.IO; using ThinkGeo.MapSuite.Core; using ThinkGeo.MapSuite.WmsServerEdition; namespace WmsPlugins { public class DisplayASimpleMapWmsLayerPlugin : WmsLayerPlugin { public DisplayASimpleMapWmsLayerPlugin() { this.WmsQueryMode = ThinkGeo.MapSuite.WmsServerEdition.WmsQueryMode.Queryable; } protected override MapConfiguration GetMapConfigurationCore(string style, string crs) { ShapeFileFeatureLayer buildingLayer = new ShapeFileFeatureLayer(YourBuildingShapeFilePath); buildingLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1; buildingLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; MapConfiguration mapConfiguration = new MapConfiguration(); mapConfiguration.Layers.Add("BuildingLayer", buildingLayer); return mapConfiguration; } protected override string GetNameCore() { return "Display A Simple Map"; } protected override Collection GetProjectionsCore() { return new Collection { yourprojection }; } protected override RectangleShape GetBoundingBoxCore(string crs) { ShapeFileFeatureLayer buildingLayer = new ShapeFileFeatureLayer(YourBuildingShapeFilePath); buildingLayer.Open(); RectangleShape boudingBox = buildingLayer.GetBoundingBox(); buildingLayer.Close(); return boudingBox; } } }