AnsweredAssumed Answered

How do you fix checkboxes for layers in an ArcGISTiledMapServiceLayer?

Question asked by kniifv on Mar 14, 2017
Latest reply on Mar 14, 2017 by rscheitlin

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?

Outcomes