pub struct Feature { /* fields omitted */ }
Features contain map geometry with related metadata.
A new Feature can be obtained with
Layer.into_feature.
After optionally adding an ID and tags, retrieve the Layer with the Feature
added by calling Feature.into_layer.
use mvt::{GeomEncoder,GeomType,Tile,Transform};
let mut tile = Tile::new(4096);
let layer = tile.create_layer("First Layer");
let geom_data = GeomEncoder::new(GeomType::Point, Transform::new())
.add_point(1.0, 2.0)
.add_point(7.0, 6.0)
.encode()?;
let feature = layer.into_feature(geom_data);
let layer = feature.into_layer();
Complete the feature, returning ownership of the layer.
Add a tag of string type.
Add a tag of double type.
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)