0

Hi friends, I am having one event latitude and longitude, To checkin to this event i must be within 500 meters of that event.

I am getting current location using:

Geolocation.getLocation().then(function(position){
        $scope.position = position.coords;
        // console.log( $scope.position)
        $scope.locationError = null;
    });

Have to validate this current location with event latitude longitude coming from Api, if this current location is equal to or less than 500 meters then only user is able to checkin, Any help would be great

Sudhir
  • 65
  • 9

1 Answers1

0

Hypothetically you need the distance between 2 geo locations. From the event geolocation to the the one calculated.

An identical thread from stackoverflow : Calculate distance between 2 GPS coordinates

Community
  • 1
  • 1
Sreekanth
  • 3,110
  • 10
  • 22