Skip to content

KrossPolyLine

Farman Ullah Khan edited this page Jul 30, 2025 · 1 revision

πŸ“ KrossPolyLine Data Class Documentation

Represents a polyline to be drawn on the map, made of connected coordinate points with customizable appearance.


πŸ”Ή Overview

Element Type Description
KrossPolyLine Data Class Defines a path made of multiple points with visual styling.

πŸ“¦ KrossPolyLine

Definition:
A polyline is a sequence of lines (edges) connecting multiple geographic coordinates, used for routes, boundaries, or shapes.

Properties

Property Type Default Description
points List<KrossCoordinate> β€” The ordered list of coordinates forming the path of the polyline.
title String "" Optional label for the polyline.
color Color β€” The color used to draw the polyline.
width Float β€” The thickness of the polyline in pixels.

βœ… Usage Example

val polyline = KrossPolyLine(
    points = listOf(
        KrossCoordinate(35.0, 72.0),
        KrossCoordinate(35.1, 72.1),
        KrossCoordinate(35.2, 72.2)
    ),
    title = "Route Path",
    color = Color.Red,
    width = 5f
)

Clone this wiki locally