Nick,
Generally speaking, first you need to get all the records within that drawn rectangle and second, you need to get all the addresses out and check each feature if it is qualified (single family and cost more than $200K).
Let's say you have a point based data which represents the position of homes. Here is what you need to do
1, set the track mode to rectangle, then you can track rectangles on map.
winformsMap1.EditOverlay.TrackMode = TrackMode.Rectangle;
2, after tracking 2 rectangles for example, start the procedure of getting home features. First we need to get all the homes within that 2 rectangles
private Collection<Feature> GetHomeFeaturesWithinTrackedRectangles()
{
Collection<Feature> allHomes = new Collection<Feature>();
FeatureLayer homeLayer = (FeatureLayer)winformsMap1.StaticOverlay.Layers["HomeLayer"];
foreach (Feature rectangle in winformsMap1.EditOverlay.EditLayer.InternalFeatures)
{
Collection<Feature> homeFeatures = homeLayer.QueryTools.GetFeaturesWithin(rectangle.GetShape(), ReturningColumnsType.NoColumns);
foreach (Feature homeFeature in homeFeatures)
{
allHomes.Add(homeFeature);
}
}
return allHomes;
}
3, As we have the position for every home, now we need GeoCode to get the address of every point using GeoCode.
4, Finally we need the query logic to get all the home points which meets the requirements.
Hope that makes sense, let me know if you have any issues.
Thanks,
Ben