1.0.2 • Published 5 months ago

react-geofencing v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

Geo fencing for react apps(Circular).

import { useGeoFencing } from 'react-geofencing'

const MyComponent = () => {
	 const { isWithinGeoFence } = useGeoFencing({radius: 50})

  if(isWithinGeoFence(
     { lat: 28.420006.latitude, long: 77.038188 }, //geo-fence center point
     { lat: location.lat, long: location.lng } //user location, can be fetched from browsers geo location api
   )) {
     alert("Is within geo fence area.")
   }
   else {
     alert("Is not within geo fence area.")
   }
}
1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago