Hello everyone,
I am developing a custom widget, and I am trying to allow the user to load a single layer from a Map Service published on ArcGIS Server onto the map.
I would like to create a Select panel that displays the complete list of layers available in the Map Service so that the user can choose which layer to load. What is the best way to retrieve this list?
I'm using ExB Developer 1.15
Thanks!
Solved! Go to Solution.
You can load the MapImageLayer into memory, but not the map using this code.
// Typical usage
let layer = new MapImageLayer({
// URL to the map service
url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer",
});
Now the single layers will be available as an array on layer.sublayers.
You can load the MapImageLayer into memory, but not the map using this code.
// Typical usage
let layer = new MapImageLayer({
// URL to the map service
url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer",
});
Now the single layers will be available as an array on layer.sublayers.