Warning

This feature is available in the Full MapKit SDK version

YMKRouteHelper

@interface YMKRouteHelper : NSObject

Undocumented

Summary

Class methods

+ (nonnull YMKJamStyle *)createDefaultJamStyle;
Creates a default traffic style

+ (nonnull YMKJamStyle *)createDisabledJamStyle;
Creates a disabled traffic jams style

+ (nonnull YMKManeuverStyle *)createDefaultManeuverStyle;
Creates a default maneuver style

+ (void)updatePolylineWithPolyline:(nonnull YMKPolylineMapObject *)polyline
                             route:(nonnull YMKDrivingRoute *)route
                             style:(nonnull YMKJamStyle *)style
                    updateGeometry:(BOOL)updateGeometry;

Sets a new geometry and colors for a polyline

+ (void)addManeuversWithPolyline:(nonnull YMKPolylineMapObject *)polyline
                           route:(nonnull YMKDrivingRoute *)route;

Add maneuvers from provided route as arrows Behaviour is undefined if route

+ (void)addJamsWithPolyline:(nonnull YMKPolylineMapObject *)polyline
                      route:(nonnull YMKDrivingRoute *)route;

Add jams from provided route as stroke colors Behaviour is undefined if route

+ (void)applyJamStyleWithPolyline:(nonnull YMKPolylineMapObject *)polyline
                            style:(nonnull YMKJamStyle *)style;

Applies the traffic jam style

+ (void)applyManeuverStyleWithPolyline:(nonnull YMKPolylineMapObject *)polyline
                                 style:(nonnull YMKManeuverStyle *)style;

Applies a maneuver style

Class methods

createDefaultJamStyle

+ (nonnull YMKJamStyle *)createDefaultJamStyle;

Creates a default traffic style. Default values: colors : Blocked : 0x000000ff, Free : 0x00ff00ff, Hard : 0xff0000ff, Light : 0xffff00ff, Unknown : 0x909090ff, VeryHard : 0xa00000ff


createDisabledJamStyle

+ (nonnull YMKJamStyle *)createDisabledJamStyle;

Creates a disabled traffic jams style. Colors : Blocked : 0x909090ff, Free : 0x909090ff, Hard : 0x909090ff, Light : 0x909090ff, Unknown : 0x909090ff, VeryHard : 0x909090ff


createDefaultManeuverStyle

+ (nonnull YMKManeuverStyle *)createDefaultManeuverStyle;

Creates a default maneuver style.

Default values for ArrowManeuverStyle: fillColor : 0x000000ff outlineColor : 0xffffffff outlineWidth : 2.f length : 80 triangleHeight : 16 enabled : false

Default values for PolygonManeuverStyle: trajectoryWidth : 5.f trajectoryColor : 0xffffffff polygonAlpha : 60.f / 255.f polygonColor : 0xff00ffff renderMode : ColoredPolygon fadeDistance : 10.f fadeAlpha : 0.f enabled : false


updatePolylineWithPolyline:route:style:updateGeometry:

+ (void)updatePolylineWithPolyline:(nonnull YMKPolylineMapObject *)polyline
                             route:(nonnull YMKDrivingRoute *)route
                             style:(nonnull YMKJamStyle *)style
                    updateGeometry:(BOOL)updateGeometry;

Sets a new geometry and colors for a polyline. If style.enabled = false, the polyline is drawn using the color for the Unknown traffic jam type. If updateGeometry = false, but route geometry differs from polyline geometry, then behaviour is undefined.


addManeuversWithPolyline:route:

+ (void)addManeuversWithPolyline:(nonnull YMKPolylineMapObject *)polyline
                           route:(nonnull YMKDrivingRoute *)route;

Add maneuvers from provided route as arrows Behaviour is undefined if route.geometry does not equals polyline.geometry.


addJamsWithPolyline:route:

+ (void)addJamsWithPolyline:(nonnull YMKPolylineMapObject *)polyline
                      route:(nonnull YMKDrivingRoute *)route;

Add jams from provided route as stroke colors Behaviour is undefined if route.geometry does not equals polyline.geometry.


applyJamStyleWithPolyline:style:

+ (void)applyJamStyleWithPolyline:(nonnull YMKPolylineMapObject *)polyline
                            style:(nonnull YMKJamStyle *)style;

Applies the traffic jam style. Updates colors for traffic jam types provided in the style parameter.


applyManeuverStyleWithPolyline:style:

+ (void)applyManeuverStyleWithPolyline:(nonnull YMKPolylineMapObject *)polyline
                                 style:(nonnull YMKManeuverStyle *)style;

Applies a maneuver style. This method should be called every time after updatePolyline with updateGeometry == true occurs; otherwise, the default maneuver style is applied.