lustre_kakaomap/types
Enumeration types for KakaoMap API constants.
All JavaScript string constants are represented as Gleam custom types for exhaustive pattern matching and compile-time safety.
Types
Positions for map controls (zoom, map type switcher).
pub type ControlPosition {
Top
TopLeft
TopRight
Left
Right
BottomLeft
Bottom
BottomRight
}
Constructors
-
Top -
TopLeft -
TopRight -
Left -
Right -
BottomLeft -
Bottom -
BottomRight
Built-in map control types.
pub type ControlType {
MapTypeControl
ZoomControl
}
Constructors
-
MapTypeControl -
ZoomControl
Copyright text positions.
pub type CopyrightPosition {
CopyrightBottomLeft
CopyrightBottomRight
}
Constructors
-
CopyrightBottomLeft -
CopyrightBottomRight
Base map types for the main tile layer.
pub type MapTypeId {
Roadmap
Skyview
Hybrid
}
Constructors
-
Roadmap -
Skyview -
Hybrid
Overlay tile types that can be layered on top of the base map.
pub type OverlayMapTypeId {
RoadviewOverlay
Overlay
Traffic
Terrain
Bicycle
BicycleHybrid
UseDistrict
}
Constructors
-
RoadviewOverlay -
Overlay -
Traffic -
Terrain -
Bicycle -
BicycleHybrid -
UseDistrict
Line styles for shapes (polyline, polygon, circle, etc.).
pub type StrokeStyle {
Solid
Shortdash
Shortdot
Shortdashdot
Shortdashdotdot
Dot
Dash
Dashdot
Longdash
Longdashdot
Longdashdotdot
}
Constructors
-
Solid -
Shortdash -
Shortdot -
Shortdashdot -
Shortdashdotdot -
Dot -
Dash -
Dashdot -
Longdash -
Longdashdot -
Longdashdotdot
Values
pub fn control_position_to_string(
position: ControlPosition,
) -> String
Converts a ControlPosition to its KakaoMap JS string.
pub fn control_type_to_string(control: ControlType) -> String
Converts a ControlType to its KakaoMap JS string.
pub fn copyright_position_to_string(
position: CopyrightPosition,
) -> String
Converts a CopyrightPosition to its KakaoMap JS string.
pub fn map_type_id_to_string(id: MapTypeId) -> String
Converts a MapTypeId to its KakaoMap JS string.
pub fn overlay_map_type_id_to_string(
id: OverlayMapTypeId,
) -> String
Converts an OverlayMapTypeId to its KakaoMap JS string.
pub fn parse_map_type_id(str: String) -> MapTypeId
Parses a KakaoMap JS string into a MapTypeId. Returns Roadmap for unknown strings.
pub fn stroke_style_to_string(style: StrokeStyle) -> String
Converts a StrokeStyle to its KakaoMap JS string.