GeofencingService Data Types

GeofencingService defines and uses several data types.

An object representing the coordinates and radius of the geofence region.

Property NameTypeDescriptionExample
latitudeNumberThe latitude, in degrees. Ranges from -90 to 90.37.785834
longitudeNumberThe longitude, in degrees. Ranges from -180 to 180. -122.406417
radiusNumberThe radius of the geofence in meters.5
notifyOnEntryBooleanMonitors the entry into the geofence radius. Defaults to true.false
notifyOnExitBooleanMonitors the exit out of the geofence radius. Defaults to true.false
messageStringNotification triggered by a geofence event.“Geofence region entered”
triggerOnceBooleanRemoves geofence after it’s triggered. Defaults to true.false

An object representing an error that occurred when accessing GeofencingService features.

Property NameTypeDescription
codeGeofencingServiceFailureCode A value representing the reason for a location error. Possible failure codes include:
  • locationServiceDisabled
  • userDeniedPermission
  • userDisabledPermission
  • unavailableOnHardware
  • maxGeofenceMonitoredReached
  • invalidLatitude
  • invalidLongitude
  • serviceNotEnabled
  • nativeError
messageStringA string value explaining the reason for the failure. This value is suitable for use in user interface messages. The message is provided in English and isn’t localized.

nativeError is a special case because it represents an error that’s specific to the underlying platform (Android or iOS). If you receive this failure, check the message value for details.