Skip to content

santervo/react-native-geofences

Repository files navigation

react-native-geofences

Simple geofencing library for React Native. Supports currently only iOS.

Getting started

$ yarn add https://github.com/santervo/react-native-geofences.git

Usage

Adding geofence:

import Geofences from "react-native-geofences";

Geofences.addGeofence({
  id: "Helsinki",
  latitude: 60.185745,
  longitude: 24.936266,
  radius: 150
});

Removing geofence:

Geofences.removeGeofence("Helsinki");

Listening to geofence events:

Geofences.onEnterRegion(id => console.log(`Enter region ${id}`));

Geofences.onExitRegion(id => console.log(`Exit region ${id}`));

About

Simple geofencing library for React Native

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published