Guys, what would cause this exception even though I am calling Layer.Open before Layer.QueryTools?
This is the stack trace:
Type : System.InvalidOperationException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : The FeatureSource is not open. Please call the Open method before calling this method.
Source : MapSuiteCore
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : System.Collections.ObjectModel.Collection`1[ThinkGeo.MapSuite.Core.Feature] GetFeaturesInsideBoundingBoxCore(ThinkGeo.MapSuite.Core.RectangleShape, System.Collections.Generic.IEnumerable`1[System.String])
Stack Trace : at ThinkGeo.MapSuite.Core.InMemoryFeatureSource.GetFeaturesInsideBoundingBoxCore(RectangleShape boundingBox, IEnumerable`1 returningColumnNames)
at ThinkGeo.MapSuite.Core.FeatureSource.GetFeaturesNearestToCore(BaseShape targetShape, GeographyUnit unitOfData, Int32 numberOfItemsToFind, IEnumerable`1 returningColumnNames)
at ThinkGeo.MapSuite.Core.FeatureSource.GetFeaturesNearestTo(BaseShape targetShape, GeographyUnit unitOfFeatureSource, Int32 numberOfItemsToFind, IEnumerable`1 returningColumnNames)
at ThinkGeo.MapSuite.Core.QueryTools.GetFeaturesNearestTo(BaseShape targetShape, GeographyUnit unitOfData, Int32 numberOfItemsToFind, IEnumerable`1 returningColumnNames)
at EMS.ThinkGeoLibrary.MapSuite.Utilities.FeatureFinderHelper.QueryFeatures(BaseShape shape, FeatureLayer layer, IEnumerable`1 columnnNames, GeographyUnit gUnit, DistanceUnit dUnit, SpatialOperationType ops, Int32 numberOfFeaturesToReturn)
TIA.