title: Google Maps - getBounds() for circle not accurate
body: <p>I am trying to make a circle in google maps that shows the markers that are inside the radius zone of the circle, and when the map is moved the circle will follow. Like this example:</p>
  
  <p><a href="http://www.era.pt/radar/default.aspx?o=1&amp;t=&amp;a=&amp;dd=&amp;cc=&amp;ff=&amp;z=&amp;cp=&amp;nq=&amp;p=&amp;ar=&amp;ca=00000000&amp;ct=0000&amp;or=41&amp;idioma=pt" rel="nofollow noreferrer">http://www.era.pt/radar/default.aspx?o=1&amp;t=&amp;a=&amp;dd=&amp;cc=&amp;ff=&amp;z=&amp;cp=&amp;nq=&amp;p=&amp;ar=&amp;ca=00000000&amp;ct=0000&amp;or=41&amp;idioma=pt</a></p>
  
  <p>The problem I am having is the following:</p>
  
  <p><a href="https://i.stack.imgur.com/xs24F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xs24F.png" alt="enter image description here"></a></p>
  
  <p>Instead of getting the circle area, I am getting a rectangle area, the code I am using for this specific part is the following:</p>
  
  <pre><code>var myCity = new google.maps.Circle({
                  center: {lat: 38.7196268, lng: -9.1457501},
                  radius: 15000,
                  strokeColor: "rgb(0,0,0)",
                  strokeOpacity: 0.8,
                  strokeWeight: 2,
                  fillColor: "rgb(0,0,0)",
                  fillOpacity: 0.4
  });
  myCity.setMap(map);
  
  var bounds = myCity.getBounds();
  var it = 0;
  for (var i = 0; i &lt;=ct; i++) {
      it=it+1;
      if(bounds.contains(coordinate[it])){
          marker[it].setVisible(true);
      }
      else{
          marker[it].setVisible(false);
      }               
  }
  </code></pre>
  
  <p>ct is a dynamic variable and for now has 207 values.</p>
  
  <p>Here is the full script for the map:</p>
  
  <pre><code>&lt;script&gt;
            function initMap() {
              var map = new google.maps.Map(document.getElementById('map'), {
                zoom: 11,
                center: {lat: 38.7196268, lng: -9.1457501},
                disableDefaultUI: true,
                zoomControl: true,
                scrollwheel: false,
                navigationControl: false,
                mapTypeControl: false,
                scaleControl: false
              });
              var ct=0;
              var coordinate = [];
              var marker = [];
              var htmlString = "&lt;?php while($row = $result-&gt;fetch_assoc()) { ?&gt;";
              ct++;
              var rowGPSLon = "&lt;?php echo $row['GPSLon']; ?&gt;";
              var rowGPSLat = "&lt;?php echo $row['GPSLat']; ?&gt;";
              var pageID = "&lt;?php echo $row['ID']; ?&gt;";
              rowGPSLon = parseFloat(rowGPSLon);
              rowGPSLat = parseFloat(rowGPSLat);
              coordinate[ct] = {lat: parseFloat(rowGPSLat), lng: parseFloat(rowGPSLon)};
              marker[ct] = new google.maps.Marker({
                position: coordinate[ct],
                map: map,
                url: "http://localhost?id=" + pageID,
              });
  
              var htmlString2 = "&lt;?php } ?&gt;";
  
  
  
              var myCity = new google.maps.Circle({
                  center: {lat: 38.7196268, lng: -9.1457501},
                  radius: 15000,
                  strokeColor: "rgb(0,0,0)",
                  strokeOpacity: 0.8,
                  strokeWeight: 2,
                  fillColor: "rgb(0,0,0)",
                  fillOpacity: 0.4
                });
                myCity.setMap(map);
  
              //Retrive the center location
              google.maps.event.addListener(map, "center_changed", function() {
                  var center = map.getCenter().toUrlValue().split(",");
                  myCity.setCenter({lat: parseFloat(center[0]), lng: parseFloat(center[1])});
  
                  var bounds = myCity.getBounds();
                  var it = 0;
                  for (var i = 0; i &lt;=ct; i++) {
                      it=it+1;
                      if(bounds.contains(coordinate[it])){
                          marker[it].setVisible(true);
                      }
                      else{
                          marker[it].setVisible(false);
                      }
  
                  }
  
              });
  
              var bounds = myCity.getBounds();
              var it = 0;
              for (var i = 0; i &lt;=ct; i++) {
                  it=it+1;
                  if(bounds.contains(coordinate[it])==false){
                          marker[it].setVisible(false);
                  }
              google.maps.event.addListener(marker[it], 'click', function() {
                  jQuery(".mapLoad").load(this.url);
                  jQuery(".mapLoadContainer").show(1000);
              });
              }
  
            }
          &lt;/script&gt;
  </code></pre>
  
  <p>My question is, how can I get the area of the circle instead of a rectangle. </p>