Select to view content in your preferred language

How to pass layers id's Dynamically to Print Service

297
0
04-07-2022 12:15 AM
Tarunvisvanadula1994
Emerging Contributor

Hi,

On my map i have One Map service which has 7 layers. While  printing the map along with legend  using custom print service , i need to show only the layers visible in that current map extent.

currently im passing my all layer id to LegendeLayer array in template.Layoutoptions.

Is it possible to get layers only visible in that map extent ? so that legend symbology can change dynamically on map extent in print output.

In my print mxd when i add Map service to it below option is disabled:

Tarunvisvanadula1994_0-1649315605669.png

Can you help me for getting layer id's available in map extent using JavaScript API ?

 

Thanks 

Tarun V

0 Kudos
0 Replies