Warning
This feature is available in the Full MapKit SDK version
MMKSuggestItem
class MMKSuggestItem : NSObject |
A single suggested item.
Summary
Class methods
init(type: MMKSuggestItemType, |
Properties
var type: MMKSuggestItemType { get } |
var title: MMKSpannableString { get } |
var subtitle: MMKSpannableString? { get } |
var tags: [String] { get } |
var searchText: String { get } |
var displayText: String? { get } |
var uri: String? { get } |
var link: String? { get } |
var distance: MMKLocalizedValue? { get } |
var isPersonal: Bool { get } |
var action: MMKSuggestItemAction { get } |
var logId: String? { get } |
var isOffline: Bool { get } |
var isWordItem: Bool { get } |
var properties: [MRTKeyValuePair] { get } |
var businessContext: NSNumber? { get } Optional field, can be nil |
Class methods
init(type:title:subtitle:tags:searchText:displayText:uri:link:distance:isPersonal:action:logId:isOffline:isWordItem:properties:center:businessContext:)
init(type: MMKSuggestItemType, |
Properties
type
var type: MMKSuggestItemType { get } |
Suggested object type.
title
var title: MMKSpannableString { get } |
Short object name.
subtitle
var subtitle: MMKSpannableString? { 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.
link
var link: String? { get } |
Element link, if applicable.
Optional field, can be nil.
distance
var distance: MMKLocalizedValue? { get } |
Optional distance localized value.
Optional field, can be nil.
isPersonal
var isPersonal: Bool { get } |
If the suggested item respects personalization.
action
var action: MMKSuggestItemAction { 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: [MRTKeyValuePair] { get } |
Additional item properties.
center
var center: MMKPoint? { 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.