{ "id" : 3, "name" : "Counties", "type" : "Feature Layer", "geometryType" : "esriGeometryPolygon", "description" : "This thematic map presents the population density in the United States in 2009. Population density is the number of people per square mile. It is calculated by dividing the total population count of geographic feature by the area of the feature, in square miles. The area is calculated from the geometry of the geographic feature in projected coordinates. The geography depicts states at greater than 25m scale, counties at 1m to 25m scale, Census Tracts at 250k to 1m scale, and Census Block Groups at less than 250k scale. The map has been designed to be displayed with semi-transparency of about 50% for overlay on other base maps, which is reflected in the legend for the map. For more information on this map, visit us online at http://goto.arcgisonline.com/maps/Demographics/USA_Population_Density", "definitionExpression" : "", "copyrightText" : "Copyright:© 2009 ESRI", "minScale" : 25000000, "maxScale" : 750001, "extent" : { "xmin" : -19840230.3902342, "ymin" : 2144435.3403614, "xmax" : -7452840.46520711, "ymax" : 11537127.3143578, "spatialReference" : { "wkid" : 102100 } }, "displayField" : "NAME", "fields" : [ {"name" : "Shape", "type" : "esriFieldTypeGeometry", "alias" : "Shape"}, {"name" : "ID", "type" : "esriFieldTypeString", "alias" : "ID"}, {"name" : "NAME", "type" : "esriFieldTypeString", "alias" : "Name"}, {"name" : "ST_ABBREV", "type" : "esriFieldTypeString", "alias" : "State Abbreviation"}, {"name" : "TOTPOP_CY", "type" : "esriFieldTypeInteger", "alias" : "2009 Total Population"}, {"name" : "POPDENS_CY", "type" : "esriFieldTypeDouble", "alias" : "2009 Population Density"}, {"name" : "LANDAREA", "type" : "esriFieldTypeDouble", "alias" : "Land Area in Square Miles"}, {"name" : "Shape_Length", "type" : "esriFieldTypeDouble", "alias" : "Shape_Length"}, {"name" : "Shape_Area", "type" : "esriFieldTypeDouble", "alias" : "Shape_Area"} ], "parentLayer" : {"id" : 0, "name" : "USA Population Density"}, "subLayers" : [] }
<esri:FeatureLayer Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/0" Mode="SelectionOnly" Initialized="FeatureLayer_Initialized">
private void FeatureLayer_Initialized(object sender, EventArgs e) { FeatureLayer featureLayer = sender as FeatureLayer; List<Field> fields = featureLayer.LayerInfo.Fields; fields.ForEach(field => Debug.WriteLine(String.Format("Field Name = {0}, Alias = {1}, type = {2}", field.Name, field.Alias, field.Type))); }
Hi guys,I've created two posts in my technical blog that demonstrates how to do that. I've created an extension method for the ArcGISDynamicMapServiceLayer class. Unfortunally, my blog is in brazilian portuguese but you guys can easily translated it using Google (I guess).See links below:Estendendo a ESRI ArcGIS API For Microsoft Silverlight/WPF �?? Parte 1http://araimundo.blogspot.com/2010/05/estendendo-esri-arcgis-api-for_29.htmlEstendendo a ESRI ArcGIS API For Microsoft Silverlight/WPF �?? Parte 2 http://araimundo.blogspot.com/2010/05/estendendo-esri-arcgis-api-for_6136.htmlBest regards.Ari C. RaimundoApplication DeveloperCuritiba-PR-Brazil
Hi Ari,Thanks a lot for your code it helped me a lot... saved my day, it gives a exact approach for fetching the fields of a DynamicMapServer layer I have been searching for a while for a guide for similar approach and you have done a awesome job and moreover shared your work -- not just giving pointers like in other posts. Thats really cool. Thanks a lot all points to you. Also by the way Curitiba is a nice cool town.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.