Warning

This feature is available in the Full MapKit SDK version

MMKSuggestItem

@interface MMKSuggestItem : NSObject

A single suggested item.

Summary

Class methods

+ (nonnull MMKSuggestItem *)suggestItemWithType:( MMKSuggestItemType)type
                                          title:(nonnull MMKSpannableString *)title
                                       subtitle:(nullable MMKSpannableString *)subtitle
                                           tags:(nonnull NSArray<NSString *> *)tags
                                     searchText:(nonnull NSString *)searchText
                                    displayText:(nullable NSString *)displayText
                                            uri:(nullable NSString *)uri
                                           link:(nullable NSString *)link
                                       distance:(nullable MMKLocalizedValue *)distance
                                     isPersonal:( BOOL)isPersonal
                                         action:( MMKSuggestItemAction)action
                                          logId:(nullable NSString *)logId
                                      isOffline:( BOOL)isOffline
                                     isWordItem:( BOOL)isWordItem
                                     properties:(nonnull NSArray<MRTKeyValuePair *> *)properties
                                         center:(nullable MMKPoint *)center
                                businessContext:(nullable NSNumber *)businessContext;

Properties

@property (nonatomic, readonly) MMKSuggestItemType type;
Suggested object type

@property (nonatomic, readonly, nonnull) MMKSpannableString *title;
Short object name

@property (nonatomic, readonly, nullable) MMKSpannableString *subtitle;
If type is TOPONYM returns reversed toponym hierarchy, if type is BUSINESS returns business address

@property (nonatomic, readonly, nonnull) NSArray<NSString *> *tags;
Additional free-form data for suggest item

@property (nonatomic, readonly, nonnull) NSString *searchText;
Text to search for

@property (nonatomic, readonly, nullable) NSString *displayText;
Text to display if searchText is too technical to display

@property (nonatomic, readonly, nullable) NSString *uri;
Element uri, if applicable

@property (nonatomic, readonly, nullable) NSString *link;
Element link, if applicable

@property (nonatomic, readonly, nullable) MMKLocalizedValue *distance;
Optional distance localized value

@property (nonatomic, readonly) BOOL isPersonal;
If the suggested item respects personalization

@property (nonatomic, readonly) MMKSuggestItemAction action;
Action to perform on click/tap/enter

@property (nonatomic, readonly, nullable) NSString *logId;
Id for request logging

@property (nonatomic, readonly) BOOL isOffline;
Item is from offline search

@property (nonatomic, readonly) BOOL isWordItem;
Item is a word suggest item

@property (nonatomic, readonly, nonnull) NSArray<MRTKeyValuePair *> *properties;
Additional item properties

@property (nonatomic, readonly, nullable) MMKPoint *center;
Position of object

@property (nonatomic, readonly, nullable) NSNumber *businessContext;
Detailed subtype of the Business type

Optional field, can be nil

Class methods

suggestItemWithType:title:subtitle:tags:searchText:displayText:uri:link:distance:isPersonal:action:logId:isOffline:isWordItem:properties:center:businessContext:

+ (nonnull MMKSuggestItem *)suggestItemWithType:( MMKSuggestItemType)type
                                          title:(nonnull MMKSpannableString *)title
                                       subtitle:(nullable MMKSpannableString *)subtitle
                                           tags:(nonnull NSArray<NSString *> *)tags
                                     searchText:(nonnull NSString *)searchText
                                    displayText:(nullable NSString *)displayText
                                            uri:(nullable NSString *)uri
                                           link:(nullable NSString *)link
                                       distance:(nullable MMKLocalizedValue *)distance
                                     isPersonal:( BOOL)isPersonal
                                         action:( MMKSuggestItemAction)action
                                          logId:(nullable NSString *)logId
                                      isOffline:( BOOL)isOffline
                                     isWordItem:( BOOL)isWordItem
                                     properties:(nonnull NSArray<MRTKeyValuePair *> *)properties
                                         center:(nullable MMKPoint *)center
                                businessContext:(nullable NSNumber *)businessContext;


Properties

type

@property (nonatomic, readonly) MMKSuggestItemType type;

Suggested object type.


title

@property (nonatomic, readonly, nonnull) MMKSpannableString *title;

Short object name.


subtitle

@property (nonatomic, readonly, nullable) MMKSpannableString *subtitle;

If type is TOPONYM returns reversed toponym hierarchy, if type is BUSINESS returns business address.

Optional field, can be nil.


tags

@property (nonatomic, readonly, nonnull) NSArray<NSString *> *tags;

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

@property (nonatomic, readonly, nonnull) NSString *searchText;

Text to search for.


displayText

@property (nonatomic, readonly, nullable) NSString *displayText;

Text to display if searchText is too technical to display.

Optional field, can be nil.


uri

@property (nonatomic, readonly, nullable) NSString *uri;

Element uri, if applicable.

Optional field, can be nil.


@property (nonatomic, readonly, nullable) NSString *link;

Element link, if applicable.

Optional field, can be nil.


distance

@property (nonatomic, readonly, nullable) MMKLocalizedValue *distance;

Optional distance localized value.

Optional field, can be nil.


isPersonal

@property (nonatomic, readonly) BOOL isPersonal;

If the suggested item respects personalization.


action

@property (nonatomic, readonly) MMKSuggestItemAction action;

Action to perform on click/tap/enter.


logId

@property (nonatomic, readonly, nullable) NSString *logId;

Id for request logging.

Optional field, can be nil.


isOffline

@property (nonatomic, readonly) BOOL isOffline;

Item is from offline search.


isWordItem

@property (nonatomic, readonly) BOOL isWordItem;

Item is a word suggest item.


properties

@property (nonatomic, readonly, nonnull) NSArray<MRTKeyValuePair *> *properties;

Additional item properties.


center

@property (nonatomic, readonly, nullable) MMKPoint *center;

Position of object.

Optional field, can be nil.


businessContext

@property (nonatomic, readonly, nullable) NSNumber *businessContext;

Detailed subtype of the Business type

Optional field, can be nil.