Важно

This feature is available in the Full MapKit SDK version

YMKSuggestItem

class YMKSuggestItem : NSObject

A single suggested item.

Summary

Class methods

 init(type: YMKSuggestItemType,
     title: YMKSpannableString,
  subtitle: YMKSpannableString?,
      tags: [String],
 searchText: String,
 displayText: String?,
       uri: String?,
  distance: YMKLocalizedValue?,
 isPersonal: Bool,
    action: YMKSuggestItemAction,
     logId: String?,
 isOffline: Bool,
 isWordItem: Bool,
 properties: [YRTKeyValuePair],
    center: YMKPoint?)

Properties

var typeYMKSuggestItemType { get }
Suggested object type

var titleYMKSpannableString { get }
Short object name

var subtitleYMKSpannableString? { get }
If type is TOPONYM returns reversed toponym hierarchy, if type is BUSINESS returns business address

var tags: [String] { get }
Additional free-form data for suggest item

var searchText: String { get }
Text to search for

var displayText: String? { get }
Text to display if searchText is too technical to display

var uri: String? { get }
Element uri, if applicable

var distanceYMKLocalizedValue? { get }
Optional distance localized value

var isPersonal: Bool { get }
If the suggested item respects personalization

var actionYMKSuggestItemAction { get }
Action to perform on click/tap/enter

var logId: String? { get }
Id for request logging

var isOffline: Bool { get }
Item is from offline search

var isWordItem: Bool { get }
Item is a word suggest item

var properties: [YRTKeyValuePair] { get }
Additional item properties

var centerYMKPoint? { get }
Position of object

Class methods

init(type:title:subtitle:tags:searchText:displayText:uri:distance:isPersonal:action:logId:isOffline:isWordItem:properties:center:)

 init(type: YMKSuggestItemType,
     title: YMKSpannableString,
  subtitle: YMKSpannableString?,
      tags: [String],
 searchText: String,
 displayText: String?,
       uri: String?,
  distance: YMKLocalizedValue?,
 isPersonal: Bool,
    action: YMKSuggestItemAction,
     logId: String?,
 isOffline: Bool,
 isWordItem: Bool,
 properties: [YRTKeyValuePair],
    center: YMKPoint?)


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.


Предыдущая
Следующая