TrafficEventObject
Objective-C
@interface TrafficEventObject : NSObject
Swift
class TrafficEventObject : NSObject
This class handles the traffic event.
-
Initializes and returns a newly allocated object using the model data.
Declaration
Objective-C
- (nonnull instancetype)initWithModelData:(nonnull void *)data;
-
Returns the model data.
Declaration
Objective-C
- (nonnull void *)getModelData;
-
Check if this traffic event is a roadblock.
Declaration
Objective-C
- (BOOL)isRoadblock;
Swift
func isRoadblock() -> Bool
-
Get the estimated delay in seconds caused by the traffic event. @details For roadblocks it will return -1.
Declaration
Objective-C
- (int)getDelay;
Swift
func getDelay() -> Int32
-
Get the length in meters of the road segment affected by the traffic event.
Declaration
Objective-C
- (int)getLength;
Swift
func getLength() -> Int32
-
Get the traffic event impact zone.
Declaration
Objective-C
- (TrafficEventImpactZone)getImpactZone;
Swift
func getImpactZone() -> TrafficEventImpactZone
-
Get the traffic event reference point. @details If the traffic event doesn’t have a reference point the CoordinatesObject::isValid() will return false.
Declaration
Objective-C
- (nullable CoordinatesObject *)getReferencePoint;
Swift
func getReferencePoint() -> CoordinatesObject?
-
Get the bounding box of the traffic event.
Declaration
Objective-C
- (nullable RectangleGeographicAreaObject *)getBoundingBox;
Swift
func getBoundingBox() -> RectangleGeographicAreaObject?
-
Get the area of the traffic event.
Declaration
Objective-C
- (nullable GeographicAreaObject *)getArea;
Swift
func getArea() -> GeographicAreaObject?
-
Get the description of the traffic event.
Declaration
Objective-C
- (nonnull NSString *)getDescription;
Swift
func getDescription() -> String
-
Returns the traffic event class.
Declaration
Objective-C
- (TrafficEventClass)getEventClass;
Swift
func getEventClass() -> TrafficEventClass
-
Returns the traffic event severity.
Declaration
Objective-C
- (TrafficEventSeverity)getEventSeverity;
Swift
func getEventSeverity() -> TrafficEventSeverity
-
Returns the image of the traffic event.
Declaration
Objective-C
- (nullable UIImage *)getImage:(CGSize)size;
Swift
func getImage(_ size: CGSize) -> UIImage?
Parameters
size
The size of the image.
-
Returns the image of the traffic event.
Declaration
Objective-C
- (nullable UIImage *)getImage:(CGSize)size scale:(CGFloat)scale ppi:(NSInteger)ppi;
Swift
func getImage(_ size: CGSize, scale: CGFloat, ppi: Int) -> UIImage?
Parameters
height
The image size in pixels.
scale
The screen scale factor.
ppi
The screen pixel per inch.
-
Returns the traffic event preview URL.
Declaration
Objective-C
- (nullable NSURL *)getPreviewURL;
Swift
func getPreviewURL() -> URL?
-
Returns true if the traffic event is a user roadblock.
Declaration
Objective-C
- (BOOL)isUserRoadblock;
Swift
func isUserRoadblock() -> Bool
-
Returns the affected transport modes
Declaration
Objective-C
- (int)getAffectedTransportMode;
Swift
func getAffectedTransportMode() -> Int32
-
Returns the start time ( UTC )
Declaration
Objective-C
- (nullable TimeObject *)getStartTime;
Swift
func getStartTime() -> TimeObject?
-
Returns the end time ( UTC )
-
Check if traffic event is expired ( i.e. is ended ).
Declaration
Objective-C
- (BOOL)isActive;
Swift
func isActive() -> Bool
-
Check if traffic event is expired ( i.e. is ended ).
Declaration
Objective-C
- (BOOL)isExpired;
Swift
func isExpired() -> Bool
-
Returns true if event has a sibling on opposite direction.
Declaration
Objective-C
- (BOOL)hasOppositeSibling;
Swift
func hasOppositeSibling() -> Bool