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)
  • GLMapMarkerData is type used to reference an internal object.

    Declaration

    Objective-C

    typedef void *GLMapMarkerData
  • GLMapMarkerDataFillBlock is called for each marker to fill needed data

    Declaration

    Objective-C

    typedef void (^GLMapMarkerDataFillBlock)(id _Nonnull, GLMapMarkerData _Nonnull)
  • GLMapMarkerPositionBlock is called for each marker to get location of marker

    Declaration

    Objective-C

    typedef GLMapPoint (^GLMapMarkerLocationBlock)(id _Nonnull)
  • GLMapMarkerUnionBlock called when marker layer needs style for union of count markers

    Declaration

    Objective-C

    typedef void (^GLMapMarkerUnionFillBlock)(uint32_t, GLMapMarkerData _Nonnull)
  • Block is called to get tracks data for given bbox

    Declaration

    Objective-C

    typedef NSArray<GLMapTrackData *> *_Nullable (^GLMapTrackDataCallback)(
        GLMapBBox)

    Parameters

    bbox

    BBox of tracks

    Return Value

    array of GLMapTrackData

  • 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)
  • 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)(PlatformImage *_Nullable)
  • GLMapScaleRulerTextFormatterBlock is used to change scale ruler format or localize unit name.

    Declaration

    Objective-C

    typedef NSString *_Nullable (^GLMapScaleRulerTextFormatterBlock)(int, GLUnits)
  • Resource information filled by GLMapResourceBlock

    See more

    Declaration

    Objective-C

    typedef struct GLMapResource GLMapResource
  • Merkator tile coordinates

    See more

    Declaration

    Objective-C

    typedef struct GLMapTilePos GLMapTilePos
  • Geo point with latitude and longitude

    See more

    Declaration

    Objective-C

    typedef struct GLMapGeoPoint GLMapGeoPoint
  • GLMapPoint always uses internal map coordinates. From 0 to GLMapPointMax for X and Y axis. Origin is at the top left corner.

    See more

    Declaration

    Objective-C

    typedef struct GLMapPoint GLMapPoint
  • GLMapColor is color type based on uint32_t

    See more

    Declaration

    Objective-C

    typedef struct GLMapColor GLMapColor
  • GLMapResourceBlock is used to load resources from custom place.

    Declaration

    Objective-C

    typedef GLMapResource (^GLMapResourceBlock)(NSString *_Nonnull)
  • Point of track with color

    See more

    Declaration

    Objective-C

    typedef struct GLTrackPoint GLTrackPoint
  • Point of track with color

    See more

    Declaration

    Objective-C

    typedef struct GLRoutePoint GLRoutePoint
  • Bounding box

    See more

    Declaration

    Objective-C

    typedef struct GLMapBBox GLMapBBox
  • Set of GLMapPoint

    Declaration

    Objective-C

    typedef void *GLMapPointSet
  • Set of GLMapPoint

    Declaration

    Objective-C

    typedef void *GLMapBBoxSet
  • Result of track sampling

    See more

    Declaration

    Objective-C

    typedef struct GLTrackSampleResult GLTrackSampleResult
  • 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.

  • GLMapElevationBlock is called when asyncronys request of elevation is finished.

    Declaration

    Objective-C

    typedef void (^GLMapElevationBlock)(int16_t)
  • GLMapSlopeBlock is called when anasyncronys request of slope is finished.

    Declaration

    Objective-C

    typedef void (^GLMapSlopeBlock)(float)
  • GLMapDownloadProgress is preriodically called to report porgress of download

    Declaration

    Objective-C

    typedef void (^GLMapDownloadProgress)(NSUInteger, NSUInteger, double)
  • GLMapDownloadCompletion is called when download is finised

    Declaration

    Objective-C

    typedef void (^GLMapDownloadCompletion)(NSError *_Nullable)
  • 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.

  • Called when next object is ready while enumerating

    Declaration

    Objective-C

    typedef BOOL (^GLMapVectorObjectBlock)(GLMapVectorObject *_Nonnull)

    Return Value

    NO to break enumaration

  • 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)