Select to view content in your preferred language

arcgisdynamicmapservicelayer or featurelayer

902
3
10-30-2013 08:28 PM
EdwardSohn1
Emerging Contributor
I need to filter features that are shown on the map depending on search criteria and tie this in with datagrid as well.
Do I use a arcgisdynamicmapservicelayer or a feature layer?

With a arcgisdynamicmapservicelayer I just add it to the map layers and it automatically shows up on the map, but then how does one filter it and how does one tie it in with a datagrid?

With featurelayer, I can query it then how does one put it on the map and how does one tie it with a datagrid?
0 Kudos
3 Replies
ErwinSoekianto
Esri Alum
I would use Feature Layer, see this sample https://developers.arcgis.com/en/javascript/jssamples/fl_dgrid.html
0 Kudos
EdwardSohn1
Emerging Contributor
If I use a featurelayer and I want to use the symbology returned from the map service, is this possible?
With dynamic layer this seems to be automatic, but when inspecting the feature returned from feature layer query, the symbol object may be null.
0 Kudos
ReneRubalcava
Esri Frequent Contributor
The symbology of a FeatureLayer will be drawn with API based on the DrawingInfo section of the Layer details from a URL similar to this one.
http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/0?f=pjson

So individual features returned as JSON from the server will not have a symbology defined, this saves on network bandwidth.
0 Kudos