lustre_kakaomap/ellipse

Ellipse shape for KakaoMap. Supports pipeline-friendly API:

ellipse.from(coords.seoul(), rx: 500.0, ry: 300.0)
|> ellipse.color("#0000FF")
|> ellipse.fill(color: "#8888FF", opacity: 0.3)
|> ellipse.draw(id: "map", shape_id: "zone")

Types

pub opaque type EllipseOption

Values

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

Sets the ellipse center position. Required.

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

Removes all shapes from the map.

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

Adds stroke color (pipeline-friendly).

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

Draws an ellipse on the map.

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

Adds fill color and opacity (pipeline-friendly).

pub fn fill_color(color: String) -> EllipseOption

Sets fill color as “#xxxxxx” hex string.

pub fn fill_opacity(opacity: Float) -> EllipseOption

Sets fill opacity (0.0 to 1.0).

pub fn from(
  center_pos: coords.LatLng,
  rx rx_meters: Float,
  ry ry_meters: Float,
) -> List(EllipseOption)

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

ellipse.from(coords.seoul(), rx: 500.0, ry: 300.0)
|> ellipse.color("#0000FF")
|> ellipse.fill(color: "#8888FF", opacity: 0.3)
|> ellipse.draw(id: "map", shape_id: "zone")
pub fn remove(
  id id: String,
  shape_id shape_id: String,
) -> effect.Effect(msg)

Removes an ellipse from the map.

pub fn rx(meters: Float) -> EllipseOption

Sets the x-axis radius in meters. Required.

pub fn ry(meters: Float) -> EllipseOption

Sets the y-axis radius in meters. Required.

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

Updates the ellipse center position.

pub fn set_radius(
  id id: String,
  shape_id shape_id: String,
  rx_meters rx: Float,
  ry_meters ry: Float,
) -> effect.Effect(msg)

Updates the ellipse radii.

pub fn stroke_color(color: String) -> EllipseOption

Sets stroke color as “#xxxxxx” hex string.

pub fn stroke_opacity(opacity: Float) -> EllipseOption

Sets stroke opacity (0.0 to 1.0).

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

Sets stroke style.

pub fn stroke_weight(weight: Int) -> EllipseOption

Sets stroke width in pixels.

pub fn z_index(index: Int) -> EllipseOption

Sets the z-index.

Search Document