Also, I debug into it, prior to adding to the map layers collection, and I see the "Graphics" collection is empty:
if (LayerComboBox.SelectedItem != "Select...") { FeatureLayer queryLayer = new FeatureLayer(); string layerComboBoxItem; string layerID; layerComboBoxItem = LayerComboBox.SelectedItem.ToString(); layerID = GetLayerID(layerComboBoxItem).ToString(); queryLayer.ID = "QueryLayer"; queryLayer.Url = "http://......./rest/services/QueryLayerService/MapServer/" + layerID; queryLayer.OutFields.Add("*"); MyMap.Layers.Add(queryLayer); queryLayer.Initialize(); } }
QueryFormCombo1.ItemsSource = (MyMap.Layers["QueryLayer"] as FeatureLayer).LayerInfo.Fields;
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und vieles mehr. Neu hier? Erstelle kostenlos ein Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.