Select to view content in your preferred language

Exclude layers from Printing Service legend

3067
5
Jump to solution
11-05-2012 04:30 AM
RoseZhou
Deactivated User
Hi,

Is it possible to exclude some layers from the legend of the Printing service just like the Legend Widget?

Right now I excluded two layers from the Legend Widget, but when print the map, the legend of these two layers are shown on the printed map. This is not consistent.

Thanks

Rose
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RoseZhou
Deactivated User
I have figured it out by custimizing the source code of ExportWebMapForm.mxml.

Cheers

Rose

View solution in original post

0 Kudos
5 Replies
RoseZhou
Deactivated User
I have figured it out by custimizing the source code of ExportWebMapForm.mxml.

Cheers

Rose
0 Kudos
JasonNielsen
Regular Contributor
Would you mind sharing where you changed the code at to accomplish this? I thought i had to do this thru the JSON for the print service but if you can only change it in the .MXML that would be a lot easier.

Thank you.
0 Kudos
RoseZhou
Deactivated User
Would you mind sharing where you changed the code at to accomplish this? I thought i had to do this thru the JSON for the print service but if you can only change it in the .MXML that would be a lot easier.

Thank you.


Hi,

Check function getLegendOptions() in ExportWebMapForm.mxml, it excluded BaseMapLayer by default. You can customize this function to exlcude other layers.

Hope this helps.

Rose
0 Kudos
JasonNielsen
Regular Contributor
Hi,

Check function getLegendOptions() in ExportWebMapForm.mxml, it excluded BaseMapLayer by default. You can customize this function to exlcude other layers.

Hope this helps.

Rose


Could you show a bit on how you excluded a layer out of an operational service?  Maybe if i can see how to exclude one layer i can figure out the rest of it out.

thanks
0 Kudos
BjornSvensson
Esri Regular Contributor
FYI - "Layers can be excluded from legend when printing" will be part of the next release: version 3.1 (planned for December).
0 Kudos