I am trying to figure out what is the most effective way to add MapServer and all of its associated layers to a arcgis js instance?
I been looking through the documentation but cannot find anything so far.
I currently spin up a custom arcgis js instance, which I want to add external MapServer layers to. I then poll the server to get a JSON request then individually identify hierarchies as well as feature layers that need to be added.
Solved! Go to Solution.
The MapImageLayer is used to add MapServices and sublayers.
https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html
The MapImageLayer is used to add MapServices and sublayers.
https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html
Beautiful, does this work for FeatureServers as well or only MapServers?