BuildingSymbolizer: parse newly supported properties

+ wall-fill=color
+ base-stroke=color
+ stroke=color
+ stroke-opacity=double
+ stroke-width=double
This commit is contained in:
Mickey Rose 2018-08-06 11:36:26 +02:00
parent c836e80107
commit 8e7a93bc32
3 changed files with 10 additions and 4 deletions

View file

@ -93,6 +93,8 @@ enum class keys : std::uint8_t
avoid_edges,
ff_settings,
extend,
wall_fill,
base_stroke,
MAX_SYMBOLIZER_KEY
};

View file

@ -1394,11 +1394,14 @@ void map_parser::parse_building_symbolizer(rule & rule, xml_node const & node)
{
building_symbolizer building_sym;
parse_symbolizer_base(building_sym, node);
set_symbolizer_property<building_symbolizer,double>(building_sym, keys::height, node);
set_symbolizer_property<building_symbolizer,color>(building_sym, keys::fill, node);
set_symbolizer_property<building_symbolizer,double>(building_sym, keys::fill_opacity, node);
// TODO
optional<expression_ptr> height = node.get_opt_attr<expression_ptr>("height");
if (height) put(building_sym, keys::height, *height);
set_symbolizer_property<building_symbolizer,color>(building_sym, keys::stroke, node);
set_symbolizer_property<building_symbolizer,double>(building_sym, keys::stroke_opacity, node);
set_symbolizer_property<building_symbolizer,double>(building_sym, keys::stroke_width, node);
set_symbolizer_property<building_symbolizer,color>(building_sym, keys::wall_fill, node);
set_symbolizer_property<building_symbolizer,color>(building_sym, keys::base_stroke, node);
rule.append(std::move(building_sym));
}
catch (config_error const& ex)

View file

@ -159,7 +159,8 @@ static const property_meta_type key_meta[const_max_key] =
property_meta_type{ "avoid-edges",nullptr, property_types::target_bool },
property_meta_type{ "font-feature-settings", nullptr, property_types::target_font_feature_settings },
property_meta_type{ "extend", nullptr, property_types::target_double},
property_meta_type{ "wall-fill", nullptr, property_types::target_color },
property_meta_type{ "base-stroke", nullptr, property_types::target_color },
};
property_meta_type const& get_meta(mapnik::keys key)