Sam Mason
Sam Mason

Reputation: 1037

Creating a geofence with html5 geolocation api

I'm looking at using the HTML5 geolocation API to check to see if a user is in a particular location. However, I would like to give some lenience on this so I was hoping I could specify a central lat and lng, and then set a radius around that, so that as long as they were within that range the site would work.

I was wondering if there is any JS formula I can use to check if a user falls within this radius.

Upvotes: 2

Views: 2063

Answers (1)

George
George

Reputation: 46

These guys are getting to the Solution for this:

http://www.w3.org/TR/geofencing/

Regards, George

Upvotes: 2

Related Questions