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 am building an application off an existing map server using the javaScript API. The server has about 10 layers that I am loading into my application as a ArcGISDynamicMapServiceLayer.

Once I have loaded the layers into my application, is it possible to re-order their hierarchy? For example move the roads on top of the streams or move the parcels under the roads.

I have already found that I cannot change the transparency of just one layer, and can only adjust for all layers at once. My guess is that it is not possible to reorder the layers from the browser.

If this is the case how should I suggest my clients reconfigure their map server? Should each layer they want in the application be an individual mapService? Any other suggestions?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

With 10.1 you can now reorder the layers. There is an option when creating the service that you will need to check to enable the dynamic ordering.

http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/layers_dynamic_reorder

map.getLayer("usa").createDynamicLayerInfosFromLayerInfos();

I can 99% confirm that you cannot adjust the transparency for layers individually. The service is generating a single image and sending it out -- so the client (browser) cannot adjust transparencies individually. You could set some fixed transparencies on individual layers in ArcMap before publishing. Also, you can do a lot with symbology -- hollow polygons, hatching, etc -- traditional cartographic techniques.

Otherwise, you are correct that you would need to create individual services, and it will reduce performance on your server faster than adding layers to a service. Often, people set up at least 2 services -- one being background reference layers, the other more operational. You would then have 2 transparency groups... or 3 or 4 instead of 10 services.

share|improve this answer
1  
+1 See this link for more discussion of tradeoffs in mapservices. –  Kirk Kuykendall Mar 8 '13 at 18:55
    
Excellent.. This is very helpful. What if I have multiple map services, each as an independent ArcGISDynamicMapServiceLayer? Can I then reorder those layers? –  snowgage Mar 8 '13 at 19:57
    
I haven't tried that but I assume you could call again map.addLayers([baseServiceLayer, referenceServiceLayer, operationalServiceLayer, textGraphicsLayer]); and reorder the services in the array. –  awesomo Mar 8 '13 at 20:09
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.