How can I cange the styles for a layer dynamically from what was originally set as a Default style to a custom style and back again?
This is for switching thematic reports on and off.
//Initally Set
MapLayer.ZoomLevelSet.CustomZoomLevels[0].DefaultAreaStyle = AreaStyles.Country1;
//Now I want the layer to use custom style
classBreakStyle.ClassBreaks.Add(new ClassBreak(double.MinValue, AreaStyles.Grass1));
classBreakStyle.ClassBreaks.Add(new ClassBreak(00, new AreaStyle(new GeoPen(GeoColor.FromArgb(255, 0, 50, 0)), new GeoSolidBrush(colorsInFamily[0]))));
classBreakStyle.ClassBreaks.Add(new ClassBreak(10, new AreaStyle(new GeoPen(GeoColor.FromArgb(255, 0, 50, 0)), new GeoSolidBrush(colorsInFamily[1]))));
classBreakStyle.ClassBreaks.Add(new ClassBreak(20, new AreaStyle(new GeoPen(GeoColor.FromArgb(255, 0, 50, 0)), new GeoSolidBrush(colorsInFamily[2]))));
classBreakStyle.ClassBreaks.Add(new ClassBreak(30, new AreaStyle(new GeoPen(GeoColor.FromArgb(255, 0, 50, 0)), new GeoSolidBrush(colorsInFamily[3]))));
classBreakStyle.ClassBreaks.Add(new ClassBreak(40, new AreaStyle(new GeoPen(GeoColor.FromArgb(255, 0, 50, 0)), new GeoSolidBrush(colorsInFamily[4]))));
classBreakStyle.ClassBreaks.Add(new ClassBreak(50, new AreaStyle(new GeoPen(GeoColor.FromArgb(255, 0, 50, 0)), new GeoSolidBrush(colorsInFamily[5]))));
MapLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(classBreakStyle);