Type Definitions

The following type definitions are available globally.

  • GLMapAnimationCompletionBlock called when animation ends. finished set to YES, when animation is finished, and NO when animation is cancelled.

    Declaration

    Objective-C

    typedef void (^GLMapAnimationCompletionBlock)(BOOL)
  • 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.

  • Generator block. Returns points for index. Used in generating constructor -initWithCount:callback:

    Declaration

    Objective-C

    typedef GLMapPoint (^GetPointBlock)(NSUInteger)

    Parameters

    index

    Index of the point

    Return Value

    Point to add into the array

  • Enumerator block. Called for all points subsequently.

    Declaration

    Objective-C

    typedef void (^EnumeratePointBlock)(NSUInteger, GLMapPoint)

    Parameters

    index

    Point index

    point

    Point

  • 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 created for animations. Map properties modified inside GLMapAnimationBlock will use animation. Animation properties could be changed in animation object.

    Declaration

    Objective-C

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

    Declaration

    Objective-C

    typedef void (^GLMapVisibleTilesChangedBlock)(NSSet *_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)
  • 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

  • Enumerator block. Called subsiquently for all maneuver points

    Declaration

    Objective-C

    typedef void (^GLRouteManeuverEnumPointsBlock)(GLMapPoint, float)

    Parameters

    point

    Point inside maneuver

    height

    Height in that point if available, NAN otherwise.

  • 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

  • Block that will be called when request is finished

    Declaration

    Objective-C

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

    Parameters

    result

    instance of GLRoute with information about the route

    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 (^GLSearchCompletionBlock)(GLMapVectorObjectArray *_Nonnull)
  • GLMapSearchInfoBlock called to fetch information that used to sort custom search results.

    Declaration

    Objective-C

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