Home > @magiclane/maps-sdk > AlarmService
AlarmService class
Provides monitoring and notification for navigation-related alarm events.
The AlarmService manages a variety of alarm types including speed limit violations, landmark proximity alerts, overlay item notifications (such as safety cameras and social reports), geographic boundary crossings, tunnel entry/exit events, and day/night mode transitions. Configure the service with an AlarmListener to receive callbacks for these events.
Multiple AlarmService and AlarmListener instances can operate simultaneously, enabling concurrent monitoring of different events or areas.
Make sure to keep a reference to both the AlarmService and AlarmListener instances for as long as you want to receive alarm notifications. If either instance is garbage collected, alarm callbacks will stop being triggered.
Routes & Navigation
Signature:
export declare class AlarmService extends GemAutoreleaseObject Extends: GemAutoreleaseObject
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Constructs a new instance of the |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
number |
Distance threshold in meters for triggering landmark and overlay item alarms. Alarms are triggered when the device approaches within this distance of a monitored landmark or overlay item. The default threshold depends on the SDK configuration. | ||
|
Updates the alarm listener for this service. The listener can be changed at any time to dynamically reconfigure which callbacks receive alarm event notifications. Only one listener is active per AlarmService instance. | |||
|
|
Gets areas containing current referenced position | ||
|
|
boolean |
Check if the safety camera overlay is enabled. | |
|
|
boolean |
Check if the social reports overlay is enabled. | |
|
|
Provides the list of active landmark alarms. | ||
|
|
Provides the list of passed over landmark alarms. | ||
|
|
Gets access to the alarm settings for the landmark stores. | ||
|
|
Get all monitored areas | ||
|
boolean |
Whether alarms are triggered when navigating without an active route. When | ||
|
|
Gets areas not containing current referenced position | ||
|
|
Provides the list of active overlay item alarms. | ||
|
|
Provides the list of passed over overlay item alarms. | ||
|
|
Gets access to the collection of overlays to use for alarm. | ||
|
|
any | ||
|
|
GemPosition | null |
Gets alarm current reference position. | |
|
|
Gets the tracking position source. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
|
Creates a new instance of the AlarmService class. | |
|
|
Disables the safety camera overlay. | |
|
|
Disables the social reports overlay. | |
|
|
Disables the social reports overlay for a specified category. | |
|
Dispose the AlarmService instance. | ||
|
|
Enables the safety camera overlay. | |
|
|
Enables the social reports overlay. | |
|
|
Enables the social reports overlay for a specified category. | |
|
Get the alarm overspeed threshold value, in meters per second. | ||
|
|
Check if the social reports overlay for a specified category is enabled. | |
|
Add new geographic area to monitor. | ||
|
Set the alarm overspeed threshold value, in meters per second. | ||
|
Remove the all geographic areas from monitor. | ||
|
Remove the given geographic area from monitor. | ||
|
Remove the given geographic areas ids from monitor. |