Hi All-
Does anyone know if there is a way to get the feature that something was just snapped to in the Snapping Environment in ArcGIS 10? I have code that will do this in the classic snapping mode but I would like to take advantage of the new snapping environment.
In classic snapping you could loop through the IFeatureSnapAgent.FeatureCache and perfrom a HitTest to see which feature was just snapped to.
I see you can get the location of the snapped point via ISnappingEnvironment.PointSnapper.Snap(), but this does not expose any information about what was snapped to. I see you can add/clear/update a geometry cache on the ISnappingEnvironment.PointSnapper but you can't get any of the items in cache. I'm not too sure that would be helped either way since its just geometries and not features. I guess in theory you could perform a spatial query against each layer in the map with the location of the ISnappingResult but I don't see this as something that is feasible performance wise.
I am missing something or has anyone else dealt with this limitation of the new Snapping Environment?