Firstly, that layer example you linked to is very old -- it's based on v2 of the Google Maps API; you should look instead at v3 references. To hide and show an overlay, you can use the CSS visibility property:
Here's the most simple example for loading a single KML layer into a map (view page source to see how it's all done):
Here's the reference for layers (several types, you might benefit from some of the others):
And for some extra reading, Stack Overflow has a whole pile of interesting stuff on KML including handling it within Google Maps:
Let me be clear here: what I'm suggesting is that instead of using a generic WordPress plugin, you write your own script for loading the different KML files into layers on a map, and create custom controls for hiding / showing them.