GLSearch


@interface GLSearch : NSObject

GLSearch class contains a set of parameters that defines search in offline maps

  • Adds set of tile hashes to use for search (child tiles will be skipped)

    Declaration

    Objective-C

    - (void)setTiles:(NSSet<NSNumber *> *_Nonnull)tiles;

    Parameters

    tiles

    Set of tile hashes

  • Sets locale settings that used to sort results by importance. Results in user language displayed on top.

    Declaration

    Objective-C

    - (void)setLocaleSettings:(GLMapLocaleSettings *_Nonnull)localeSettings;

    Parameters

    localeSettings

    Language priority settings.

  • Sets maximum number of results to fetch from map

    Declaration

    Objective-C

    - (void)setLimit:(uint32_t)limit;

    Parameters

    limit

    Results limit

  • Sets bounding box where search will be performed

    Declaration

    Objective-C

    - (void)setBBox:(GLMapBBox)bbox;

    Parameters

    bbox

    Search bounding box.

  • Sets center of search. Distance from this center will define importance of object. Usually center is user location or center of the screen.

    Declaration

    Objective-C

    - (void)setCenter:(GLMapPoint)center;

    Parameters

    center

    Center point.

  • Adds filter to search. Result of search will contain objects that matches all filters

    Declaration

    Objective-C

    - (void)addFilter:(GLSearchFilter *_Nonnull)filter;

    Parameters

    filter

    filter to add. *

  • Starts search.

    Declaration

    Objective-C

    - (void)startWithCompletionBlock:
        (GLMapSearchCompletionBlock _Nonnull)completionBlock;

    Parameters

    completionBlock

    Block will be called when search is finished.

  • Starts search.

    Declaration

    Objective-C

    - (void)startWithCustomObjects:(NSArray<id> *_Nullable)customObjects
                         infoBlock:(GLMapSearchInfoBlock _Nullable)infoBlock
                   completionBlock:
                       (GLMapSearchCompletionBlock _Nonnull)completionBlock;

    Parameters

    customObjects

    Custom objects to add

    infoBlock

    Block called for each custom result to fill category and location.

    completionBlock

    Block will be called when search is finished.

  • Cancels search operation.

    Declaration

    Objective-C

    - (void)cancel;