Introduction
If you have ever worked on JavaScript programming, you should know the importance of events. Events are the core of JavaScript. There are events behind interactions in web pages. There can be user interactions or browser actions that can be handled with the help of events.
For example, in every code from the beginning of this book, we have wrote something like the following line of code:
google.maps.event.addDomListener(window, 'load', initMap);
This line is a simple form of event definition. This line tells the browser to call the initMap()
function when all the contents are loaded. This event is required to start mapping functions after loading all DOM elements.
This chapter is about using events in the Google Maps JavaScript API to interact with maps in different ways. The Google Maps JavaScript API has the google.maps.event
namespace to work with events. This namespace has static methods to listen to events defined in the API. You should check the supported event types of objects...