pub struct LegendEntry {
pub label: String,
pub from: NodeRef,
pub properties: Map<String, Value>,
pub note: Option<String>,
pub min_zoom: Option<u8>,
pub max_zoom: Option<u8>,
pub geometry: Option<LegendGeometry>,
}Expand description
One row of a legend: a label, and the symbol it explains identified by where that symbol comes from.
Fields§
§label: StringWhat the reader sees. Write it for someone who has not read the
style: under $40,000, not bin 0.
from: NodeRefThe node that draws this symbol on the map. Verified at
graph-build time to exist and to produce a Raster, so an entry
cannot point at something that draws nothing.
properties: Map<String, Value>Feature properties that select this entry’s case, fed to the
node’s *-expr fields the way a real feature would be. For a
choropleth, a value inside the class: { "income": 30000 }.
note: Option<String>Prose for this entry alone.
min_zoom: Option<u8>Zooms this entry applies to, for a map whose symbols come and go with scale. Absent means every zoom.
max_zoom: Option<u8>§geometry: Option<LegendGeometry>Which geometry the swatch’s stand-in feature carries. Absent leaves it to whoever draws the swatch, which offers all three.
Trait Implementations§
Source§impl Clone for LegendEntry
impl Clone for LegendEntry
Source§fn clone(&self) -> LegendEntry
fn clone(&self) -> LegendEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more