Project developed for monitoring hard braking zones as a scientific initiation at Facens in the period 2021/2022.
npm install @hard-braking-zones/location
npx cap sync
init(options: IInitOptions) => any
Method that needs to be called before the plugin starts.
Param | Type |
---|---|
options |
IInitOptions |
Returns: any
addListener(eventName: string, listenerFunc: ListenerCallback) => any
Method that add some listener to listen for an event.
Param | Type | Description |
---|---|---|
eventName |
string |
defines the event name. |
listenerFunc |
(err: any, ...args: {}) => void |
defines the callback that will be called when the event be fired. |
Returns: any
addListener(eventName: 'location', listenerFunc: (location: ILocation) => void) => any
Method that add some listener to listen for an event.
Param | Type | Description |
---|---|---|
eventName |
"location" |
defines the event name. |
listenerFunc |
(location: ILocation) => void |
defines the callback that will be called when the event be fired. |
Returns: any
Interface that represents an object that is reponsible for setting up the plugin.
Prop | Type | Description |
---|---|---|
interval |
number |
Defines a value in seconds that represents the interval that the location event will be called with the user's current location. |
Prop | Type |
---|---|
remove |
() => any |
Interface that represents the device location data.
Prop | Type |
---|---|
deviceId |
string |
accuracy |
number |
longitude |
string |
latitude |
string |
speed |
number |