Private: Home › Forums › HTML Templates › Trucking – Transportation & Logistics HTML Template › Location radius › Reply To: Location radius
August 14, 2015 at 9:28 am
#3552
Keymaster
Hi Felix,
Here is simple script that adds circle radius.
// Add circle overlay and bind to marker
var circle = new google.maps.Circle({
map: map,
radius: 16093, // 10 miles in metres
fillColor: '#AA0000'
});
circle.bindTo('center', marker, 'position');
You should add it after this code in script (at the bottom of the page):
...
var marker, i;
for (i = 0; i < locations.length; i++) {
marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map,
icon: pinIcon
});