AnsweredAssumed Answered

Toggle Layers using Checkbox

Question asked by bulbulmajumder on Jul 22, 2018
Latest reply on Jul 23, 2018 by kenbuja


Ken Buja

Created Feature Layer class as


const fl5 = new FeatureLayer({
url: "***"


Added the Map as


var map = new Map({
basemap: app.basemap,
layers: [ ]


Created a checkbox as 


<div class="form-check">
<input class="form-check-input" type="checkbox" id="Checkbox1" value="option1">
<label class="form-check-label" for="Checkbox1">Wells</label>
Default checkbox


Now, how can I toggle the Layer (fl5) using the checkbox?


Thanks in advance.