add condition to show/hide legends based in a map field