Handling double click event has changed!

1,951 views
Skip to first unread message

Samuel H.

unread,
Mar 1, 2011, 3:58:40 AM3/1/11
to google-map...@googlegroups.com
Hello everybody,

It seems that it has been since a few time, the double click event is not automatically handled.
Our application constructs a sketch clicking for adding new vertex, then double clicking for terminating building.
Basically we only had to declare these two events like this way :
    this.clickHandler = google.maps.event.addListener(
        this.map,
        "click",
        function(pEvent) {
            self.onClick(pEvent.latLng);
        }
    );
    this.doubleClickHandler = google.maps.event.addListener(
        this.map,
        "dblclick",
        function(pEvent) {
            self.onDoubleClick(pEvent.latLng);
        }
    );
This has not worked anymore since a few weeks.
I am now able to handle using the same code; I am currently using a timeout between two clicks. Setting the timeout helps the double click be triggered.

What has changed in Google API?
Are someones facing same problems.

Esa

unread,
Mar 1, 2011, 6:19:41 AM3/1/11
to Google Maps JavaScript API v3
You didn't mention the browser make. 'dblclick' works for me with
FF3.6, Chrome and Safari on OS X. Also with Android 2.2.2

Samuel H.

unread,
Mar 1, 2011, 6:26:56 AM3/1/11
to google-map...@googlegroups.com, Esa
My target are IE 7, IE 8 and Firefox 3.6.
Did you test with IE please?


2011/3/1 Esa <esa.i...@gmail.com>
You didn't mention the browser make. 'dblclick' works for me with
FF3.6, Chrome and Safari on OS X. Also with Android 2.2.2

--
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.


Esa

unread,
Mar 1, 2011, 6:37:42 AM3/1/11
to Google Maps JavaScript API v3
Sorry, I don't have IE available right now. However there seem to be
something happening with events. There is another thread by Jeremy who
has trouble with 'mousedown.'

Samuel H.

unread,
Mar 1, 2011, 6:40:23 AM3/1/11
to google-map...@googlegroups.com, Esa
Under Firefox 3.6.13, Opera and Safari I get the same.
Have you tested with handling both click and double click?


2011/3/1 Esa <esa.i...@gmail.com>
Sorry, I don't have IE available right now. However there seem to be
something happening with events. There is another thread by Jeremy who
has trouble with 'mousedown.'

--

Esa

unread,
Mar 1, 2011, 8:42:06 AM3/1/11
to Google Maps JavaScript API v3
This is the test page I am using.
http://koti.mbnet.fi/ojalesa/v3/v3events.htm

Not sure if it works with IE at all.

Samuel H.

unread,
Mar 1, 2011, 1:53:53 PM3/1/11
to google-map...@googlegroups.com, Esa
Great test page!
Does not produce logs for IE 7 nor IE 8.



2011/3/1 Esa <esa.i...@gmail.com>
This is the test page I am using.
http://koti.mbnet.fi/ojalesa/v3/v3events.htm

Not sure if it works with IE at all.

--

Esa

unread,
Mar 1, 2011, 6:13:20 PM3/1/11
to Google Maps JavaScript API v3


On Mar 1, 8:53 pm, "Samuel H." <hennu...@gmail.com> wrote:
> Great test page!
> Does not produce logs for IE 7 nor IE 8.
>

Thanks. IE7/8 log issue is fixed now.

Ryan

unread,
Mar 5, 2011, 7:41:34 PM3/5/11
to google-map...@googlegroups.com
I am also having an issue where when I register a click handler on the map, double clicks are no longer handled properly.  For example, if I don't register a click handler on the map, I can double click to zoom, but when I register a click handler, double click to zoom doesn't work.  If I register my own double click handler, it never gets called.

Ryan
Reply all
Reply to author
Forward
0 new messages