1

I add this layer like this:

var POIData = new esri.layers.ArcGISDynamicMapServiceLayer("https://mysite.com/ArcGIS/rest/services/POI_Data/MapServer");
map.addLayer(POIData);
POIData.hide();

I want to show it from a button:

This is the button:

<div id="POIData" data-dojo-type="dojox.mobile.ToolBarButton" style="float: left;"onClick="showPOI();" >POI</div>

And this is the function behind it:

function showPOI(){
    POIData.show();
}

What am I doing wrong?

Any ideas? I just now can't see it, and can't set it to visible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.