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;
Ingelogde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Maak gratis een account aan.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.