How to draw a circle in google-map at a certain position(other than center), provided user has latitude, longitude and radius?
Asked
Active
Viewed 7,582 times
1
-
3First google result: http://blog.enbake.com/draw-circle-with-google-maps-api-v3/ – Johan Feb 26 '13 at 22:06
2 Answers
6
// Create marker
var marker = new google.maps.Marker({
map: map,
position: new google.maps.LatLng(53, -2.5),
title: 'Some location'
});
// 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');
Sounds like if you have the lat/long and the radius you want then you can just define a point somewhere on the map, then bind a circle to that point.

Community
- 1
- 1

GordonsBeard
- 636
- 4
- 14