.forEach( el => {
if ( el != e.target.closest(".block") ) {
el.classList.toggle('hide');
document.body.addEventListener('click', onClick)
function onClick(e) {
if (e.target.matches('.block') || e.target.parentNode.matches('.block')) {
e.target.closest(".block").classList.toggle('expanded')
document.querySelectorAll(".block").forEach( el => {
if ( el != e.target.closest(".block") ) {
el.classList.toggle('hide');
}
});
}
}
if(properties.image) {
marker.setIcon(properties.image);
}
if(properties.info) {
var InfoWindow = new google.maps.InfoWindow({
content: properties.info
});
marker.addListener('click', function(){
InfoWindow.open(myMap, marker);
});