polygon event propagation broken

791 views
Skip to first unread message

evil853

unread,
Jul 15, 2010, 2:19:27 AM7/15/10
to Google Maps JavaScript API v3
In the past day or so changes made to the API have broken event
propagation in relation to polygons.

Clicking and dragging (mousedown) while over a polygon no longer pans
the map. A mouseup will cause the map to jump to it's new position.

Try dragging the map with cursor over polygon using API v3:
http://code.google.com/apis/maps/documentation/javascript/examples/polygon-arrays.html
http://appleton-static.appspot.com/static/poly_phillipines.html

It used to work like this, API v2:
http://www.geocodezip.com/holidaymullandiona_firstmapD.asp

Other events, such as the 'click' MapsEventListener do not get past
the polygon as they did previously.

example:
google.maps.event.addListener(map, 'click', function(e) { .. }); does
not work when over a polygon.

The 'clickable' PolygonOption does not have any effect on either of
the actions mentioned above.

Any help would be appreciated.
thanks.

Susannah (Google Employee)

unread,
Jul 15, 2010, 2:26:08 AM7/15/10
to Google Maps JavaScript API v3
Hi,

What browser are you seeing the drag problem with polys?

It is on purpose that click events do not get to the map if the poly
is clickable. Polys now behave the same as markers in this regard.
It is a bug that setting clickable to false in the Poly options does
not cause the click to be propagated to the map. We'll get that
fixed.

-Susannah

On Jul 15, 4:19 pm, evil853 <evil...@gmail.com> wrote:
> In the past day or so changes made to the API have broken event
> propagation in relation to polygons.
>
> Clicking and dragging (mousedown) while over a polygon no longer pans
> the map.  A mouseup will cause the map to jump to it's new position.
>
> Try dragging the map with cursor over polygon using API v3:http://code.google.com/apis/maps/documentation/javascript/examples/po...http://appleton-static.appspot.com/static/poly_phillipines.html

evil853

unread,
Jul 15, 2010, 2:53:34 AM7/15/10
to Google Maps JavaScript API v3
Susannah,

I tried it with the latest Chrome, Firefox, Safari for OSX and WinXP.
They all exhibit the problem I described. IE8 is the only browser
that pans during a drag initiated on a polygon.

I created a local copy of polygon-arrays.html and changed the version
to v=3.0 and the dragging works once again for all browsers, although
the polygon click/drag issue mentioned here still exists:

http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/c15621f8a39755e5/e8070091327e2fee?lnk=gst&q=polygon+drag#e8070091327e2fee

That issue is the reason why I use the map click event and a custom
function to determine which polygon was clicked and also intercepts
dblclick.

thanks.

On Jul 15, 2:26 am, "Susannah (Google Employee)"
<susann...@google.com> wrote:
> Hi,
>
> What browser are you seeing the drag problem with polys?
>
> It is on purpose that click events do not get to the map if the poly
> is clickable.  Polys now behave the same as markers in this regard.
> It is a bug that setting clickable to false in the Poly options does
> not cause the click to be propagated to the map.  We'll get that
> fixed.
>
> -Susannah
>
> On Jul 15, 4:19 pm, evil853 <evil...@gmail.com> wrote:
>
>
>
> > In the past day or so changes made to the API have broken event
> > propagation in relation to polygons.
>
> > Clicking and dragging (mousedown) while over a polygon no longer pans
> > the map.  A mouseup will cause the map to jump to it's new position.
>
> > Try dragging the map with cursor over polygon using API v3:http://code.google.com/apis/maps/documentation/javascript/examples/po...
>

Susannah (Google Employee)

unread,
Jul 15, 2010, 3:09:20 AM7/15/10
to Google Maps JavaScript API v3
We've been able to reproduce the problem and we're working on a fix.

Thanks for reporting this,
Susannah

On Jul 15, 4:53 pm, evil853 <evil...@gmail.com> wrote:
> Susannah,
>
> I tried it with the latest Chrome, Firefox, Safari for OSX and WinXP.
> They all exhibit the problem I described.  IE8 is the only browser
> that pans during a drag initiated on a polygon.
>
> I created a local copy of polygon-arrays.html and changed the version
> to v=3.0 and the dragging works once again for all browsers, although
> the polygon click/drag issue mentioned here still exists:
>
> http://groups.google.com/group/google-maps-js-api-v3/browse_thread/th...
Reply all
Reply to author
Forward
0 new messages