Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can we catch the 'double right click' event on google-maps-v3?

can we ?

i want to do something like this:

google.maps.event.addListener(map, 'db_right_click', function(event) {
   alert('ssss')
}

how to catche the 'db_right_click' event ??

is there any way ??

like image 201
zjm1126 Avatar asked Nov 05 '22 14:11

zjm1126


1 Answers

i get it

and

this is my code:

//***********  double right click ********/ 
                                var c =0 ;
                                $('#map_canvas')[0].onmousedown=function(event){
                                    if(event.button == 2){
                                        c++;
                                setTimeout(cc, 600);
                                }
                             if (c >1){
                                   alert('ok i get it')
                                }
                                }
                                function cc{
                                    c=0;
                                }
                              //***********  double right click ********/
like image 164
zjm1126 Avatar answered Nov 12 '22 10:11

zjm1126