Select to view content in your preferred language

how to put a ArcGISDynamicMapServiceLayer on top of a GraphicsLayer

2870
1
Jump to solution
10-27-2015 02:04 PM
davidzornosa
Occasional Contributor

Hi,

i have:

1 - a polygon drawn in a GraphicsLayer.

2 - a set of points contained in the polygon. These points are stored in a ArcGISDynamicMapServiceLayer

The idea is to display the graphicsLayer in the back and the dynamicLayer in the front. However, arcgis always displays the layers in the inverse order (graphicslayer in the front and dynamicLayer in the back).

I've tried:

- getDojoShape().moveToBack()

- map.reorderLayer

to no avail.

Thanks

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

This cannot be done in 3.x, but it will be possible in 4.x. A GraphicsLayer will always be in front of a Tiled or Dynamic layer. From the help

Also, all graphics layers are always on top of TiledMapServiceLayers and DynamicMapServiceLayers.

One way around this would be to use a FeatureLayer instead of a Dynamic Layer, since the FeatureLayer displays data via a GraphicsLayer.

View solution in original post

1 Reply
KenBuja
MVP Esteemed Contributor

This cannot be done in 3.x, but it will be possible in 4.x. A GraphicsLayer will always be in front of a Tiled or Dynamic layer. From the help

Also, all graphics layers are always on top of TiledMapServiceLayers and DynamicMapServiceLayers.

One way around this would be to use a FeatureLayer instead of a Dynamic Layer, since the FeatureLayer displays data via a GraphicsLayer.