I was trying Google maps. I found this statement.
google.maps.event.addDomListener(window, 'load', initialize);
what is the function of that statement ?
maps. event. addDomListener() is deprecated, use the standard addEventListener() method instead. The feature will continue to work and there is no plan to decommission it.
To add an event, head to Google Maps on Android, tap on Contribute >Events > Add a public event. You can add an event name, tag the location, and add the time and date of the event as well. There's an option to add an image, write more event details, and add description as well.
Then you will have a dragend event available.
It adds a listener to the window
object, which as soon as the load
event is triggered (i.e. "the page has finished loading") executes the function initialize
.
I.e. it delays the Google Map related script until the page has finished loading.
@Dust function is initialize and it is called only after the <div> element is loaded. in maps.event..., I think event is element because essentially it contains the map-canvas information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With