GLMapTrack


@interface GLMapTrack : GLMapDrawObject

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

  • Plain -init is disabled

    Declaration

    Objective-C

    - (instancetype _Nonnull)init;
  • Initializes new GLMapTrack

    Declaration

    Objective-C

    - (instancetype _Nonnull)initWithDrawOrder:(uint32_t)drawOrder
                                  andTrackData:(GLMapTrackData *_Nullable)data;

    Parameters

    drawOrder

    order of object

    data

    optional track data

  • Sets track width and other properties

    Declaration

    Objective-C

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

    Parameters

    style

    New track style

  • Sets track data

    Declaration

    Objective-C

    - (void)setTrackData:(GLMapTrackData *_Nullable)data;

    Parameters

    data

    New track data

  • Finds nearest point of track, to given point. Useful to find nearest point of track whe user tap.

    Declaration

    Objective-C

    - (BOOL)findNearestPoint:(GLMapPoint *_Nonnull)point
                   atMapView:(GLMapView *_Nonnull)mapView
                 maxDistance:(CGFloat)distance;

    Parameters

    point

    Point on map. If point was found this value will be set to nearest point

    distance

    Max distance from track allowed

    Return Value

    YES if point found, otherwise NO.

  • Hidden track will prepare data to draw but will not draw anything

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) BOOL hidden;