lustre_kakaomap/info_window
InfoWindow overlay for KakaoMap.
Types
Options for creating an info window.
pub opaque type InfoWindowOption
Values
pub fn close(
id id: String,
info_window_id iw_id: String,
) -> effect.Effect(msg)
Closes and removes an info window.
pub fn content_element(
el: element.Element(msg),
) -> InfoWindowOption
Sets content from a Lustre Element (type-safe alternative to content/1).
info_window.content_element(
html.div([], [element.text("Info!")])
)
pub fn disable_auto_pan(disabled: Bool) -> InfoWindowOption
Disables auto-panning when the info window opens.
pub fn open(
id id: String,
info_window_id iw_id: String,
options options: List(InfoWindowOption),
) -> effect.Effect(msg)
Opens an info window on the map.
pub fn open_on_marker(
id id: String,
info_window_id iw_id: String,
marker_id marker_id: String,
options options: List(InfoWindowOption),
) -> effect.Effect(msg)
Opens an info window anchored to a marker.
pub fn removable(enabled: Bool) -> InfoWindowOption
Makes the info window user-closable.
pub fn set_content(
id id: String,
info_window_id iw_id: String,
html html: String,
) -> effect.Effect(msg)
Updates the content.
pub fn set_position(
id id: String,
info_window_id iw_id: String,
pos pos: coords.LatLng,
) -> effect.Effect(msg)
Updates the position.
pub fn sync(
id id: String,
info_windows info_windows: List(
#(String, String, coords.LatLng),
),
) -> effect.Effect(msg)
Synchronizes info windows on the map with a desired list. Adds new, removes missing, and updates changed content/positions.
info_window.sync(id: "map", info_windows: [
#("iw1", "<div>Seoul</div>", coords.seoul()),
#("iw2", "<div>Busan</div>", coords.busan()),
])