These two examples import the same MapTypeMenuControl.js where the control's code lives. The only difference between working and broken menus is in the way the object is created. Instead of inserting the menu in the map object where it belongs, I append it the document body here to avoid having clicks stolen anything listening to the map div.
Here, I created a new map type control object, passed it to the google addControl function where it calls the control's initialize function. This is the way the control is supposed to work.
Somehow in the process something broke. It might be that the map is intercepting the clicks now that the control is part of the map but I doubt this because when i click on other parts of the map i see click events in firebug and the map doesn't seem to be doing anything with clicks. I think that somehow my click callbacks aren't getting registered and that yui menus has a default click handler that quietly swallows them which explains why i don't see click events in firebug when i click on the menu.
UPDATE: um, except I just added debug code after the menu object is created that checks to see if a callback is attached to the first menu item. Yes, there's a callback, and yes, its the right one. That debug output shows up in the js console. I added a yahoo logger too and started including the debug versions of several files and oddly, I don't see click events show up, not even in the version that works.
Here, I create a new map type control object and call its initializer function by hand. Clicking on menu items changes the map type as it should, but the control hasn't been added to the map properly and is in the wrong location.
blah = new MapTypeMenuControl; blah.initialize(map);