FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    DrawnMap

    struct · ferroui-livecharts · v0.5.0

    struct DrawnMap
    

    A map of named layers (DrawnMap), in the order they were added.

    View source

    Members

    DEFAULT_LAYER

    const DEFAULT_LAYER: &'static str
    

    The name of the layer of a map read from one file.

    Source

    new

    fn new() -> Self
    

    An empty map.

    Source

    from_geojson

    fn from_geojson(json: &str) -> Result<Self, ChartError>
    

    A map of one layer, default, with the default layer paints.

    Source

    add_layer_from_geojson

    fn add_layer_from_geojson(self: &mut Self, json: &str, layer_name: &str, stroke: Option<Color>, fill: Option<Color>) -> Result<&mut MapLayer, ChartError>
    

    Reads a GeoJSON file into the layer of the given name (AddLayerFromStreamReader); a new layer takes the given paints, an existing one keeps its own.

    Source

    layers

    fn layers(self: &Self) -> &[MapLayer]
    

    The layers, in the order they were added.

    Source

    layer

    fn layer(self: &Self, name: &str) -> Option<&MapLayer>
    

    Source

    layer_mut

    fn layer_mut(self: &mut Self, name: &str) -> Option<&mut MapLayer>
    

    Source

    insert_layer

    fn insert_layer(self: &mut Self, layer: MapLayer)
    

    Adds a layer, or replaces the layer of the same name.

    Source

    remove_layer

    fn remove_layer(self: &mut Self, name: &str) -> Option<MapLayer>
    

    Source

    find_land

    fn find_land(self: &Self, short_name: &str) -> Option<&LandDefinition>
    

    The land of the given key in the default layer (FindLand).

    Source

    find_land_in

    fn find_land_in(self: &Self, short_name: &str, layer_name: &str) -> Option<&LandDefinition>
    

    The land of the given key in the given layer.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Clone
    • Debug
    • Default
    • StructuralPartialEq
    • PartialEq

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.