title: Plot Points within a Radius using Google Maps
body: <p>I have a Database with set of specific addresses, I want to use Google Maps API to search within a radius all the addresses which fall in and use markers for them. </p>
  
  <p>The data i am getting from PHP would be like this: </p>
  
  <pre><code>&lt;tr&gt;
      &lt;td&gt;&lt;?php echo $row['firstName']; echo " "; echo $row['lastName'] ?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $row['location'];?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $row['city'];?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $row['state'];?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $row['zipcode'];?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $row['phoneNumber'];?&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>I am creating latitude/longitude from the address using: </p>
  
  <pre><code>&lt;!-- Snippet to convert Address to Geo code using Google APIs Starts --&gt;
  &lt;?php
      $completeAddress = $row['address1'].",".$row['city'].",".$row['state'].",".$row['zipcode'];
      $httpGetCallUrl = "http://maps.googleapis.com/maps/api/geocode/json?address=" . urlencode($completeAddress) . "&amp;sensor=false";
      $curlObject = curl_init();
      curl_setopt($curlObject, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($curlObject, CURLOPT_URL, $httpGetCallUrl);
      $resultGeocodeJson = curl_exec($curlObject);
      $json = json_decode($resultGeocodeJson, true);
      $volunteerLat = $json['results'][0]['geometry']['location']['lat'];
      $volunteerLng = $json['results'][0]['geometry']['location']['lng'];
      curl_close($curlObject);
  ?&gt;
  </code></pre>
  
  <p>However, i am not able to add the feature to search by radius and plot the markers within that radius. </p>
  
  <p>Code to add markers is : </p>
  
  <pre><code>function getMarkers() {
      var contentString = "&lt;?php echo $row['firstName'];?&gt;" + " " + "&lt;?php echo $row['lastName'];?&gt;";
      var myLatlng = new google.maps.LatLng(&lt;?php echo $volunteerLat;?&gt;, &lt;?php echo $volunteerLng;?&gt;);
      //Map Marker Object initialization
      var marker = new google.maps.Marker({
          position: myLatlng,
          map: map
      });
      //Adding map marker content
      var infowindow = new google.maps.InfoWindow({
          content:  contentString
      });
      //Event listner for map marker
      google.maps.event.addListener(marker, 'click', function() {
          infowindow.open(map,marker);
      });
  }
  </code></pre>