I would like to more accurately determine if a Location is in a MapShape, or whether two MapShape intersect each other.
At present, I use something like
LocationRect? selectionRect =
LocationRect shapeLocationRect = shape.GeographicalBounds;
shapeLocationRect.MapControl = MapControl;
selectionRect = shapeLocationRect;
This only uses the bounding rectangle, so if I have a MapPolygon, then I can possibly get a hit outside of the actual shape boundaries
The problem becomes more compounded when I need to look for the intersection of two shapes
MapShape mapShape = (MapShape)layerItem;
(selectionRect.HasValue && mapShape.GeographicalBounds.Intersect(selectionRect.Value))
One point to note is that because I only have MapPolygons ort MapPaths in my layer I can check the GeographicalBounds for the Intesection. If I have MapRectangles or MapEllipses then I do not get a hit, unless I set the MapControl.
Hope you can help