I have an application that allows color overlays. There are 5 total colors (blue, green, yellow, orange, red). Because I am using a QueryTask to acquire an array of zip boundaries for each color, when I print the map, I get 5 colored boxes, but a default or Polygon1 as the text. I tried to see if I could overwrite the text portion, but am unsuccessful. I was told I could do this through the customTextElements property of the PrintTemplate. For me to use those, I need to create a Custom Layout and my own Print Service.
In my Custom Layout, I would want to put a picture of a color square and then some text next to it.
If the user does not use the option to place a color overlay on the map, I want neither to show and have that blank space taken up by any other legend items I have in the Custom Layout. I do not want any empty spaces in the Legend area.
Can I show/hide elements in the Custom Layout?