Community
All Communities
Products
ArcGIS Pro
ArcGIS Survey123
ArcGIS Online
ArcGIS Enterprise
Data Management
ArcGIS Experience Builder
Geoprocessing
ArcGIS Web AppBuilder
ArcGIS Dashboards
ArcGIS Field Maps
ArcGIS Spatial Analyst
All Products Communities
Industries
Education
Water Resources
State & Local Government
Transportation
Gas and Pipeline
Water Utilities
Roads and Highways
Telecommunications
Natural Resources
Electric
Imagery and Remote Sensing Insights (IRIS) COP
All Industries Communities
Developers
Python
JavaScript Maps SDK
Native Maps SDKs
ArcGIS API for Python
ArcGIS Pro SDK
ArcObjects SDK
Developers - General
ArcGIS REST APIs and Services
ArcGIS Online Developers
Game Engine Maps SDKs
File Geodatabase API
All Developers Communities
Global
Comunidad Esri Colombia - Ecuador - Panamá
ArcGIS 開発者コミュニティ
Czech GIS
ArcNesia
Esri India
Comunidad GEOTEC
Europe
GeoDev Germany
Asia Pacific
Americas
ArcGIS Content - Esri Nederland
All Global Communities
All Communities
Developers
User Groups
Industries
Services
Community Resources
Global
Events
Learning
Networks
ArcGIS Topics
Products
View All Communities
ArcGIS Ideas
GIS Life
Community Resources
Community Help Documents
Community Blog
Community Feedback
Member Introductions
Community Ideas
All Community Resources
Sign In
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Show
only
|
Search instead for
Did you mean:
Cancel
Home
:
All Communities
:
Developers
:
ArcGIS API Silverlight (Retired)
:
ArcGIS API Silverlight Questions
:
How to get the fields in a layer with a ArcGISDyna...
Options
Subscribe to RSS Feed
Mark Topic as New
Mark Topic as Read
Float this Topic for Current User
Bookmark
Subscribe
Mute
Printer Friendly Page
Select to view content in your preferred language
Translate Now
How to get the fields in a layer with a ArcGISDynamicMapServiceLayer
Subscribe
3308
5
01-11-2011 05:54 AM
by
SebastienPellet
ier
Frequent Contributor
01-11-2011
05:54 AM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
I use a legendcontrol with ArcGISDynamicMapServiceLayer and each layer (LayerItemViewModel object) has no information on the fields.
I want to know how to get the field list of layers contained in a DynamicLayer. Or how to get the FeatureLayerInfo of each layer in a dynamiclayer.
Tags
(2)
Tags:
silverlight
web_developers
Reply
0
Kudos
All Posts
Previous Topic
Next Topic
5 Replies
by
JenniferNery
Esri Regular Contributor
01-11-2011
06:11 AM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
The ArcGISDynamicMapServiceLayer has Layers property, which gives you some information about the sublayers.
http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.ArcGISDyna...
To get fields of each specific sublayer, you will need to perform a query on each sublayer with OutFields = "*", the query URL can be formed by appending the layer.Url and the sublayer.ID.
Or use the query URL and parse the JSON to get "fields" value, similar approach as in the following thread except look at the sub layer's "fields" section
http://forums.arcgis.com/threads/17362-how-to-query-map-knowing-map-layer-name-(not-id)
Reply
0
Kudos
by
SebastienPellet
ier
Frequent Contributor
01-11-2011
06:17 AM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
I want to create a form "Select by Attributes" and I need the fields before creating the query.
As the following site:
http://phldemo.esri.com/SilverlightViewer2/default.aspx?theme=AliceBlue
Reply
0
Kudos
by
dotMorten_esri
Esri Notable Contributor
01-11-2011
09:23 AM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
I suggest you create a FeatureLayer, call initialize, and on initalize grab the info from the layer (no need to add the featurelayer to the map).
Reply
0
Kudos
by
JenniferNery
Esri Regular Contributor
01-11-2011
09:25 AM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
ArcGISDynamicMapServiceLayer does not give you the fields for its sublayers.
You can create a FeatureLayer for every sublayer, if you want or parse the JSON to get "Fields" information.
FeatureLayer has LayerInfo.Fields property
http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureSer...
. Field contains the following information
http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Field_memb...
. Note however that the layer need to be initialized before the LayerInfo will have a value.
Reply
0
Kudos
by
SebastienPellet
ier
Frequent Contributor
01-12-2011
03:03 AM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Excellent, thank you very much
Reply
0
Kudos
Post Reply