Finding a coordinate in a circle

后端 未结 7 1214
梦谈多话
梦谈多话 2021-01-06 20:51

I am doing a mashup using Google Maps under Grails where users can create geofences by selecting a point on the map and a radius. This get stored on my database and the appl

7条回答
  •  独厮守ぢ
    2021-01-06 21:19

    One possibility is to calculate the distance from the centerpoint and compare it to the radius.

    Depending on you application you may be have to take into account that the world is a sphere and not 2Dimensional. To calcualte a distance on earth you can use this formula.

提交回复
热议问题