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:

enter image description here

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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -