> I guess in my naive logic, if I use the mouse to click on the kml
> layer (at the specific location I require) it knows which polygon is
> underneath the click
Yup, you are correct there, the API can work out which poly from the
mouse position. The 'missing link' is that you (your own code) have
no means to find out which poly is at some arbritary position, the
KmlLayer mechanism doesn't share that info.
I don't know if simulating a mouse click to a KmlLayer object (rather
than a specific poly) will give the same effect as clicking on the
screen, I suspect not but maybe someone who understands the layer
mechanism better will comment. To successfully simulate such a click
you'd have to make your event trigger supply the same sort of
parameters as a real click - x/y pixels perhaps?
> being able to trigger a click on
> a kml layer seems to have no useable function.
Entirely possible ; the trigger method allows you to trigger arbritary
events on any object you like. Only some objects listen for
events,and then only for specific events.
var x = 2;
google.maps.event.trigger( x, 'explosion', parameter);
is perfectly valid, but nothing happens, numbers don't respond to
events unless you have set up a listener.
Still waiting for your demo of simulated click on a KmlLayer to see
what actually happens...