KNMapSegmentPolyline
INFO
This English reference is based on Directions SDK 1.12.8-hotfix02. For the latest version, see the Korean reference.
Customization is possible, such as applying a pattern image to the polyline or applying multiple divided colors.
Example code — KNMapSegmentPolyline
kotlin
class KNMapSegmentPolyline : KNMapGroundObjectConstantsConstructor
Creates a KNMapSegmentPolyline object.
kotlin
fun KNMapSegmentPolyline()Properties
| Name | Description | Type |
|---|---|---|
strokeColor | Outline color of the line (default: WHITE) | var strokeColor: Int |
lineWidth | Line width (default: 15, range: 1–50) | var lineWidth: Float = 15.0f |
strokeLineWidth | Outline width (default: 4, range: 0–10) | var strokeLineWidth: Float = 4.0f |
capType | Shape of both line ends | var capType: KNMapSegmentPolyline.KNLineCapType |
isVisible | Whether to display the line (default: true) | var isVisible: Boolean = true |
priority | Priority to display lines. A higher number is displayed on top. (default: 0, priority range: 0~65535) | var priority: Int = 0 |
patternImage | Whether to set pattern image within line (default: null) | var patternImage: Bitmap? = null |
tag | Tag to set on the line. The tag has the value Int and can be used when you want to classify into categories or make separate distinctions. (optional) | var tag: Int |
Methods
addSegment
Generates line segments using multiple KATEC coordinates and color information for those coordinates. Afterwards, the current segment and the recently added segment are connected.
kotlin
fun addSegment( points: List<FloatPoint>,
@ColorInt color: Int )