Type Definitions

The following type definitions are available globally.

  • Blocks what will called on the main thread when task is completed or cancelled

    Declaration

    Objective-C

    typedef void (^GLMapDownloadCompletionBlock)(GLMapDownloadTask *_Nonnull)
  • Blocks what will called on the main thread when subtask is completed or cancelled.

    Download task contains map data download task and navigation data download task inside.

    Declaration

    Objective-C

    typedef void (^GLMapDownloadStatsBlock)(NSString *_Nonnull, NSUInteger, double)
  • GLMapListUpdateBlock is used to notify about map list updates.

    Map list is stored at server and sometimes it takes some time to fetch latest map list. It is downloaded only if updated. If no changes happened block called almost immidiately.

    Declaration

    Objective-C

    typedef void (^GLMapListUpdateBlock)(NSArray<GLMapInfo *> *_Nullable, BOOL,
                                         NSError *_Nullable)
  • GLMapTileDownloadProgressBlock is called when tile downloaded.

    Declaration

    Objective-C

    typedef BOOL (^GLMapTileDownloadProgressBlock)(uint64_t, NSError *_Nullable)

    Return Value

    if NO returned downloading will be cancelled.

  • Block is called to get point of track at given index

    Declaration

    Objective-C

    typedef BOOL (^GLMapTrackPointsCallback)(NSUInteger, GLTrackPoint *_Nonnull)

    Return Value

    YES if there is point at index index, and NO if there is no points.

  • GLMapTimestampBlock is used to get timestamp of resource from custom place. Return NAN if no resurces with such name exit.

    Declaration

    Objective-C

    typedef double (^GLMapTimestampBlock)(NSString *_Nonnull)
  • Called when next object is ready while enumerating

    Declaration

    Objective-C

    typedef BOOL (^GLMapVectorObjectBlock)(GLMapVectorObject *_Nonnull)

    Return Value

    NO to break enumaration

  • GLMapTapGestureBlock called, when user tapped or long tapped on map. Add custom tap handling logic inside this block.

    Declaration

    Objective-C

    typedef void (^GLMapTapGestureBlock)(CGPoint)
  • GLMapBBoxChangedBlock called every time, when map is moved or zoom is changed.

    Declaration

    Objective-C

    typedef void (^GLMapBBoxChangedBlock)(GLMapBBox)
  • GLMapAnimationBlock called every frame wile YES returned. If NO returned - animation block will be removed

    Declaration

    Objective-C

    typedef void (^GLMapAnimationBlock)(GLMapAnimation *_Nonnull)
  • GLMapVisibleTilesChangedBlock called when set of visible tiles changed

    Declaration

    Objective-C

    typedef void (^GLMapVisibleTilesChangedBlock)(NSSet *_Nonnull)
  • GLMapTileErrorBlock called when there is no data for tile, or map can’t download tile. It allows to use custom ‘no data’ tiles.

    Declaration

    Objective-C

    typedef UIImage *_Nullable (^GLMapTileErrorBlock)(GLMapTilePos,
                                                      NSError *_Nonnull)
  • GLMapCaptureFrameBlock is called when frame is captured.

    Declaration

    Objective-C

    typedef void (^GLMapCaptureFrameBlock)(UIImage *_Nullable)
  • GLMapScaleRulerTextFormatterBlock is used to change scale ruler format or localize unit name.

    Declaration

    Objective-C

    typedef NSString *_Nullable (^GLMapScaleRulerTextFormatterBlock)(int, GLUnits)
  • GLMapResourceBlock is used to load resources from custom place.

    Declaration

    Objective-C

    typedef GLMapResource (^GLMapResourceBlock)(NSString *)
  • Set of GLMapPoint

    Declaration

    Objective-C

    typedef void *GLMapPointSet
  • Block that will be called when request is finished

    Declaration

    Objective-C

    typedef void (^GLRouteCompletionBlock)(GLRoute *_Nullable, NSError *_Nullable)

    Parameters

    result

    instance of GLRoute with information about the route

    error

    contains error if request is failed

  • Block that will be called to make gradients for track

    Declaration

    Objective-C

    typedef GLMapColor (^GLMapTrackDataColorBlock)(uint32_t)

    Parameters

    index

    index of point

    Return Value

    color in this point

  • Block that will be called when request is finished

    Declaration

    Objective-C

    typedef void (^GLMapHeightDataCompletionBlock)(GLRouteElevation *_Nullable,
                                                   NSError *_Nullable)

    Parameters

    result

    instance of GLRouteElevation with information about height

    error

    contains error if request is failed

  • GLMapSearchCompletionBlock is called when search task is finished. If results is nil - task is cancelled.

    Warning

    If custom results is also added, results will contain GLMapVectorObjects and objects of user type.

    Declaration

    Objective-C

    typedef void (^GLMapSearchCompletionBlock)(
        NSArray<GLMapVectorObject *> *_Nonnull)
  • GLMapSearchInfoBlock called to fetch information that used to sort custom search results.

    Declaration

    Objective-C

    typedef void (^GLMapSearchInfoBlock)(id _Nonnull, GLMapPoint *_Nonnull,
                                         GLSearchCategory *_Nullable *_Nonnull)