Crates.io | brisk-cartography |
lib.rs | brisk-cartography |
version | 0.6.1 |
created_at | 2024-12-18 10:05:23.525897+00 |
updated_at | 2025-08-03 20:17:23.531769+00 |
description | Use of the brisk declarative engine with cartography. |
homepage | https://cyloncore.com |
repository | https://gitlab.com/cyloncore/brisk |
max_upload_size | |
id | 1487359 |
size | 12,884 |
brisk-cartography
provides integration with the cartography.
The following creates a map with a single layer loaded with geojson
:
brisk_cartography::brisk_it! {
Map
{
GeoJsonLayer
{
name: "Continents",
source: include_str!("../data/continents.json").as_bytes(),
}
}
}
The following defines a style to show the continents with a black outline, and a white background:
brisk_cartography::brisk_it! {
Style
{
background_color: cartography::Rgba::OSM_BLUE,
Rule {
geo_type: cartography::GeometryType::Polygon,
symbol: Symbol {
stroke_width: 1.0,
stroke_color: cartography::Rgba::BLACK.into(),
fill_color: cartography::Rgba::OSM_WHITE.into(),
},
}
}
}
The full example is available in the cartography example.