lustre_kakaomap/polygon
Polygon shape for KakaoMap.
Types
Options for creating a polygon.
pub opaque type PolygonOption
Values
pub fn color(
options: List(PolygonOption),
color: String,
) -> List(PolygonOption)
Adds stroke color (pipeline-friendly).
pub fn draw(
options options: List(PolygonOption),
id id: String,
shape_id shape_id: String,
) -> effect.Effect(msg)
Draws a polygon on the map.
pub fn fill(
options: List(PolygonOption),
color color: String,
opacity opacity: Float,
) -> List(PolygonOption)
Adds fill color and opacity (pipeline-friendly).
pub fn fill_color(color: String) -> PolygonOption
Sets fill color as “#xxxxxx” hex string.
pub fn fill_opacity(opacity: Float) -> PolygonOption
Sets fill opacity (0.0 to 1.0).
pub fn from(
coordinates: List(coords.LatLng),
) -> List(PolygonOption)
Creates an option list from a path. Pipeline entry point.
pub fn path(coordinates: List(coords.LatLng)) -> PolygonOption
Sets the polygon path coordinates. Required.
pub fn remove(
id id: String,
shape_id shape_id: String,
) -> effect.Effect(msg)
Removes a polygon 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 polygon path.
pub fn stroke_color(color: String) -> PolygonOption
Sets stroke color as “#xxxxxx” hex string.
pub fn stroke_opacity(opacity: Float) -> PolygonOption
Sets stroke opacity (0.0 to 1.0).
pub fn style(
options: List(PolygonOption),
style: types.StrokeStyle,
) -> List(PolygonOption)
Adds stroke style (pipeline-friendly).