There is a demo at   http://www.bexley.gov.uk/xml/testlink6.htm

There is a 10 second wait between the map displaying and the trigger
test.  The click is on the bottom-left polygon.

On Aug 3, 12:13 pm, Rossko <[email protected]> wrote:
> > 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...

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to