Hello all,
I have been working on adding a layer to a map that is based on a CSV table. I am using v3.18 of Esri's JS API to do this. I am having an issue that when I set the "id" of the CSV layer to "Incidents" it still shows up in the layer-list as "csv".
Layer:
csvLayer: new CSVLayer("/csv/Incidents_test.csv", {
copyright: "Knowledge Center",
id: "Incidents",
refreshInterval: 2,
infoTemplate: kcPopup.csvPopup
})
What shows in the Layer-list widget:
I am guessing that somewhere the "id" property is being overwritten. I am not sure where though.
Thanks!
Chris
Solved! Go to Solution.
Chris,
Sure all you need to do is supply a title property in the LayerList layers constructor:
var myWidget = new LayerList({
map: map,
layers: [{
layer: csv,
id: "Incidents",
subLayers: true,
title: "Blah Blah"
}]
},"layerList");
Chris,
Sure all you need to do is supply a title property in the LayerList layers constructor:
var myWidget = new LayerList({
map: map,
layers: [{
layer: csv,
id: "Incidents",
subLayers: true,
title: "Blah Blah"
}]
},"layerList");
Thanks Robert,
I was using the "layers" array but I was not including the "Title" property. That is what I was missing.
Chris