Class YMKColoredPolylineMapObject

A colored polyline object.

Instance Methods

- addArrowTapListenerWithTapListener:

Adds a tap listener for arrows.

- addArrowWithPosition:length:fillColor:

Adds an arrow.

- arrows

Provides arrows.

- hideWithSubpolyline:

Hides the subpolyline, canceling any previous hides.

- hideWithSubpolylines:

Hides multiple subpolylines, canceling any previous hides.

- removeArrowTapListenerWithTapListener:

Removes the tap listener for arrows.

- selectWithSelectionColor:subpolyline:

Selects subpolyline by color.

- setColorsWithColors:

Sets indexes of colors in palette for line segments.

- setColorsWithColors:weights:

Sets indexes of colors in palette for line segments.

- setPaletteColorWithColorIndex:color:

Set color in RGBA mode for colorIndex.

- addArrowTapListenerWithTapListener:

Adds a tap listener for arrows.

- addArrowWithPosition:length:fillColor:

Adds an arrow.

- arrows

Provides arrows.

- hideWithSubpolyline:

Hides the subpolyline, canceling any previous hides.

- hideWithSubpolylines:

Hides multiple subpolylines, canceling any previous hides.

- removeArrowTapListenerWithTapListener:

Removes the tap listener for arrows.

- selectWithSelectionColor:subpolyline:

Selects subpolyline by color.

- setColorsWithColors:

Sets indexes of colors in palette for line segments.

- setColorsWithColors:weights:

Sets indexes of colors in palette for line segments.

- setPaletteColorWithColorIndex:color:

Set color in RGBA mode for colorIndex.

Properties

arcApproximationStep

Defines step of arc approximation.

geometry

Provides geometry.

gradientLength

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

innerOutlineEnabled

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

outlineColor

The outline color.

outlineWidth

Width of the outline in units.

strokeWidth

The stroke width in units.

turnRadius

Maximum radius of a turn.

arcApproximationStep

Defines step of arc approximation.

geometry

Provides geometry.

gradientLength

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

innerOutlineEnabled

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

outlineColor

The outline color.

outlineWidth

Width of the outline in units.

strokeWidth

The stroke width in units.

turnRadius

Maximum radius of a turn.

Method Detail

-addArrowTapListenerWithTapListener:

- (void)addArrowTapListenerWithTapListener:(nullable id< YMKArrowTapListener >)tapListener 

Adds a tap listener for arrows.

-addArrowWithPosition:length:fillColor:

- (nullable YMKArrow *)addArrowWithPosition:(nonnull YMKPolylinePosition *)position
                                     length:(float)length
                                  fillColor:(nonnull UIColor *)fillColor 

Adds an arrow.

Parameters:
position

Coordinates of the center of the arrow.

length

Overall length of the arrow (including the tip) in units.

fillColor

Color of the arrow.

position

Coordinates of the center of the arrow.

length

Overall length of the arrow (including the tip) in units.

fillColor

Color of the arrow.

-arrows

- (nonnull NSArray< YMKArrow * > *)arrows

Provides arrows.

-hideWithSubpolyline:

- (void)hideWithSubpolyline:(nonnull YMKSubpolyline *)subpolyline 

Hides the subpolyline, canceling any previous hides.

-hideWithSubpolylines:

- (void)hideWithSubpolylines:(nonnull NSArray< YMKSubpolyline * > *)subpolylines 

Hides multiple subpolylines, canceling any previous hides.

-removeArrowTapListenerWithTapListener:

- (void)removeArrowTapListenerWithTapListener:(nullable id< YMKArrowTapListener >)tapListener 

Removes the tap listener for arrows.

-selectWithSelectionColor:subpolyline:

- (void)selectWithSelectionColor:(nonnull UIColor *)selectionColor
                     subpolyline:(nonnull YMKSubpolyline *)subpolyline 

Selects subpolyline by color.

-setColorsWithColors:

- (void)setColorsWithColors:(nonnull NSArray< NSNumber * > *)colors 

Sets indexes of colors in palette for line segments.

All the weights are equal to 1.

-setColorsWithColors:weights:

- (void)setColorsWithColors:(nonnull NSArray< NSNumber * > *)colors
                    weights:(nonnull NSArray< NSNumber * > *)weights 

Sets indexes of colors in palette for line segments.

Weights are used for generalization of colors.

-setPaletteColorWithColorIndex:color:

- (void)setPaletteColorWithColorIndex:(NSUInteger)colorIndex
                                color:(nonnull UIColor *)color 

Set color in RGBA mode for colorIndex.

If color for some index is not provided default value 0xffffffff is used.

Property Detail

arcApproximationStep

(assign, readwrite) float arcApproximationStep

Defines step of arc approximation.

Smaller values make polyline smoother. Measured in degrees. Default: 12.

geometry

(assign, readwrite) YMKPolyline * geometry

Provides geometry.

gradientLength

(assign, readwrite) float gradientLength

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

Default: 0.

innerOutlineEnabled

(assign, readwrite, getter=isInnerOutlineEnabled) BOOL innerOutlineEnabled

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

Default: true.

outlineColor

(assign, readwrite) UIColor * outlineColor

The outline color.

Default: white.

outlineWidth

(assign, readwrite) float outlineWidth

Width of the outline in units.

Default: 2.

strokeWidth

(assign, 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.

turnRadius

(assign, readwrite) float turnRadius

Maximum radius of a turn.

Measured in units. Default: 10.