AnsweredAssumed Answered

FeatureLayer needs access to LayerInfos

Question asked by stevel on Nov 8, 2010
Latest reply on Nov 9, 2010 by stevel
Given a REST endpoint, how can I programatically add all of the component layers to the map as FeatureLayers?

The sample at http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/map_dynamiclayerlist.html shows how to use LayerInfos to add all of the layers in the REST endpoint to the map, using setVisibleLayers in a DynamicMapService.

But I can't see a method to do the same thing using Feature Layers. How can I programatically traverse all of the layers in a Map Server REST endpoint, and add these to the map as Feature Layers?

Thanks,
Steve

Outcomes