Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps Coordinates in a Circle

Is it possible to get the whole bunch of co-ordinates after drawing a Circle overlay in Googlemaps ? Basically what i am trying to do is similar to heatmaps but instead i am drawing a circle with the centre as the marker then i wish to find all co-ordinates which fall in that circle.

like image 796
Etienne Avatar asked Dec 29 '25 04:12

Etienne


1 Answers

You may not need to find the points on the circle in order to find out whether a point is in the circle or not.

For example, if I understand your purpose correctly, you have a bunch of points like [(lat,lon),...]. You can then try this,

Loop points[]
  if distance between (lat,lon) and the marker (center of the markder) < r of the circle
     the poinst is within the circle
like image 194
user1226919 Avatar answered Dec 30 '25 23:12

user1226919



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!