function deleteMarkers(markersArray) {
  for (let i = 0; i < markersArray.length; i++) {
    markersArray[i].setMap(null);
  }
  markersArray = [];
}
// Remove all markers from the map
Remove all markers from the map
Remove all markers from the map
function deleteMarkers(markersArray) {
  for (let i = 0; i < markersArray.length; i++) {
    markersArray[i].setMap(null);
  }
  markersArray = [];
}
function deleteMarkers ( markersArray ) { for ( let i = 0 ; i < markersArray . length ; i ++ ) { markersArray [ i ] . setMap ( null ) ; } markersArray = [ ] ; }
Remove all markers from the map
Remove all markers from the map