Select to view content in your preferred language

Adding a ArcGIS REST SErvices Layer to ESRI JS API

521
1
09-15-2017 03:04 PM
fredhejazi1
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:

http://citygate.maps.arcgis.com/home/webmap/viewer.html?webmap=d9d10799698144f8b57e3b13972f0aa4 

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
RobertScheitlin__GISP
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