Hi
We have a WPF application using ThinkGeo for showing maps.
The map has the Graticule loaded using similar code:
m_LayerGrid = new GraticuleFeatureLayer();
m_LayerGrid.Name = NAME_GridLayer;
GeoColor gridColor = GeoColor.FromArgb(150, GeoColors.Navy);
LineStyle graticuleLineStyle = new LineStyle(new GeoPen(gridColor, 1));
m_LayerGrid.GraticuleLineStyle = graticuleLineStyle;
m_LayerGrid.DrawingMarginInPixel = 50;
m_LayerGrid.GraticuleLineStyle.OuterPen.Color = gridColor;
m_LayerGrid.GraticuleLineStyle.CenterPen.Color = gridColor;
m_LayerGrid.GraticuleTextFont = new GeoFont("Arial", 10);
m_LayerGrid.GraticuleTextBrush = new GeoSolidBrush(GeoColors.Navy);
m_LayerGrid.WrappingMode = WrappingMode.None;
// set projection for the graticule
// set WrappingExtent for the graticule
m_OverlayGrid.Layers.Add(NAME_GridLayer, m_LayerGrid);
Where m_OverlayGrid is:
private readonly LayerOverlay m_OverlayGrid;
I am trying to replace LayerOverlay with FeatureLayerWpfDrawingOverlay but I got the following exception:
System.ArgumentOutOfRangeException: The input double value is out of range. (Parameter 'distance')
at ThinkGeo.Core.ValidatorHelper.CheckInputValueIsInRange(Double inputValue, String parameterName, Double minValue, RangeCheckingInclusion includeMinValue, Double maxValue, RangeCheckingInclusion includeMaxValue, String exceptionMessage)
at ThinkGeo.Core.ValidatorHelper.CheckInputValueIsInRange(Double inputValue, String parameterName, Double minValue, RangeCheckingInclusion includeMinValue, Double maxValue, RangeCheckingInclusion includeMaxValue)
at ThinkGeo.Core.ValidatorHelper.CheckInputValueIsLargerThan(Double inputValue, String parameterName, Double minValue, RangeCheckingInclusion includeMinValue)
at ThinkGeo.Core.LineShape.GetPointOnALineCore(StartingPoint startingPoint, Double distance, GeographyUnit shapeUnit, DistanceUnit distanceUnit)
at ThinkGeo.Core.LineShape.GetPointOnALine(StartingPoint startingPoint, Single percentageOfLine)
at ThinkGeo.Core.GraticuleFeatureSource.YiI=(RectangleShape extent)
at ThinkGeo.Core.GraticuleFeatureSource.XSI=(RectangleShape extent, Single scaleFactor)
at ThinkGeo.Core.GraticuleFeatureSource.GetFeaturesForDrawingCore(RectangleShape boundingBox, Double screenWidth, Double screenHeight, IEnumerable`1 returningColumnNames)
at ThinkGeo.Core.GraticuleFeatureSource.GetAllFeaturesCore(IEnumerable`1 returningColumnNames)
at ThinkGeo.Core.FeatureSource.GetFeaturesInsideBoundingBoxCore(RectangleShape boundingBox, IEnumerable`1 returningColumnNames)
at ThinkGeo.Core.FeatureSource.GetFeaturesInsideBoundingBox(RectangleShape boundingBox, IEnumerable`1 returningColumnNames)
at ThinkGeo.Core.FeatureSource.GetFeaturesInsideBoundingBox(RectangleShape boundingBox, ReturningColumnsType returningColumnNamesType)
at ThinkGeo.Core.QueryTools.GetFeaturesInsideBoundingBox(RectangleShape boundingBox, ReturningColumnsType returningColumnNamesType)
at ThinkGeo.UI.Wpf.FeatureLayerWpfDrawingOverlay.xEM=(GeoCollection`1 layers, IMapArguments mapView)
at ThinkGeo.UI.Wpf.FeatureLayerWpfDrawingOverlay.DrawAsyncCore(RectangleShape targetExtent, OverlayRefreshType overlayRefreshType, CancellationToken cancellationToken)
at ThinkGeo.UI.Wpf.Overlay.DrawAsync(RectangleShape targetExtent, OverlayRefreshType refreshType, CancellationToken cancellationToken)
Note it is working ok if LayerOverlay is used.
Is it possible to use FeatureLayerWpfDrawingOverlay with the GraticuleFeatureLayer ?
If so what is wrong with my code ?
Thanks
Best regards
Domenico