FavoriteRecord
public struct FavoriteRecord : IndexableRecord, SearchResult, Codable, Equatable
Resolved search result intended to represent user favorites
-
Unique record identifier.
Declaration
Swift
public let id: String
-
Displayable name of the record.
Declaration
Swift
public var name: String
-
The feature name, as matched by the search algorithm.
Warning
The field is exposed for compatibility only, will be removed soon.Declaration
Swift
public var matchingName: String?
-
address formatted with medium style.
Declaration
Swift
public var descriptionText: String? { get }
-
Coordinate associated to the favorite record.
Declaration
Swift
public internal(set) var coordinate: CLLocationCoordinate2D { get set }
-
Result address.
Declaration
Swift
public var address: Address?
-
Maki icon name.
Declaration
Swift
public var icon: Maki?
-
Maki icon name. Use
icon
when possible.Declaration
Swift
public var iconName: String?
-
Result categories types.
Declaration
Swift
public var categories: [String]?
-
Coordinates of building entries
Declaration
Swift
public var routablePoints: [RoutablePoint]?
-
Type of SearchResult. Should be one of address or POI.
Declaration
Swift
public var type: SearchResultType
-
Additional string literals that should be included in object index. For example, you may provide non-official names to force
SearchEngine
match them.Declaration
Swift
public var additionalTokens: Set<String>?
-
FavoriteRecord Always has estimatedTime as nil.
Declaration
Swift
public var estimatedTime: Measurement<UnitDuration>?
-
Associated metadata
Declaration
Swift
public var metadata: SearchResultMetadata?
-
init(id:name:matchingName:coordinate:address:makiIcon:categories:routablePoints:resultType:metadata:)
Favorite record constructor
Declaration
Swift
public init( id: String? = nil, name: String, matchingName: String?, coordinate: CLLocationCoordinate2D, address: Address?, makiIcon: Maki?, categories: [String]?, routablePoints: [RoutablePoint]? = nil, resultType: SearchResultType, metadata: SearchResultMetadata? = nil )
Parameters
id
UUID used by default
name
Favorite name
coordinate
Favorite coordinate
address
Favorite address
makiIcon
Favorite icon name
categories
Favorite categories list
resultType
Favorite result type
-
Build Favorite record from SearchResult
Declaration
Swift
public init( id: String? = nil, name: String, searchResult: SearchResult )
Parameters
id
UUID used by default
name
Favorite name
searchResult
search result to use for FavoriteRecord