How to add a service using API Javascript

5117
11
Jump to solution
05-09-2015 08:48 AM
SteveCline
Regular Contributor

I am using the "require" script to load layers into a map.  I am able to successfully use the "esri/layers/ArcGISDynamicMapServiceLayer" script to load tiled layers but I am wondering how to add these two layers:

Cline/Regions_w_Country_Labels (MapServer)

http://services3.arcgis.com/HVjI8GKrRtjcQ4Ry/arcgis/rest/services/Major_World_Cities/FeatureServer/0

Any guidance is greatly appreciated.

Steve

0 Kudos
11 Replies
RobertScheitlin__GISP
MVP Emeritus

Steve,

   Sorry there was an error in my code it should be

outFields: ["CITY_NAME"]

An array of Strings not a string containing an array.

SteveCline
Regular Contributor

That was perfect!

Thank you very much for all your help.  The project is complete.

0 Kudos