SPGeofenceCircle

@interface SPGeofenceCircle : SPGeofenceGeometry

Geofence consisting of a coordinate and a radius around it. Defines a circular area.

  • Recommended constructor for SPGeofenceCircle objects.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithIdentifier:(nonnull NSString *)identifier
                                    coordinate:(CLLocationCoordinate2D)coordinate
                                        radius:(CGFloat)radius;

    Swift

    init(identifier: String, coordinate: CLLocationCoordinate2D, radius: CGFloat)

    Parameters

    identifier

    unique identifier for geofence

    coordinate

    center GPS coordinate

    radius

    circle radius in meters

    Return Value

    new instance of SPGeofenceCircle

  • Declaration

    Objective-C

    - (CLLocationCoordinate2D)coordinate;

    Swift

    func coordinate() -> CLLocationCoordinate2D

    Return Value

    center coordinate.

  • Declaration

    Objective-C

    - (CGFloat)radius;

    Swift

    func radius() -> CGFloat

    Return Value

    radius in meters.