Cant set layer visible

16 Views Asked by At

I am making an interactive map and I am having issues turning a layer on and off. I can get to turn off, I just cant get it to turn back on.

$(function() {
    $("#BS").click(function () {
       if (avenzaViewer.isLayerVisible("BuyingScrapple"))
            avenzaViewer.setVisible("BuyingScrapple", true); 
        else
            avenzaViewer.setVisible("BuyingScrapple", false); 
    });
});

When I open https://www.jamiehamill.net/Delaware1.html and click on Buying Scrapple, the icons related to that layer disappear. However, when clicking it again, they don't reappear as they should.

0

There are 0 best solutions below