>                                 GEvent.addListener(map, 'click',
> function(overlay, point) {

When the bare map is clicked, no 'overlay' is supplied.
If an overlay is clicked, no 'point' is supplied.

>                                 if (!overlay) {
>                                   for (var i=0; i<polys.length; i++) {
Okay, so we enter the loop if not-overlay ....
>                                     if (polys[i].Contains(point)) {
>                                             if (overlay) {
But we can only get here if not-overlay so this will never be true

If you only want "one marker", declare a single variable in global
scope.
When handling a click, if the marker variable exists remove it, then
add the new version.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-api?hl=en.

Reply via email to