开发者

longitude and latitude limiting the location

开发者 https://www.devze.com 2023-02-04 16:00 出处:网络
How can I specify a zone of locations using longitude and latitude 开发者_StackOverflow社区using Objective-C?So, from your comments...a semi-circle? You could specify that using a radius and degree va

How can I specify a zone of locations using longitude and latitude 开发者_StackOverflow社区using Objective-C?


So, from your comments...a semi-circle? You could specify that using a radius and degree value indicating the bearing of the line that bisects the circle.

To test whether a point is in the zone, you would test in two parts:

  1. Is the distance between the two points smaller than the radius?
  2. Is the bearing of the point to the origin within the specified 180 degrees of the semi-circle?

That's about as well as I can figure it without some more detail.

0

精彩评论

暂无评论...
验证码 换一张
取 消