Hello,
I have a layer that I'm loading with custom data from a database using the following:
_countryLayer.FeatureSource.CustomColumnFetch += new EventHandler<CustomColumnFetchEventArgs>(FeatureSource_CustomColumnFetch);
_countryLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.RequiredColumnNames.Add("CustomColumn");
I know my custom data is being loaded because I can see the "CustomColumn" data on my map when I add a TextStyle:
TextStyle myTextStyle = TextStyles.City1("CustomColumn");
_countryLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(myTextStyle);
_countryLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(myTextStyle);
All this works great and my "CustomColumn" data shows up as labels on my country layer. My problem comes when I try to get that "CustomColumn" data out of the selected feature during the Map_Click event:
_countryLayer.Open();
Collection<Feature> selectedFeatures = _countryLayer.QueryTools.GetFeaturesContaining(e.Position, new string[2] { "CNTRY_NAME", "CustomColumn" });
_countryLayer.Close();
The GetFeaturesContaining method throws an InvalidOperationException "The Field namd you want is not exist". Thanks for your help!
Joe