Hi,
We currently have a situation where we click a point on the map and it selects a previously drawn polygonshape.
The code i use for this is as follows:
Dim clickedPointShape As PointShape = New PointShape(ClickedPosition.X, ClickedPosition.Y)
Dim QueryPointExtent As RectangleShape = clickedPointShape.GetBoundingBox
Layer.Open()
Dim selectedFeatures As System.Collections.ObjectModel.Collection(Of Feature) = Layer.QueryTools.GetFeaturesInsideBoundingBox(QueryPointExtent, ReturningColumnsType.AllColumns)
Layer.Close()
The problem i currently have is when a user clicks on an area of the map that the shape doesn't reside in it still returns as existing in the clicked area. I'm pretty sure this is because the test i'm performing is taking into account the shapes bounding box in the query and not the physical outline of the shape.
I need some code that will only test if the physical shape is within the clicked area and not the shapes boundbox.
Thanks
Aaron