TypeBasedAnnouncementGenerator
public class TypeBasedAnnouncementGenerator : AnnouncementGenerator
TypeBasedAnnouncementGenerator is an AnnouncementGenerator implementation that only generates announcements of a specific type.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Initializer.
Declaration
Swift
public init(announcementType: DefaultAnnouncementType)
Parameters
type
Announcement type
-
Method for checking whether there is any announcement that should be generated.
Declaration
Swift
public func shouldGenerate(parameters: AnnouncementGenerationParams) -> Bool
Parameters
parameters
announcement generation parameters
Return Value
The check result. True if an announcement should be generated, false otherwise.
-
Generates an announcement object based on input parameters.
Declaration
Swift
public func generateAnnouncement(parameters: AnnouncementGenerationParams) throws -> GuidanceAnnouncement
Parameters
parameters
announcement generation parameters
Return Value
Generated GuidanceAnnouncement object relevant to the current navigation step.