GLSearchCategories
Objective-C
@interface GLSearchCategories : NSObject
Swift
class GLSearchCategories : NSObject
GLSearchCategories
class holds a set of GLSearchCategory
that will be used to sort search results by priority.
-
Unavailable
Please use
GLSearchCategories.sharedCategories
instead.Plain -init is disabled
Declaration
Objective-C
- (instancetype _Nonnull)init;
-
Singleton manager object
Declaration
Objective-C
@property (class, nonatomic, readonly) GLSearchCategories *_Nonnull sharedCategories;
Swift
class var shared: GLSearchCategories { get }
-
Declaration
Objective-C
- (NSArray<GLSearchCategory *> *_Nonnull)topCategories;
Swift
func topCategories() -> [GLSearchCategory]
Return Value
Returns top categories
-
Declaration
Objective-C
- (NSArray<GLSearchCategory *> *_Nonnull)allCategories;
Swift
func allCategories() -> [GLSearchCategory]
Return Value
Returns all root categories
-
Returns categories that starts with given words
Declaration
Objective-C
- (NSArray<GLSearchCategory *> *_Nonnull) categoriesStartedWith:(NSArray<NSString *> *_Nonnull)words localeSettings:(GLMapLocaleSettings *_Nonnull)localeSettings;
Swift
func categoriesStarted(with words: [String], localeSettings: GLMapLocaleSettings) -> [GLSearchCategory]
Parameters
words
Words array
localeSettings
Language priority settings
Return Value
Matched array of categories
-
Declaration
Objective-C
- (GLSearchCategory *_Nullable)findByName:(NSString *_Nonnull)name;
Swift
func find(byName name: String) -> GLSearchCategory?
Return Value
Returns category with given name.
-
Declaration
Objective-C
- (GLSearchCategory *_Nullable)findByIconName:(NSString *_Nonnull)iconName;
Swift
func find(byIconName iconName: String) -> GLSearchCategory?
Return Value
Returns category with given iconName.
-
Fills category information for vector object using it’s tags
Declaration
Objective-C
- (void)fillCategory:(GLMapVectorObject *_Nonnull)object;
Swift
func fillCategory(_ object: GLMapVectorObject)
Parameters
object
Vector object to fill category
-
Returns all categories that object matches to
Declaration
Objective-C
- (NSArray<GLSearchCategory *> *_Nullable)categoriesForObject: (GLMapVectorObject *_Nonnull)object;
Swift
func categories(for object: GLMapVectorObject) -> [GLSearchCategory]?
Parameters
object
object to test
Return Value
categories that matches to object
-
Fills category information for all vector objects in array using their tags
Declaration
Objective-C
- (void)fillCategories:(GLMapVectorObjectArray *_Nonnull)objects;
Swift
func fill(_ objects: GLMapVectorObjectArray)
Parameters
objects
Vector objects to fill category