<script>
function initMap() {
var coordinates = {lat: 1, lng: 1}
var centers = {lat: 1, lng: 1},
map = new google.maps.Map(document.getElementById('map'), {
center: coordinates,
zoom: 18,
disableDefaultUI: true
});
marker = new google.maps.Marker({
position: centers,
map: map,
animation: google.maps.Animation.DROP,
});
}
</script>
window.addEventListener("resize", (event) => {
// Ваш код
})