Важно
This feature is available in the Full MapKit SDK version
YMKSuggestItem
class YMKSuggestItem : NSObject |
A single suggested item.
Summary
Class methods
init(type: YMKSuggestItemType, |
Properties
var type: YMKSuggestItemType { get } |
var title: YMKSpannableString { get } |
var subtitle: YMKSpannableString? { get } |
var tags: [String] { get } |
var searchText: String { get } |
var displayText: String? { get } |
var uri: String? { get } |
var distance: YMKLocalizedValue? { get } |
var isPersonal: Bool { get } |
var action: YMKSuggestItemAction { get } |
var logId: String? { get } |
var isOffline: Bool { get } |
var isWordItem: Bool { get } |
var properties: [YRTKeyValuePair] { get } |
var businessContext: NSNumber? { get } Optional field, can be nil |
Class methods
init(type:title:subtitle:tags:searchText:displayText:uri:distance:isPersonal:action:logId:isOffline:isWordItem:properties:center:businessContext:)
init(type: YMKSuggestItemType, |
Properties
type
var type: YMKSuggestItemType { get } |
Suggested object type.
title
var title: YMKSpannableString { get } |
Short object name.
subtitle
var subtitle: YMKSpannableString? { get } |
If type is TOPONYM returns reversed toponym hierarchy, if type is BUSINESS returns business address.
Optional field, can be nil.
tags
var tags: [String] { get } |
Additional free-form data for suggest item. If type is TOPONYM, returns toponym kind (house/street/locality/...). If type is BUSINESS, returns category class (drugstores/restaurants/...).
searchText
var searchText: String { get } |
Text to search for.
displayText
var displayText: String? { get } |
Text to display if searchText is too technical to display.
Optional field, can be nil.
uri
var uri: String? { get } |
Element uri, if applicable.
Optional field, can be nil.
distance
var distance: YMKLocalizedValue? { get } |
Optional distance localized value.
Optional field, can be nil.
isPersonal
var isPersonal: Bool { get } |
If the suggested item respects personalization.
action
var action: YMKSuggestItemAction { get } |
Action to perform on click/tap/enter.
logId
var logId: String? { get } |
Id for request logging.
Optional field, can be nil.
isOffline
var isOffline: Bool { get } |
Item is from offline search.
isWordItem
var isWordItem: Bool { get } |
Item is a word suggest item.
properties
var properties: [YRTKeyValuePair] { get } |
Additional item properties.
center
var center: YMKPoint? { get } |
Position of object.
Optional field, can be nil.
businessContext
var businessContext: NSNumber? { get } |
Detailed subtype of the Business type
Optional field, can be nil.