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 -
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
iconwhen 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
SearchEnginematch 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? -
Favorite record constructor
Declaration
Swift
public init(id: String? = nil, name: String, coordinate: CLLocationCoordinate2D, address: Address?, makiIcon: Maki?, categories: [String]?, routablePoints: [RoutablePoint]? = nil, resultType: SearchResultType, metadata: SearchResultMetadata? = nil)Parameters
idUUID used by default
nameFavorite name
coordinateFavorite coordinate
addressFavorite address
makiIconFavorite icon name
categoriesFavorite categories list
resultTypeFavorite result type
-
Build Favorite record from SearchResult
Declaration
Swift
public init(id: String? = nil, name: String, searchResult: SearchResult)Parameters
idUUID used by default
nameFavorite name
searchResultsearch result to use for FavoriteRecord
FavoriteRecord Structure Reference