I have a method that tries to find the shape closest to the point where the user double-clicks. My code is based on the IsShapeNearPoint method given, as an example, here:
gis.thinkgeo.com/Support/Dis...fault.aspx
However, when the map is zoomed to a very small scale (approximately 54) the call to ExtentHelper.GetWorldDistanceBetweenTwoScreenPoints returns a very small value - for example, .09 meters. Calling
worldSearchPoint.Buffer(0.09487569, GeographyUnit.DecimalDegree, DistanceUnitMeter)
When the worldSearchPoint has a setting of -80.059778xxxx, 26.849395xxxx
will generate the following exception:
GeometryCollection is not supported
For now I am adding guard conditions so this code is not called when the distance value is less than .1. Is there another way around this?
Here's the stack trace:
StackTrace at ThinkGeo.MapSuite.Core.x6041512f2ec33335.xa5a7d40bd00e96ed(BinaryReader x757535de42769030) at ThinkGeo.MapSuite.Core.x6041512f2ec33335.xa284b768fee41d24(Byte[] x1a22eb38b50994c5) at ThinkGeo.MapSuite.Core.x6041512f2ec33335.xc4e11096691c8c3e(Geometry x97cc877ede0295ad) at ThinkGeo.MapSuite.Core.BaseShape.BufferCore(Double distance, Int32 quadrantSegments, BufferCapType bufferCapType, GeographyUnit shapeUnit, DistanceUnit distanceUnit) at ThinkGeo.MapSuite.Core.BaseShape.Buffer(Double distance, GeographyUnit shapeUnit, DistanceUnit distanceUnit) at Framework.Services.Sketch.Renderers.Desktop30.Classes.MapShapeLayer.IsShapeNearPoint(ScreenPointF screenSearchPoint, BaseShape searchShape, Int32 pixelTolerance, GeographyUnit mapUnit, RectangleShape currentExtent, Single mapWidth, Single mapHeight)