Skip to content

Commit e4c7b2e

Browse files
committed
chore: Remove log noise due to antialias property in ML layers
1 parent 95cbde6 commit e4c7b2e

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

galileo-maplibre/src/layer/vector_tile.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,13 @@ fn fill_rule(fill: &FillLayer, tile_schema: &TileSchema) -> Option<StyleRule> {
235235
let fill_opacity = &fill.paint.fill_opacity;
236236
let color = get_color_value(fill_color, fill_opacity)?;
237237

238-
log_unsupported_field!(fill.paint.fill_antialias);
238+
if fill.paint.fill_antialias == false {
239+
log::debug!(
240+
"{} not-antialised polygons are not supported yet",
241+
crate::layer::UNSUPPORTED,
242+
);
243+
}
244+
239245
log_unsupported_field!(fill.paint.fill_outline_color);
240246
log_unsupported_field!(fill.paint.fill_pattern);
241247
log_unsupported_field!(fill.paint.fill_translate);

galileo-maplibre/src/style/layer/fill.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ use crate::style::color::MlColor;
88
use crate::style::expression::MlExpr;
99
use crate::style::value::MlStyleValue;
1010
use crate::style::{
11-
default_one, default_transparent, deser_default_one, deser_default_transparent,
11+
default_one, default_transparent, default_true, deser_default_one, deser_default_transparent,
1212
deserialize_opt_f64,
1313
};
1414

1515
/// Paint properties for a `fill` layer.
1616
#[derive(Debug, Clone, PartialEq, Deserialize)]
1717
pub struct FillPaint {
1818
/// Whether or not the fill should be antialiased. Supports expressions.
19-
#[serde(rename = "fill-antialias", skip_serializing_if = "Option::is_none")]
20-
pub fill_antialias: Option<Value>,
19+
#[serde(rename = "fill-antialias", default = "default_true")]
20+
pub fill_antialias: bool,
2121

2222
/// Fill colour.
2323
#[serde(

galileo-maplibre/src/style/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,10 @@ fn default_one() -> MlStyleValue<f64> {
266266
MlStyleValue::Literal(1.0)
267267
}
268268

269+
fn default_true() -> bool {
270+
true
271+
}
272+
269273
fn deser_default_one<'de, D>(deserializer: D) -> Result<MlStyleValue<f64>, D::Error>
270274
where
271275
D: serde::Deserializer<'de>,

0 commit comments

Comments
 (0)