Greetings. I came across what appears to be a bug in the QueryTools.GetFeaturesWithin method (and possibly others)...
I have a layer that has 23 columns, and ~100 custom columns. When I draw a shape on the map and try to get the points that were selected, I do the following:
private void TrackOverlay_TrackEnded(object sender, TrackEndedTrackInteractiveOverlayEventArgs e)
{
ShapeFileFeatureLayer layer = this.StaticOverlay.Layers["TPE"] as ShapeFileFeatureLayer;
var items = layer.QueryTools.GetFeaturesWithin(e.TrackShape, ReturningColumnsType.AllColumns);
}
When I run that, item[0].ColumnValues.Count returns 23, not 123, as expected. So it seems that "ReturningColumnsType.AllColumns" doesn't, in fact, return all columns.
Oddly enough, if I change the method to below, it pulls the custom columns that I manually request:
private void TrackOverlay_TrackEnded(object sender, TrackEndedTrackInteractiveOverlayEventArgs e)
{
ShapeFileFeatureLayer layer = this.StaticOverlay.Layers["TPE"] as ShapeFileFeatureLayer;
List<string> columns = new List<string>();
columns.Add("Foo");
columns.Add("Bar");
var items = layer.QueryTools.GetFeaturesWithin(e.TrackShape, columns);
}
In this case, items[0].ColumnValues.Count returns 2. Neither "Foo" nor "Bar" exist in the original 23 columns.
Am I doing something wrong, or is this a bug?
Thanks.
Charley.