I currently have markers for all of my subcontractors on a map. I have a variable for each row in the database containing the number of miles they are willing to travel.
How would I add the circles that cover that area?
<script>
/*
* MAP 2
*/
jQuery(function() {
"use strict";
// init map
var map = new GMaps({
div: '#applicantLocation',
lat: 39.8282,
lng: -85.4373943,
zoom: 4
});
<?php
$sql = "SELECT * FROM vendorApps ORDER BY `dateReceived` DESC";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
include "includes/php/getTimeAgo.php";
// output data of each row
while($row = $result->fetch_assoc()) {
$zip = $row["zip"];
$getZip = "SELECT `lat` , `lng` FROM `zips` WHERE `zip` = \"$zip\" ";
$getZipResult = $conn->query($getZip);
if ($getZipResult->num_rows > 0) {
// output data of each row
while($getZipRow = $getZipResult->fetch_assoc()) {
$vendor_lat = $getZipRow['lat'];
$vendor_lng = $getZipRow['lng'];
$link = '<a href="applicantProfile.php?appID='.$row["vendorAppID"].'">';
echo '
// add Vendor marker
map.addMarker({
lat: '.$vendor_lat.',
lng: '.$vendor_lng.',
title: "'.$row["fName"].' '.$row["lName"].'",
infoWindow: {
content: "'.$row["fName"].' '.$row["lName"].' is a '.$row["vendorType"].' in '.$row["city"].', '.$row["state"].'."
}
});
';
}
}
}
}
?>
});
</script>