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? -
Index in response from server.
Declaration
Swift
public let serverIndex: Int? -
A point accuracy metric for the returned address.
Declaration
Swift
public let accuracy: SearchResultAccuracy? -
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>? -
Original search request.
Declaration
Swift
public let searchRequest: SearchRequestOptions -
Associated metadata
Declaration
Swift
public var metadata: SearchResultMetadata? -
init(id:name:matchingName:coordinate:address:makiIcon:serverIndex:accuracy:categories:routablePoints:resultType:searchRequest:metadata:)Favorite record constructor
Declaration
Swift
public init( id: String? = nil, name: String, matchingName: String?, coordinate: CLLocationCoordinate2D, address: Address?, makiIcon: Maki?, serverIndex: Int?, accuracy: SearchResultAccuracy?, categories: [String]?, routablePoints: [RoutablePoint]? = nil, resultType: SearchResultType, searchRequest: SearchRequestOptions, metadata: SearchResultMetadata? = nil )Parameters
idUUID used by default
nameFavorite name
coordinateFavorite coordinate
addressFavorite address
makiIconFavorite icon name
categoriesFavorite categories list
searchRequestoriginal search request
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