fix reading of height value for building_symbolizer
This commit is contained in:
parent
9e0b15f814
commit
72399f0b23
1 changed files with 10 additions and 1 deletions
|
@ -21,6 +21,7 @@
|
|||
*****************************************************************************/
|
||||
// mapnik
|
||||
#include <mapnik/load_map.hpp>
|
||||
#include <mapnik/geometry.hpp>
|
||||
|
||||
#include <mapnik/version.hpp>
|
||||
#include <mapnik/image_reader.hpp>
|
||||
|
@ -1376,6 +1377,11 @@ void map_parser::parse_line_symbolizer( rule_type & rule, ptree const & sym )
|
|||
float opacity = get_css<float>(css, css_name);
|
||||
strk.set_opacity(opacity);
|
||||
}
|
||||
else if (css_name == "stroke-offset")
|
||||
{
|
||||
float offset = get_css<float>(css, css_name);
|
||||
strk.set_offset(offset);
|
||||
}
|
||||
else if (css_name == "stroke-linejoin")
|
||||
{
|
||||
line_join_e line_join = get_css<line_join_e>(css, css_name);
|
||||
|
@ -1447,6 +1453,9 @@ void map_parser::parse_line_symbolizer( rule_type & rule, ptree const & sym )
|
|||
// stroke-opacity
|
||||
optional<double> opacity = get_opt_attr<double>(sym, "stroke-opacity");
|
||||
if (opacity) strk.set_opacity(*opacity);
|
||||
// stroke-offset
|
||||
optional<float> offset = get_opt_attr<float>(sym, "stroke-offset");
|
||||
if (offset) strk.set_offset(*offset);
|
||||
// stroke-linejoin
|
||||
optional<line_join_e> line_join = get_opt_attr<line_join_e>(sym, "stroke-linejoin");
|
||||
if (line_join) strk.set_line_join(*line_join);
|
||||
|
@ -1632,7 +1641,7 @@ void map_parser::parse_building_symbolizer( rule_type & rule, ptree const & sym
|
|||
if (opacity) building_sym.set_opacity(*opacity);
|
||||
// height
|
||||
optional<double> height = get_opt_attr<double>(sym, "height");
|
||||
if (opacity) building_sym.set_height(*height);
|
||||
if (height) building_sym.set_height(*height);
|
||||
|
||||
rule.append(building_sym);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue