0.0.12 • Published 4 years ago

custom-capacitor-fancy-geo v0.0.12

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

Capacitor Fancy Geo

npm i capacitor-fancy-geo

Usage

TypeScript

import 'capacitor-fancy-geo'
import { Plugins } from '@capacitor/core';
const { Geo, FenceTransition } = Plugins;

const has = await Geo.hasPermission();
if(has){
            let notification =  {id: 0, title: "Test", body: "Test Body"};
            let circle = {
                id: null,
                transition: FenceTransition.ENTER_EXIT,
                notification,
                loiteringDelay: 0,
                points: [lat, lon], radius: 1000
                };

   const result = await Geo.createCircleFence(circle);
}else{
   const got = await Geo.requestPermission({always: true}) // use location services at any time IOS only
}

Api

MethodDefaultTypeDescription
setOnMessageListener(listener: Function)
createCircleFence(options: FenceOptions)Promise<string>
hasPermission()Promise<boolean>
requestPermission(options: PermissionOptions)Promise<boolean>
getCurrentLocation(options: LocationOptions)Promise<Location>
getAllFences()Promise<Fence[]>
getFence(id: string)Promise<Fence>
removeAllFences()Promise<any>
removeFence(id: string)Promise<any>Promise<any>
0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago