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:
https://code.google.com/apis/maps/documentation/javascript/overlays.html#HideShow
https://code.google.com/apis/maps/documentation/javascript/examples/overlay-hideshow.html
As to where you put it, you would need to write your own JavaScript for loading the map files into layers. I reckon the simplest approach for your website would be to have a custom post template that has a div for the map, and load a JavaScript script that loads Google Maps on it and creates the different KML layers and custom controls.
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):
https://code.google.com/apis/maps/documentation/javascript/examples/layer-kml.html
Here’s the reference for layers (several types, you might benefit from some of the others):
https://code.google.com/apis/maps/documentation/javascript/layers.html
And for some extra reading, Stack Overflow has a whole pile of interesting stuff on KML including handling it within Google Maps:
https://stackoverflow.com/questions/tagged/kml
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.