javascript - How to know if user's geo-position is close to a certain position? -
i'm developing firefox addon detects user's position via gps, , performs action if user near point. example, should execute action on applications of green users:
i have user latitude , longitude need calculate if user in area of other (black) point. , of must done on javascript. idea how can that? or suggestions on should read?
thanks lot!
for each user, calculate distance center point. if distance less radius of green circle, perform whatever action you'd like.
as calculating distance between 2 coordinates in javascript, can find details here.
Comments
Post a Comment