It can be done, but what you’re asking for requires custom controls. They are actually pretty easy to create if you know how to code in JavaScript and know enough CSS to style things, but you probably won’t get it in a generic Google Maps plugin for WordPress (although you should probably check for keywords like “layers”).
Take a look at the API reference:
http://code.google.com/apis/maps/documentation/javascript/reference.html
And especially the section on controls:
http://code.google.com/apis/maps/documentation/javascript/controls.html
There’s a couple of very simple examples on the samples page:
http://code.google.com/apis/maps/documentation/javascript/examples/index.html
Here’s one I had to knock up a while back, with a menu built up from markers added from a JSON stream. It uses a little jQuery to ease the AJAX side, but otherwise is pretty stock-standard JavaScript and Google Maps API:
http://www.chapelhillwine.com.au/winemaking/growers/
Unminified JavaScript for the above:
http://www.chapelhillwine.com.au/wp-content/plugins/website/js/growers-map.js
For what you’re describing, you’d need to build up your markers in layers, simulate “tabs” with some simple HTML custom controls, and hide/show the layers depending on which “tab” is selected.
OK so as i understand it, firstly i need to create an individual KML file for each tab. For example, a Pubs.kml
Secondly, i need to create an HTML custom control, like the one shown here.
Thirdly, i need to use the map.addOverlay()/map.removeOverlay() to switch the tabs on and off, as shown in this example.
Can you tell me where i need to place all this code?
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:
http://code.google.com/apis/maps/documentation/javascript/overlays.html#HideShow
http://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):
http://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):
http://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:
http://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.