title: How to catch if google maps infowindow if it overlays other?
body: <p>I have a <code>polyline</code> on which i need to show each points coordinates, but the problem is that each info-window overlays other so i decided to draw only those info-windows which doesnt overlay others, but don't have any idea how to catch it...</p>
  
  <p>Currently i have</p>
  
  <pre><code>    window.onload = function() {
          var bounds = new google.maps.LatLngBounds();
          var coordinates = [];
  
          map = new google.maps.Map(document.getElementById('map_canvas'), {mapTypeId: google.maps.MapTypeId.HYBRID});
  
          for (i = 0, len = points.point.length; i &lt; len; i++) {
              var tmp_coor = new google.maps.LatLng(points.point[i].lat, points.point[i].lon);
  
              coordinates.push(tmp_coor);
              bounds.extend(tmp_coor);
  
              var infowindow = new google.maps.InfoWindow({
                  content: points.point[i].lat + ', ' + points.point[i].lon,
                  maxWidth: 120
              });
  
              infowindow.setPosition(tmp_coor);
  
              infowindow.open(map);
          }
  
          var polyline = new google.maps.Polyline({
              path: coordinates,
              strokeColor: '#FF0000',
              strokeOpacity: 1.0,
              strokeWeight: 2,
              editable: false
          });
  
          polyline.setMap(map);
  
      map.fitBounds(bounds);
  }
  </code></pre>
  
  <p>It creates <img src="https://i.stack.imgur.com/AK8XW.png" alt="enter image description here"></p>
  
  <p>So maybe someone has any suggestions on this problem?</p>