1

How to draw a circle in google-map at a certain position(other than center), provided user has latitude, longitude and radius?

Abhishek
  • 1,999
  • 5
  • 26
  • 52

2 Answers2

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.

Source

Community
  • 1
  • 1
GordonsBeard
  • 636
  • 4
  • 14
0

Here you go!

google.maps.CircleOptions
Shouvik
  • 11,350
  • 16
  • 58
  • 89