Reputation: 366
I am currently using 'center_changed',function() as a listener to get the lat and lng of the map centre and then subsequently calling a reverse geocode method to convert the lat and lng into an address. However, since center_changed is firing more than once when the map is being dragged, i get a prompt message "OVER_QUERY_LIMIT" from my reverse geocode method. Is there a way to make the centre_changed listener only fire once?
Upvotes: 2
Views: 795
Reputation: 161384
Use the addLlistenerOnce method.
events description in the documentation
Upvotes: 1