title: Find objects at a point in google maps
body: <p>I am adding areas of interest in google maps using polygons and circles.
  In each polygon and circle I'm adding an ID so I can get detailed information about that area if the user clicks on the polygon or circle.
  There are cases that two areas overlap. By clicking the common area I'm able to get the ID for the object that is "above" but I have no way to get the ID of the object that lies "below". An example is given below.</p>
  
  <p><img src="https://i.stack.imgur.com/ElzWi.png" alt="enter image description here"></p>
  
  <p>Is there a way to get the IDs of overlapping objects?</p>
  
  <p>The code that creates a polygon and a circle is given below.</p>
  
  <pre><code>function drawpolygonExersice(res, ExerciseID){
    var points = new Array();
    var ptn;
  
    for (var j=0;j&lt;res.length/2;j++)
      {ptn = new google.maps.LatLng(res[2*j],res[2*j+1]);
        points.push(ptn);}
    var polygonExercise = new google.maps.Polygon({
      path: points,
      geodesic: true,
      strokeColor: 'red',
      strokeOpacity: 0.8,
      strokeWeight: 1,
      fillColor: "red",
      fillOpacity: 0.20,
      ID: ExerciseID,  //look up ID
      map: map
    });
     google.maps.event.addListener(polygonExercise, 'click', function(event) {
       alert(this.ID);
     });
    exerciseAreas.push(polygonExercise);  
  }
  
  function drawcircleExersice(res, ExerciseID) {
  
    var circleExercise = new google.maps.Circle ({
        center: new google.maps.LatLng(res[0],res[1]),
        radius: res[2] * 1852, //Nautical miles to meters
        geodesic: true,
        strokeColor: 'red',      
        strokeOpacity: 0.8,
        strokeWeight: 1,
        fillColor:'red',
        fillOpacity: 0.20,
        ID: ExerciseID,  //look up ID
        map: map
      });
  
     google.maps.event.addListener(circleExercise, 'click', function(event) {
       alert(this.ID);
     });
     exerciseAreas.push(circleExercise);
  }
  </code></pre>