Polygon click and drag/dragend

348 views
Skip to first unread message

PhilR8

unread,
Mar 8, 2010, 5:42:15 PM3/8/10
to Google Maps JavaScript API v3
In v2, click events for polygons would not be fired if the user
clicked and dragged inside of the polygon. Example:

http://www.geocodezip.com/holidaymullandiona_firstmapD.asp

In v3, clicking and dragging inside a polygon DOES fire a click
event. Example:

http://code.google.com/apis/maps/documentation/v3/examples/polygon-arrays.html

Note that when you click and drag, when you finish dragging, the click
event fires and the infowindow opens.

Is this by design, or is this a bug/feature that has yet to be
implemented? I have a map of the US covered entirely by state
polygons and it's impossible to navigate by dragging without firing
the polygon click events.

PhilR8

unread,
Mar 10, 2010, 10:33:03 AM3/10/10
to Google Maps JavaScript API v3
Damn, no thoughts? Did I explain the problem adequately? tl;dr: When
you click and drag a clickable polygon in V2, the infowindow does not
open. When you perform the same action in V3, it DOES open. I'm just
wondering if this is intentional.

On Mar 8, 5:42 pm, PhilR8 <phi...@gmail.com> wrote:
> In v2, click events for polygons would not be fired if the user
> clicked and dragged inside of the polygon.  Example:
>
> http://www.geocodezip.com/holidaymullandiona_firstmapD.asp
>
> In v3, clicking and dragging inside a polygon DOES fire a click
> event.  Example:
>

> http://code.google.com/apis/maps/documentation/v3/examples/polygon-ar...

PhilR8

unread,
Mar 11, 2010, 2:38:35 PM3/11/10
to Google Maps JavaScript API v3
For now I've disabled autopan for the infowindows, even though I'd
rather not.

Brak

unread,
Mar 11, 2010, 3:25:31 PM3/11/10
to Google Maps JavaScript API v3
I was hoping to hear a response to this too. I'd also like to trigger
info windows based on polygon clicks. Panning the map by inadvertently
click-n-dragging a polygon, which triggers an info window, which would
reverse pan the map back to make the info window fully show would be
really unintuitive and frustrating.

Right now I have polygons which are "dead" and an auto-generated-and-
centered custom Marker Icon (not blank/invisible) which opens the
related info window. I wonder if that made any sense to anyone else.
Better look at the example link if it didn't heh.
http://library.ucf.edu/Administration/Maps/Default_unpublished.asp

Luke (Google Employee)

unread,
Mar 12, 2010, 12:21:52 PM3/12/10
to Google Maps JavaScript API v3
Hey guys,

I've filed a internal bug about the click event firing on a poly drag.

- Luke

On Mar 11, 12:25 pm, Brak <brak.steph...@gmail.com> wrote:
> I was hoping to hear a response to this too. I'd also like to trigger
> info windows based on polygon clicks. Panning the map by inadvertently
> click-n-dragging a polygon, which triggers an info window, which would
> reverse pan the map back to make the info window fully show would be
> really unintuitive and frustrating.
>
> Right now I have polygons which are "dead" and an auto-generated-and-
> centered custom Marker Icon (not blank/invisible) which opens the
> related info window. I wonder if that made any sense to anyone else.

> Better look at the example link if it didn't heh.http://library.ucf.edu/Administration/Maps/Default_unpublished.asp

R1_Bzh

unread,
Apr 30, 2010, 9:18:23 AM4/30/10
to Google Maps JavaScript API v3
Some news about this "bug" or feature ?
--
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 google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

R1_Bzh

unread,
Apr 30, 2010, 8:01:02 AM4/30/10
to Google Maps JavaScript API v3
I've exactly the same problem, and don't know how to solve it.


On 9 mar, 00:42, PhilR8 <phi...@gmail.com> wrote:
> In v2, click events for polygons would not be fired if the user
> clicked and dragged inside of the polygon.  Example:
>
> http://www.geocodezip.com/holidaymullandiona_firstmapD.asp
>
> In v3, clicking and dragging inside a polygon DOES fire a click
> event.  Example:
>
> http://code.google.com/apis/maps/documentation/v3/examples/polygon-ar...
>
> Note that when you click and drag, when you finish dragging, the click
> event fires and the infowindow opens.
>
> Is this by design, or is this a bug/feature that has yet to be
> implemented?  I have a map of the US covered entirely by state
> polygons and it's impossible to navigate by dragging without firing
> the polygon click events.

pendlaren

unread,
Nov 12, 2015, 5:58:18 PM11/12/15
to Google Maps JavaScript API v3
Very old thread....but I still believe that I experience this issue – at least a related one.

When I set draggable: false in MapOptions, a click event is emitted when I drag in the map. If I set draggable: true, the click event is not emitted.

fredag 30. april 2010 14.01.02 UTC+2 skrev R1_Bzh følgende:
I've exactly the same problem, and don't know how to solve it.


On 9 mar, 00:42, PhilR8 <phi...@gmail.com> wrote:
> In v2, click events for polygons would not be fired if the user
> clicked and dragged inside of the polygon.  Example:
>
> http://www.geocodezip.com/holidaymullandiona_firstmapD.asp
>
> In v3, clicking and dragging inside a polygon DOES fire a click
> event.  Example:
>
> http://code.google.com/apis/maps/documentation/v3/examples/polygon-ar...
>
> Note that when you click and drag, when you finish dragging, the click
> event fires and the infowindow opens.
>
> Is this by design, or is this a bug/feature that has yet to be
> implemented?  I have a map of the US covered entirely by state
> polygons and it's impossible to navigate by dragging without firing
> the polygon click events.

--
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 google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-api-v3+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages