GLMapTrack

Objective-C


@interface GLMapTrack : GLMapTrackLayer

Swift

class GLMapTrack : GLMapTrackLayer

GLMapTrack is a container class for track objects. The main difference from a line is that the data generalization function is used for tracks to remove data points redundant for the current zoom level.

  • Unavailable

    GLMapTrack should be created with [GLMapTrack initWithDrawOrder:]

    Default -init is disabled.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Initializes a new GLMapTrack.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDrawOrder:(int32_t)drawOrder;

    Swift

    init(drawOrder: Int32)

    Parameters

    drawOrder

    The order of the object.

  • Sets the track width and other properties.

    Declaration

    Objective-C

    - (void)setStyle:(nonnull GLMapVectorStyle *)style;

    Swift

    func setStyle(_ style: GLMapVectorStyle)

    Parameters

    style

    The new track style.

  • Sets the track data.

    Declaration

    Objective-C

    - (void)setTrackData:(GLMapTrackData *_Nullable)data
                   style:(nonnull GLMapVectorStyle *)style
              completion:(dispatch_block_t _Nullable)completion;

    Swift

    func setTrackData(_ data: GLMapTrackData?, style: GLMapVectorStyle) async

    Parameters

    data

    The new track data.

    style

    The style of the track.

    completion

    A block called when the data is set.

  • The color of the track from the start to the progress index.

    Declaration

    Objective-C

    @property (nonatomic) GLMapColor progressColor;

    Swift

    var progressColor: GLMapColor { get set }
  • The track from the start to the progress index will change its color to the progress color. Animatable.

    Declaration

    Objective-C

    @property (nonatomic) double progressIndex;

    Swift

    var progressIndex: Double { get set }