I also tried to tackle this with nothing better than Shadow's
solution.  You'd think this is an oft requested feature, a more
elegant solution would be nice!

On Jul 13, 9:35 am, DanInDC <[email protected]> wrote:
> Yea, that is exactly what I am trying to avoid. Thanks though.
>
> On Jul 12, 2:02 pm, Shadow <[email protected]> wrote:
>
>
>
> > Very simple so I will only give pseudo-code:
>
> > global var isSingleClick = false, checkRef = null;
>
> > onClick {
> >   isSingleClick = !isSingleClick;
> >   if( checkRef != null )
> >     clearTimeout( checkRef );
> >   checkRef = setTimeout( 500ms, maybeHandleClick() );
>
> > }
>
> > onDblClick {
> >   isSingleClick = false;
>
> > }
>
> > maybeHandleClick () {
> > if( isSingleClick )
> >    handleClick();
>
> > }
>
> > Hack to your satisfaction, but that is the general idea...
>
> > Hope this helps
> > -Shadow

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