I have a map with four layers, and I want to have one legend for all the layers. If I add a legend to each layer, then when all four layers are visible, there will be four of the same legend. And if I add a legend to only one layer, say layer 1, then when layer 1 is hidden, so is the legend. Is it possible to create a legend associate with layer 1 and have it visible in other layers even if layer 1 is hidden?

  • Post your Visualization code here so I can see how you are setting up your legend currently. – Taylor H. Jan 28 '14 at 15:27

Why not make a legend on a 5th layer called 'legend' that contained no data? That way the user would be able to leave the legend on with any combination (or actually toggle it of just like another layer!).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.