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

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -

c++ - importing crypto++ in QT application and occurring linker errors? -