Hi, Toggling the visibility of feature layers is very similar to toggling the visibility of dynamic layers. There's an example here that shows that.There's also APIs you can use to do this like gmaps-utility-gis. It provides a table of contents to toggle layer visibility as seen in this example.On the maps I use I usually just put a checkbox for each layer with a class I know on them. Then I can attach an onclick event to those checkboxes like so:
dojo.query(".layerSelectCheckbox").connect("onclick", function (ev) {
/* check layer visibility */
});