From 5d13869da1ae8ebd767a967ff40b22cde6cd00f7 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 15 Oct 2010 00:14:18 +0000 Subject: [PATCH] if only width or height are supplied for a marker, make a circle - ellipses can be drawn by different width/height values --- src/load_map.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/load_map.cpp b/src/load_map.cpp index dcf47866f..753638cb2 100644 --- a/src/load_map.cpp +++ b/src/load_map.cpp @@ -914,9 +914,23 @@ void map_parser::parse_markers_symbolizer( rule_type & rule, ptree const & sym ) if (allow_overlap) symbol.set_allow_overlap(*allow_overlap); optional w = get_opt_attr(sym, "width"); - if (w) symbol.set_width(*w); optional h = get_opt_attr(sym, "height"); - if (h) symbol.set_height(*h); + if (w && h) + { + symbol.set_width(*w); + symbol.set_height(*h); + } + else if (w) + { + symbol.set_width(*w); + symbol.set_height(*w); + + } + else if (h) + { + symbol.set_width(*h); + symbol.set_height(*h); + } stroke strk; parse_stroke(strk,sym);