lustre_kakaomap/circle

Circle shape for KakaoMap. Supports pipeline-friendly API:

circle.from(coords.seoul(), radius: 500.0)
|> circle.color("#FF0000")
|> circle.fill(color: "#FF8888", opacity: 0.3)
|> circle.draw(id: "map", shape_id: "area")

Types

pub opaque type CircleOption

Values

pub fn center(pos: coords.LatLng) -> CircleOption

Sets the circle center position. Required.

pub fn clear(id id: String) -> effect.Effect(msg)

Removes all shapes from the map.

pub fn color(
  options: List(CircleOption),
  color: String,
) -> List(CircleOption)

Adds stroke color (pipeline-friendly).

pub fn draw(
  options options: List(CircleOption),
  id id: String,
  shape_id shape_id: String,
) -> effect.Effect(msg)

Draws a circle on the map.

pub fn fill(
  options: List(CircleOption),
  color color: String,
  opacity opacity: Float,
) -> List(CircleOption)

Adds fill color and opacity (pipeline-friendly).

pub fn fill_color(color: String) -> CircleOption

Sets fill color as “#xxxxxx” hex string.

pub fn fill_opacity(opacity: Float) -> CircleOption

Sets fill opacity (0.0 to 1.0).

pub fn from(
  center_pos: coords.LatLng,
  radius meters: Float,
) -> List(CircleOption)

Creates an option list from center and radius. Pipeline entry point.

circle.from(coords.seoul(), radius: 500.0)
|> circle.color("#FF0000")
|> circle.fill(color: "#FF8888", opacity: 0.3)
|> circle.draw(id: "map", shape_id: "area")
pub fn radius(meters: Float) -> CircleOption

Sets the circle radius in meters. Required.

pub fn remove(
  id id: String,
  shape_id shape_id: String,
) -> effect.Effect(msg)

Removes a circle from the map.

pub fn set_position(
  id id: String,
  shape_id shape_id: String,
  pos pos: coords.LatLng,
) -> effect.Effect(msg)

Updates the circle center position.

pub fn set_radius(
  id id: String,
  shape_id shape_id: String,
  meters meters: Float,
) -> effect.Effect(msg)

Updates the circle radius in meters.

pub fn stroke_color(color: String) -> CircleOption

Sets stroke color as “#xxxxxx” hex string.

pub fn stroke_opacity(opacity: Float) -> CircleOption

Sets stroke opacity (0.0 to 1.0).

pub fn stroke_style(style: types.StrokeStyle) -> CircleOption

Sets stroke style.

pub fn stroke_weight(weight: Int) -> CircleOption

Sets stroke width in pixels.

pub fn z_index(index: Int) -> CircleOption

Sets the z-index.

Search Document