Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This webmap project I keep working accesses mutilple layers within a couple different mapservices. I would like to learn how I can load the layers without them drawing. I've recently incorporated check boxes instead of links to turn each layer on and off. They work but in the reverse way I want them to.

I've not been able to figure out how to keep the layers from drawing until I select a checkbox.

here is a link..

share|improve this question
up vote 2 down vote accepted

I use the visible parameter of the options when I create the layer:

var layer = new esri.layers.ArcGISDynamicMapServiceLayer(mapServic eUrl, { id: layerId, visible: false});

The id parameter lets you specify the name of the layer, so you can use the name to get the layer from the map's layer collection. The visible parameter set the default visibility of the layer.

See the constructor in JSAPI Reference for ArcGISDynamicMapServiceLayer .

share|improve this answer

Your Answer


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