views:

44

answers:

2

I am trying to figure out how i can attach a click event to a google maps v3 compass.

I have created a function that re-draws markers on a map and want this to be fired when the user click on the compass (arrows top left) of the google map.

I am working with google maps v3 and cant seem to find any way of doing this through the documentation.

Does anyone know how to do this?

Thanks in advance!

A: 

Click event of the compass is probably attached to the bounds_change event. Essentially, you are changing the bounds of the map.

CrazyEnigma
A: 

You can listen to the center of the map changing:

google.maps.event.addListener(map, 'center_changed', function() {
   // Call your function to redraw markers here.
});
plexer