Skip to main content
RadarGeofenceGeometry is the base class for representing the geometry of a geofence. Concrete implementations include RadarCircleGeometry and RadarPolygonGeometry.

RadarGeofenceGeometry

The base class for geofence geometry. This class has no public properties or methods and serves as a parent class for specific geometry types.

RadarCircleGeometry

Represents the geometry of a circle geofence.

Properties

center
RadarCoordinate
required
The center of the circle geofence.
radius
number
required
The radius of the circle geofence in meters.

Example

RadarPolygonGeometry

Represents the geometry of a polygon geofence.

Properties

_coordinates
RadarCoordinate[]
The geometry of the polygon geofence as a closed ring of coordinates. The first and last coordinates should be the same to close the polygon.
center
RadarCoordinate
required
The calculated centroid of the polygon geofence.
radius
number
required
The calculated radius of the polygon geofence in meters. This is typically the distance from the centroid to the furthest vertex.

Example

Usage

To determine the type of geometry, use type checking:

See Also