Does anyone have any suggestions on how to fix this? I’m using the DynamicIsoLineLayer, set to use ClosedLinesAsPolygons. At various zoom levels, the entire layer won’t draw. The two screen shots I’ve included show what I’m experiencing. The code attached is what actually creates the layer. Any suggestions would be welcome.
privateDynamicIsoLineLayer GetGridIsoLineLayer(){DynamicIsoLineLayer isoLineLayer =null;
try{//Create a grid cell matrix based on the textboxes and the current extent//CreateGridCellMatrix();
//Load the grid we just created into the GridIsoLineLayer using the number of breaks defines//on the screenCollection<double> isoLineLevels = GridIsoLineLayer.GetIsoLineLevels(this._isolinePointData,this._isolineLineBreaks);for(inti = 0; i < isoLineLevels.Count; i++){isoLineLevels = Math.Round(isoLineLevels, 2);}
isoLineLayer =newDynamicIsoLineLayer(this._isolinePointData, isoLineLevels,newInverseDistanceWeightedGridInterpolationModel(2,double.MaxValue), IsoLineType.ClosedLinesAsPolygons);
// determine the grid size for the current extentisoLineLayer.CellHeightInPixel = (int)this.map.ActualHeight /this._isolineCellRows;isoLineLayer.CellWidthInPixel = (int)this.map.ActualWidth /this._isolineCellColumns;
//Create a series of colors from blue to red that we will use for the breaksCollection<geocolor> colors = GeoColor.GetColorsInQualityFamily(GeoColor.StandardColors.Blue, GeoColor.StandardColors.Red, isoLineLevels.Count, ColorWheelDirection.Clockwise);
//Setup a class break style based on the isoline levels and the colorsClassBreakStyle classBreakStyle =newClassBreakStyle(isoLineLayer.DataValueColumnName);
Collection
<thinkgeo.mapsuite.core.style> firstStyles =newCollection
<thinkgeo.mapsuite.core.style>();firstStyles.Add(newLineStyle(newGeoPen(colors[0], 3)));firstStyles.Add(newAreaStyle(newGeoPen(GeoColor.SimpleColors.LightBlue, 3),newGeoSolidBrush(newGeoColor(150, colors[0]))));classBreakStyle.ClassBreaks.Add(newClassBreak(double.MinValue, firstStyles));for(inti = 0; i < colors.Count - 1; i++){Collection
<thinkgeo.mapsuite.core.style> styles =newCollection
<thinkgeo.mapsuite.core.style>();styles.Add(newLineStyle(newGeoPen(colors[i + 1], 3)));styles.Add(newAreaStyle(newGeoPen(GeoColor.SimpleColors.LightBlue, 3),newGeoSolidBrush(newGeoColor(150, colors[i + 1]))));classBreakStyle.ClassBreaks.Add(newClassBreak(isoLineLevels, styles));}isoLineLayer.CustomStyles.Add(classBreakStyle);
//Create the text styles to label the linesTextStyle textStyle = TextStyles.CreateSimpleTextStyle(isoLineLayer.DataValueColumnName,“Arial”, 8, DrawingFontStyles.Bold, GeoColor.StandardColors.Black, 0, 0);textStyle.HaloPen =newGeoPen(GeoColor.StandardColors.White, 2);textStyle.OverlappingRule = LabelOverlappingRule.NoOverlapping;textStyle.SplineType = SplineType.StandardSplining;textStyle.DuplicateRule = LabelDuplicateRule.UnlimitedDuplicateLabels;textStyle.TextLineSegmentRatio = 9999999;textStyle.FittingLineInScreen =true;textStyle.SuppressPartialLabels =true;isoLineLayer.CustomStyles.Add(textStyle);
}catch(Exception ex){this.LogException(ex,“An exception occurred while getting the grid isoline layer.”);}
returnisoLineLayer;
}

