google.maps.event.addDomListener() is deprecated, use the standard addEventListener() method instead: https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener The feature will continue to work and there is no plan to decommission it
function initialize(){
// your code
}
// previous code:
google.maps.event.addDomListener(window, 'load', initialize);
// now change to this:
window.addEventListener('load', initialize);