So we have an ArcGISTiledMapServiceLayer with different featureLayers that we want to showcase with checkboxes.
Currently the solution looks as follow:
Toggle.js
$(document).ready(function(){
$("#c1").click(function(){
$("#graphicsLayer1_layer").fadeToggle();
});
Body.php
<div class="filter-checkbox custom-checkbox">
<input type="checkbox" value="1" id="c1" name="chk_1" checked />
<label for="c1"></label>
</div>
The problem is when we toggle a checkbox, and zoom out in the map for an example it resets.
How do you prevent this?