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
-
A unique identifier for the geographic feature
Declaration
Swift
public var mapboxId: 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
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>?
-
Original search request.
Declaration
Swift
public let searchRequest: SearchRequestOptions
-
Associated metadata
Declaration
Swift
public var metadata: SearchResultMetadata?
-
init(id:mapboxId:name:matchingName:coordinate:address:makiIcon:serverIndex:accuracy:categories:routablePoints:resultType:searchRequest:metadata:)
Favorite record constructor
Declaration
Swift
public init( id: String? = nil, mapboxId: 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
id
UUID used by default
name
Favorite name
coordinate
Favorite coordinate
address
Favorite address
makiIcon
Favorite icon name
categories
Favorite categories list
searchRequest
original search request
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