I'm busy trying to create a class that inherits from your Map class.
The strange thing is that although it tells me the layer I've added exists, it isnt there. but when I use your map class directly the code works.
here is my code
public class MyWebMap : ThinkGeo.MapSuite.WebEdition.Map { }
as you can see its a straight inheritance, and I haven't even added any additional methods to it yet.
The code in the OnLoad section of my class is displayed below
MyWebMap1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromArgb(255, 0, 50, 0)); MyWebMap1.CurrentExtent = new RectangleShape(-195.7852, 91.2020, 0.2821, -30.6353); MyWebMap1.MapUnit = GeographyUnit.DecimalDegree; MyWebMap1.MapTools.OverlaySwitcher.Enabled = true; MyWebMap1.MapTools.MouseCoordinate.Enabled = false; MyWebMap1.MapTools.ScaleLine.Enabled = false; MyWebMap1.MapTools.PanZoomBar.Enabled = false; ShapeFileFeatureLayer provinceLayer = new ShapeFileFeatureLayer(MapPathSecure("~/Uploads/Shapefiles/sa_prov_dd_84.shp")); provinceLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1; provinceLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; provinceLayer.Name = "Provinces"; MyWebMap1.StaticOverlay.TileType = ThinkGeo.MapSuite.WebEdition.TileType.MultipleTile; MyWebMap1.StaticOverlay.Layers.Add(provinceLayer.Name, provinceLayer);
Very simple. I know it works because if I use your map directly it works perfectly, yet if I use my inherited map, it sets all the settings but the OverlaySwitcher is empty, yet as stated before the StaticOverlay.Layers shows that there is a layer there in my debugger.