Select to view content in your preferred language

Adding a ArcGIS REST SErvices Layer to ESRI JS API

09-15-2017 03:04 PM
New Contributor

I would like to add a layer from ESRI account to an existing application written using the ESRI Javascript API. Here is an example of the kind of layer I would like to add: 

which is essentially a proxy for this layer:

Layer: Annual Average Daily Traffic - SHA Statewide AADT Lines (ID: 1) 

Is this possible? There does not seem to be a url to add this as a feature layer anywhere. 

Tags (1)
0 Kudos
1 Reply
MVP Emeritus

Fred you would just add the second url you posted as a FeatureLayer. The first url you have is to a webmap and it can not be added like a layer would, it would instead be added as the map using ArcGISUtils.

Web map by ID | ArcGIS API for JavaScript 3.21