I’m using V3 of the Google maps javascript api to bring in more markers as the map bounds are changed. The problem is that when I drag the map around for a while and then end dragging a flood of events are triggered at once. They appear to be queueing up while the map is [...]

Autor:

I’m using V3 of the Google maps javascript api to bring in more markers as the map bounds are changed. The problem is that when I drag the map around for a while and then end dragging a flood of events are triggered at once. They appear to be queueing up while the map is being dragged.

Is there some way I can add a timer to stop this or will I have to use the zoom_changed and dragend events as a workaround?

Here is the relivant code:

google.maps.event.addListener(map, 'bounds_changed', function() {
  var bounds_url = map.getBounds().toUrlValue();
  $.ajax({
    //...
  });
});

Related posts:

  1. Google maps get_bounds event triggered multiple times
  2. Google Map event bounds_changed triggered multiple times when dragging
  3. Google Map event bounds_changed triggered multiple times when dragging
  4. when is remove_at event in google maps api v3 triggered?
  5. when is remove_at event in google maps api v3 triggered?

Comments on this entry (no comments)

Did you like this post? You can share your opinion with us! Simply click here.

Add Your Comment