javascript - how to attach an event listener using jQuery map v3? -


i trying load more markers when map dragged , i'm not sure how current bounds.

var map = $('#map'); map.gmap().bind('init', function(evt, map) {     $(map).dragend(function(){         console.log('a');     }); }); 

i need somehow current bounds inside dragend callback , load more markers..

notice using jquery ui map v3 , not google maps api v3 witch bit different in way calls different methods

anyone has ideas, can't find in wiki?

thanks

  • variant #1 (using addeventlistener-method of plugin)
         $(function() {        $('#map_canvas')         .gmap()           .bind('init', function(evt, map) {               $(map)                 .addeventlistener('dragend',function(){                                     console.log('a');                                   });                 });     });
  • variant #2(using addeventlistener-method of google-maps-api)
     $(function() {    $('#map_canvas')     .gmap()       .bind('init', function(evt, map) {           google.maps.event.addlistener(map,'dragend',function(){                                 console.log('b');                               });             }); });

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -