Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I add this layer like this:

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

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(){


What am i doing wrong?

Any ideas. I just now cant see it, and cant set it to visible.

Thanks in advance

share|improve this question
Not sure about this..but you can set visible layers.. OR check following example (help.arcgis.com/en/webapi/javascript/arcgis/samples/…) (forums.arcgis.com/threads/…) –  Sunil Nov 22 '12 at 12:55
Yes i know, but the first example is only for tiled layers –  Babboe Nov 22 '12 at 13:11
May be this will be perfect efreedom.com/Question/F-2544/… –  Sunil Nov 22 '12 at 13:23
So if i set the id to POI... Should i do in the function: POI.show()? –  Babboe Nov 22 '12 at 13:31
Sorry for my late reply..yes you can try that –  Sunil Nov 23 '12 at 4:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.