MMKLineStyle

@interface MMKLineStyle : NSObject

The style of the polyline.

Summary

Class methods

+ (nonnull MMKLineStyle *)lineStyleWithStrokeWidth:( float)strokeWidth
                                    gradientLength:( float)gradientLength
                                      outlineColor:(nonnull UIColor *)outlineColor
                                      outlineWidth:( float)outlineWidth
                               innerOutlineEnabled:( BOOL)innerOutlineEnabled
                                        turnRadius:( float)turnRadius
                              arcApproximationStep:( float)arcApproximationStep
                                        dashLength:( float)dashLength
                                         gapLength:( float)gapLength
                                        dashOffset:( float)dashOffset;

Instance methods

- (nonnull MMKLineStyle *)init;

Properties

@property (nonatomic, assign, unsafe_unretained, readwrite) float strokeWidth;
The stroke width in units

@property (nonatomic, assign, unsafe_unretained, readwrite) float gradientLength;
Maximum length (in units) of the gradient from one color to another

@property (nonatomic, strong, readwrite, nonnull) UIColor *outlineColor;
The outline color

@property (nonatomic, assign, unsafe_unretained, readwrite) float outlineWidth;
Width of the outline in units

@property (nonatomic, assign, unsafe_unretained, readwrite)
    BOOL innerOutlineEnabled;

Enables the inner outline if true (a dark border along the edge of the outline)

@property (nonatomic, assign, unsafe_unretained, readwrite) float turnRadius;
Maximum radius of a turn

@property (nonatomic, assign, unsafe_unretained, readwrite)
    float arcApproximationStep;

Defines step of arc approximation

@property (nonatomic, assign, unsafe_unretained, readwrite) float dashLength;
Length of a dash in units

@property (nonatomic, assign, unsafe_unretained, readwrite) float gapLength;
Length of the gap between two dashes in units

@property (nonatomic, assign, unsafe_unretained, readwrite) float dashOffset;
Offset from the start of the polyline to the reference dash in units

Class methods

lineStyleWithStrokeWidth:gradientLength:outlineColor:outlineWidth:innerOutlineEnabled:turnRadius:arcApproximationStep:dashLength:gapLength:dashOffset:

+ (nonnull MMKLineStyle *)lineStyleWithStrokeWidth:( float)strokeWidth
                                    gradientLength:( float)gradientLength
                                      outlineColor:(nonnull UIColor *)outlineColor
                                      outlineWidth:( float)outlineWidth
                               innerOutlineEnabled:( BOOL)innerOutlineEnabled
                                        turnRadius:( float)turnRadius
                              arcApproximationStep:( float)arcApproximationStep
                                        dashLength:( float)dashLength
                                         gapLength:( float)gapLength
                                        dashOffset:( float)dashOffset;


Instance methods

init

- (nonnull MMKLineStyle *)init;


Properties

strokeWidth

@property (nonatomic, assign, unsafe_unretained, readwrite) float strokeWidth;

The stroke width in units. Default: 5. The size of a unit is equal to the size of a pixel at the current zoom level when the camera position's tilt is equal to 0 and the scale factor is equal to 1.


gradientLength

@property (nonatomic, assign, unsafe_unretained, readwrite) float gradientLength;

Maximum length (in units) of the gradient from one color to another. Default: 0.


outlineColor

@property (nonatomic, strong, readwrite, nonnull) UIColor *outlineColor;

The outline color. Default: hexademical RGBA code 0x00000000.


outlineWidth

@property (nonatomic, assign, unsafe_unretained, readwrite) float outlineWidth;

Width of the outline in units. Default: 0.


innerOutlineEnabled

@property (nonatomic, assign, unsafe_unretained, readwrite)
    BOOL innerOutlineEnabled;

Enables the inner outline if true (a dark border along the edge of the outline). Default: false.


turnRadius

@property (nonatomic, assign, unsafe_unretained, readwrite) float turnRadius;

Maximum radius of a turn. Measured in units. Default: 10.


arcApproximationStep

@property (nonatomic, assign, unsafe_unretained, readwrite)
    float arcApproximationStep;

Defines step of arc approximation. Smaller values make polyline smoother. Measured in degrees. Default: 12.


dashLength

@property (nonatomic, assign, unsafe_unretained, readwrite) float dashLength;

Length of a dash in units. Default: 0 (dashing is turned off). Arrows are ignored in dashed polylines.


gapLength

@property (nonatomic, assign, unsafe_unretained, readwrite) float gapLength;

Length of the gap between two dashes in units. Default: 0 (dashing is turned off). Arrows are ignored in dashed polylines.


dashOffset

@property (nonatomic, assign, unsafe_unretained, readwrite) float dashOffset;

Offset from the start of the polyline to the reference dash in units. Default: 0.