I am building a website with ASP.NET MVC where one function displays some points on a Google map using the Google Maps JavaScript API. Since I have many points, I do not want to receive all of them; rather, I want to get only those that are in the current viewing area that the user is looking at on the map (the bounding box).
To do this, I will make an AJAX request to my C # code, which returns all points within a certain bounding box. However, I need to somehow create an event handler that will intercept whenever the map is panned or scaled by the user.
How can I detect when a map using the Google Javascript Maps API is panned or scaled and start an event handler?
UPDATE: I know that I have to implement an event listener. Can someone point me to a list of events that I can use for the Map object? click- this is one of those events, but which of them are related to scaling and panning?
source
share