lustre_kakaomap/polyline
Polyline shape for KakaoMap.
Supports pipeline-friendly API: polyline.from(path) |> polyline.color("#F00") |> polyline.draw(id:, shape_id:)
Types
Options for creating a polyline.
pub opaque type PolylineOption
Values
pub fn arrow(
options: List(PolylineOption),
) -> List(PolylineOption)
Adds an end arrow (pipeline-friendly).
pub fn color(
options: List(PolylineOption),
color: String,
) -> List(PolylineOption)
Adds stroke color (pipeline-friendly).
pub fn draw(
options options: List(PolylineOption),
id id: String,
shape_id shape_id: String,
) -> effect.Effect(msg)
Draws a polyline on the map.
pub fn end_arrow(enabled: Bool) -> PolylineOption
Shows an arrow at the end of the line.
pub fn from(
coordinates: List(coords.LatLng),
) -> List(PolylineOption)
Creates an option list from a path. Pipeline entry point.
polyline.from([coords.seoul(), coords.busan()])
|> polyline.color("#FF0000")
|> polyline.weight(3)
|> polyline.draw(id: "map", shape_id: "route")
pub fn opacity(
options: List(PolylineOption),
opacity: Float,
) -> List(PolylineOption)
Adds stroke opacity (pipeline-friendly).
pub fn path(coordinates: List(coords.LatLng)) -> PolylineOption
Sets the polyline path. Required.
pub fn remove(
id id: String,
shape_id shape_id: String,
) -> effect.Effect(msg)
Removes a polyline from the map.
pub fn set_path(
id id: String,
shape_id shape_id: String,
coordinates coordinates: List(coords.LatLng),
) -> effect.Effect(msg)
Updates the polyline path.
pub fn stroke_color(color: String) -> PolylineOption
Sets stroke color as “#xxxxxx” hex string.
pub fn stroke_opacity(opacity: Float) -> PolylineOption
Sets stroke opacity (0.0 to 1.0).
pub fn stroke_weight(weight: Int) -> PolylineOption
Sets stroke width in pixels (default: 3).
pub fn style(
options: List(PolylineOption),
style: types.StrokeStyle,
) -> List(PolylineOption)
Adds stroke style (pipeline-friendly).
pub fn weight(
options: List(PolylineOption),
weight: Int,
) -> List(PolylineOption)
Adds stroke weight (pipeline-friendly).