Select to view content in your preferred language

ordering multiple mapservices

728
2
06-29-2011 12:12 AM
AlessioDi_Lorenzo
Emerging Contributor
Hi,

I develop a large number of webmapping application every year for the same costumer and in the various project at least an half of the layers are repeated.
For this reason I'm evaluating the possibility to create a basic, fixed MXD containing these redundant layers and generate from it a basic Mapservice (with the 4/5 common layers).
My question, at this point, is what happens when I use layers coming from two (or more) different mapservices in the same javascript api application?

For example, in the following situation:

Mapservice_1 (layer 0, layer 1, layer 2)
Mapservice_2 (layer 0, layer 1, layer 2, layer 3)

the order (in the z-axis) of the layers for every single mapservice is defined by the array index (that depends from the layer order in the mxd project) and it's ok.

How can I specify in the application that Mapservice_1 layer's have to be drawn before Mapservice_2 layer's?

Thanks
0 Kudos
2 Replies
HemingZhu
Frequent Contributor
Hi,

I develop a large number of webmapping application every year for the same costumer and in the various project at least an half of the layers are repeated.
For this reason I'm evaluating the possibility to create a basic, fixed MXD containing these redundant layers and generate from it a basic Mapservice (with the 4/5 common layers).
My question, at this point, is what happens when I use layers coming from two (or more) different mapservices in the same javascript api application?

For example, in the following situation:

Mapservice_1 (layer 0, layer 1, layer 2)
Mapservice_2 (layer 0, layer 1, layer 2, layer 3)

the order (in the z-axis) of the layers for every single mapservice is defined by the array index (that depends from the layer order in the mxd project) and it's ok.

How can I specify in the application that Mapservice_1 layer's have to be drawn before Mapservice_2 layer's?

Thanks


map.addLayers([Mapservice_1, Mapservice_2])
0 Kudos
AlessioDi_Lorenzo
Emerging Contributor
Sorry, I forgot to tell I'm working with the Google Maps extensions, so I have to use GEvent to add an overlay from ArcGIS Server.
0 Kudos