Layer List Widget

2711
2
Jump to solution
10-23-2015 12:49 PM
jaykapalczynski
Frequent Contributor

Layer List Widget....I am trying to use the example below but reference a Map Service instead of a web map....how would I do that?

    //Create a map based on an ArcGIS Online web map id
    arcgisUtils
.createMap("df8bcc10430f48878b01c96e907a1fc3", "map").then(function(response){
       
var myWidget = new LayerList({
           map
: response.map,
           layers
: arcgisUtils.getLayerList(response)
       
},"layerList");
        myWidget
.startup();

});

LayerList widget | ArcGIS API for JavaScript

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

Here's an example that uses a map service and shows how to wire up its components

JS Bin - Collaborative JavaScript Debugging

View solution in original post

2 Replies
KenBuja
MVP Esteemed Contributor

Here's an example that uses a map service and shows how to wire up its components

JS Bin - Collaborative JavaScript Debugging

jaykapalczynski
Frequent Contributor

Thanks

0 Kudos