Since upgrading to ThinkGeo 9.0, I am now receiving the following error occasionally when rendering the World Map. The function that is failing is: WorldMapKitRenderLayer - protected override void DrawCore(GeoCanvas canvas, Collection<SimpleCandidate> labelsInAllLayers)
This is the older World Map Kit that came on 2 DVDs. This error does not happen with ThinkGEO 8.0. Please advise. Thank you.
System.ArgumentOutOfRangeException was unhandled by user code
HResult=-2146233086
Message=The input double value is out of range.
Parameter name: maxX
Source=MapSuiteCore
ParamName=maxX
StackTrace:
at xRM=.NSs=.Vis=(Double inputValue, String parameterName, Double minValue, LEQ= includeMinValue, Double maxValue, LEQ= includeMaxValue)
at xRM=.NSs=.Vys=(Double inputValue, String parameterName, Double minValue, LEQ= includeMinValue)
at ThinkGeo.MapSuite.Core.RectangleShape…ctor(Double minX, Double maxY, Double maxX, Double minY)
at ThinkGeo.MapSuite.Core.PositionStyle.FilterFeaturesCore(IEnumerable`1 features, GeoCanvas canvas)
at ThinkGeo.MapSuite.Core.PositionStyle.FilterFeatures(IEnumerable`1 features, GeoCanvas canvas)
at ThinkGeo.MapSuite.Core.IconStyle.DrawCore(IEnumerable`1 features, GeoCanvas canvas, Collection`1 labelsInThisLayer, Collection`1 labelsInAllLayers)
at ThinkGeo.MapSuite.Core.Style.Draw(IEnumerable`1 features, GeoCanvas canvas, Collection`1 labelsInThisLayer, Collection`1 labelsInAllLayers)
at ThinkGeo.MapSuite.Core.ZoomLevel.DrawCore(GeoCanvas canvas, IEnumerable`1 features, Collection`1 currentLayerLabels, Collection`1 allLayerLabels)
at ThinkGeo.MapSuite.Core.ZoomLevel.Draw(GeoCanvas canvas, IEnumerable`1 features, Collection`1 currentLayerLabels, Collection`1 allLayerLabels)
at ThinkGeo.MapSuite.Core.ShapeFileFeatureLayer.5BU=(GeoCanvas canvas, Collection`1 labelsInAllLayers, ZoomLevel currentZoomLevel, Collection`1 columnNames, RectangleShape marginWorldExtent)
at ThinkGeo.MapSuite.Core.ShapeFileFeatureLayer.DrawCore(GeoCanvas canvas, Collection`1 labelsInAllLayers)
at ThinkGeo.MapSuite.Core.Layer.Draw(GeoCanvas canvas, Collection`1 labelsInAllLayers)
at rMetrix.WorldMapKitRenderLayer.DrawCore(GeoCanvas canvas, Collection`1 labelsInAllLayers) in C:\MyCode\DevelopmentCode\rMetrixCode2013\rMetrix\WorldMapKitRenderLayer.cs:line 2852
at ThinkGeo.MapSuite.Core.Layer.Draw(GeoCanvas canvas, Collection`1 labelsInAllLayers)
InnerException:
The code in the function that is failing:
foreach
(WorldMapKitShapeFileFeatureLayer layer in dynamicLayers)
{
if (candidateLayerNames.Count == 0 || candidateLayerNames.ContainsKey(Path.GetFileName(layer.ShapePathFileName)))
{
canvas.BeginDrawing(image, extent, unit);
layer.Open();
layer.Draw(canvas, labelsInAllLayers);
layer.Close();
canvas.EndDrawing();
}
}