I'm using html5 geolocation to check if people are in a certain location before opening up an app to them however, I was wondering if it's possible to add a radius that allows people to be within say 200m of that particular point?
Asked
Active
Viewed 90 times
0
-
Of course it is possible. Anything else? – Touffy Mar 26 '15 at 07:29
-
Ah sorry I meant to say are there any examples of the code that is required to do this. – Sam Mason Mar 26 '15 at 07:30
-
You should look around, there's all you need on Stack Overflow already. The API gives you the user's coords, you have coords for your location, so you just need to calculate the distance between those points and see if it's lower than 200m. – Touffy Mar 26 '15 at 07:34
-
Ah thanks very much, that's a useful way of thinking about it. – Sam Mason Mar 26 '15 at 07:36