From 658a8bb080afb1d165bd30154a9fb80e90f3fcd6 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Tue, 21 May 2024 09:15:50 +0100 Subject: [PATCH] symbolizer_property_value_string - handle `value_bool`, `value_integer`, `value_double` + `dash_array` --- include/mapnik/symbolizer_utils.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/mapnik/symbolizer_utils.hpp b/include/mapnik/symbolizer_utils.hpp index 5c4a96d44..e5101c2f5 100644 --- a/include/mapnik/symbolizer_utils.hpp +++ b/include/mapnik/symbolizer_utils.hpp @@ -24,6 +24,7 @@ #define MAPNIK_SYMBOLIZER_UTILS_HPP // mapnik +#include #include #include #include @@ -216,12 +217,35 @@ class symbolizer_property_value_string std::string operator()(dash_array const& dash) const { std::ostringstream ss; + ss << '['; for (std::size_t i = 0; i < dash.size(); ++i) { ss << dash[i].first << "," << dash[i].second; if (i + 1 < dash.size()) ss << ','; } + ss << ']'; + return ss.str(); + } + + std::string operator()(mapnik::value_double val) const + { + std::ostringstream ss; + ss << val; + return ss.str(); + } + + std::string operator()(mapnik::value_integer val) const + { + std::ostringstream ss; + ss << val; + return ss.str(); + } + + std::string operator()(mapnik::value_bool val) const + { + std::ostringstream ss; + ss << mapnik::boolean_type(val); return ss.str(); }