diff --git a/include/mapnik/marker_helpers.hpp b/include/mapnik/marker_helpers.hpp index ab0c8551c..76ce9992f 100644 --- a/include/mapnik/marker_helpers.hpp +++ b/include/mapnik/marker_helpers.hpp @@ -311,10 +311,21 @@ private: template void build_ellipse(T const& sym, mapnik::feature_impl & feature, attributes const& vars, svg_storage_type & marker_ellipse, svg::svg_path_adapter & svg_path) { - double width = get(sym, keys::width, feature, vars, 0.0); - double height = get(sym, keys::width, feature, vars, 0.0); - if (width > 0 && !height) height = width; - if (height > 0 && !width) width = height; + double width = 0.0; + double height = 0.0; + if (has_key(sym,keys::width) && has_key(sym,keys::height)) + { + width = get(sym, keys::width, feature, vars, 0.0); + height = get(sym, keys::height, feature, vars, 0.0); + } + else if (has_key(sym,keys::width)) + { + width = height = get(sym, keys::width, feature, vars, 0.0); + } + else if (has_key(sym,keys::height)) + { + width = height = get(sym, keys::height, feature, vars, 0.0); + } svg::svg_converter_type styled_svg(svg_path, marker_ellipse.attributes()); styled_svg.push_attr(); styled_svg.begin_path();