MapKit Mobile SDK

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,
     title: MMKSpannableString,
  subtitle: MMKSpannableString?,
      tags: [String],
 searchText: String,
 displayText: String?,
       uri: String?,
  distance: MMKLocalizedValue?,
 isPersonal: Bool,
    action: MMKSuggestItemAction,
     logId: String?,
 isOffline: Bool,
 isWordItem: Bool,
 properties: [MRTKeyValuePair],
    center: MMKPoint?,
 businessContext: NSNumber?)

Properties

var typeMMKSuggestItemType { get }
Suggested object type

var titleMMKSpannableString { get }
Short object name

var subtitleMMKSpannableString? { 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 distanceMMKLocalizedValue? { get }
Optional distance localized value

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

var actionMMKSuggestItemAction { 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: [MRTKeyValuePair] { get }
Additional item properties

var centerMMKPoint? { get }
Position of object

var businessContext: NSNumber? { get }
Detailed subtype of the Business type

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: MMKSuggestItemType,
     title: MMKSpannableString,
  subtitle: MMKSpannableString?,
      tags: [String],
 searchText: String,
 displayText: String?,
       uri: String?,
  distance: MMKLocalizedValue?,
 isPersonal: Bool,
    action: MMKSuggestItemAction,
     logId: String?,
 isOffline: Bool,
 isWordItem: Bool,
 properties: [MRTKeyValuePair],
    center: MMKPoint?,
 businessContext: NSNumber?)


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.


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.