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 cant see it, and cant set it to visible.
Thanks in advance