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
Post a Comment