Solved! Go to Solution.
Thanks a lot for the code. I actually able to run the code and this is populating the values correctly to my combo box. But however on selection of any particular value the feature list turns out to be empty. Attaching the screen shot for that. Not sure why.
Any thoughts...
~Saurabh.
private void QueryComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { GroupedFeatures features = e.AddedItems[0] as GroupedFeatures; if (features != null) { ESRI.ArcGIS.Client.Geometry.Envelope selectedFeatureExtent = gf.GetFeaturesExtent(); MyMap.ZoomTo(selectedFeatureExtent); } }
Is this a multi-part polyline in the source data? If not, I would suggest pre-processing the data to create multi-part polylines which you could do with a python script on say a weekly basis or whatever interval the data gets updated at.
you can group features by attribute (polyline name) and add name in combobox with Its related features.
I have modified your sample code as attached.
Thanks a lot for the code. I actually able to run the code and this is populating the values correctly to my combo box. But however on selection of any particular value the feature list turns out to be empty. Attaching the screen shot for that. Not sure why.
Any thoughts...
~Saurabh.
private void QueryComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { GroupedFeatures features = e.AddedItems[0] as GroupedFeatures; if (features != null) { ESRI.ArcGIS.Client.Geometry.Envelope selectedFeatureExtent = gf.GetFeaturesExtent(); MyMap.ZoomTo(selectedFeatureExtent); } }