Expand description
Custom layers: code that draws through a DrawContext (lines, fills, markers, labels in
world or lon/lat coordinates) and, optionally, says which of its features are under a spot.
Add one to a crate::Map with add_custom_layer for anything style layers can’t express,
the way MapLibre’s CustomLayerInterface works.
Markers is a ready-made one for a list of Overlay markers and lines.
Structs§
- Draw
Context - What a layer draws into. Positions are braille dots relative to the map area (2 per column, 4 per row); helpers take world (Web Mercator 0..1) or lon/lat coordinates. Lines and fills draw immediately, in layer order; markers and labels are collected and placed after every layer, highest priority first, so they never overlap.
- Markers
- A list of
Overlaymarkers and lines as a custom layer. - Pick
Context - Where to look for features:
targetis a dot position relative toarea.
Constants§
- REPEAT_
DOTS - By default the same text isn’t placed again within this many braille dots (20 columns or 10 rows; a dot is about as tall as it is wide), so copies of one label from neighboring tiles merge.
Traits§
- Custom
Layer - Something drawn on the map by your own code.