Assign id to DynamicMapServiceLayer in web map created in Portal

2906
0
12-18-2014 04:29 AM
NiklasWennberg
New Contributor II

Hi,

Is it possible to assign an user defined Id to a DynamicMapServiceLayer when adding the layer to a web map created in Portal?

I need a way to get that specifik layer on the client side in my Java script code. My thought was that I could use Map.getLayer(id).

When I look at "Item Data" for my web map I can se that Portal has assigned some random number as the layer Id. I would like to set that value myself. Or is there another way to get a specifik layer from a web map.

From Item Data:

ItemData.png

Map.getLayer from doc:

MapGetLayer.png

Layer id from doc:

LayerId.png

Best regards.
Niklas

0 Kudos
0 Replies