AnsweredAssumed Answered

LayerList 4.x hide layer

Question asked by sky12james on Mar 13, 2017
Latest reply on Apr 20, 2017 by JimNoel

I added GraphicLayer to the LayerList Widget sameple and get "Untitled layer."  I wonder is there a ways to hide "Untitled layer" or hide MapImageLayer.    See code below.


<!DOCTYPE html>

<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>LayerList widget - 4.3</title>

<link rel="stylesheet" href="">

#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
overflow: hidden;

<script src=""></script>

"esri/views/SceneView", "esri/layers/GraphicsLayer",

], function(
SceneView, GraphicsLayer, LayerList, WebScene
) {

var scene = new WebScene({
portalItem: { // autocasts as new PortalItem()
id: "66adfe99eeaf40fc82ad1e94751cff0b"

var view = new SceneView({
container: "viewDiv",
map: scene

var parcelGL;
parcelGL = new GraphicsLayer();

view.then(function() {
var layerList = new LayerList({
view: view

// Add widget to the top right corner of the view
view.ui.add(layerList, "top-right");


Thank you.