diff --git a/include/mapnik/markers_symbolizer.hpp b/include/mapnik/markers_symbolizer.hpp index 7dde57ddb..e8ba4cd0e 100644 --- a/include/mapnik/markers_symbolizer.hpp +++ b/include/mapnik/markers_symbolizer.hpp @@ -49,9 +49,14 @@ struct MAPNIK_DECL markers_symbolizer : public symbolizer_with_image, public symbolizer_base { public: - explicit markers_symbolizer(); + markers_symbolizer(); markers_symbolizer(path_expression_ptr const& filename); markers_symbolizer(markers_symbolizer const& rhs); + + void set_width(expression_ptr const& width); + expression_ptr const& get_width() const; + void set_height(expression_ptr const& height); + expression_ptr const& get_height() const; void set_ignore_placement(bool ignore_placement); bool get_ignore_placement() const; void set_allow_overlap(bool overlap); @@ -60,10 +65,6 @@ public: double get_spacing() const; void set_max_error(double max_error); double get_max_error() const; - void set_width(expression_ptr const&width); - expression_ptr const& get_width() const; - void set_height(expression_ptr const& height); - expression_ptr const& get_height() const; void set_fill(color const& fill); boost::optional get_fill() const; void set_stroke(stroke const& stroke); @@ -71,16 +72,15 @@ public: void set_marker_placement(marker_placement_e marker_p); marker_placement_e get_marker_placement() const; private: + expression_ptr width_; + expression_ptr height_; bool ignore_placement_; bool allow_overlap_; double spacing_; double max_error_; - expression_ptr width_; - expression_ptr height_; boost::optional fill_; boost::optional stroke_; marker_placement_e marker_p_; - }; } diff --git a/src/markers_symbolizer.cpp b/src/markers_symbolizer.cpp index 25713755c..0627ea70f 100644 --- a/src/markers_symbolizer.cpp +++ b/src/markers_symbolizer.cpp @@ -39,34 +39,34 @@ IMPLEMENT_ENUM( marker_placement_e, marker_placement_strings ) markers_symbolizer::markers_symbolizer() : symbolizer_with_image(path_expression_ptr(new path_expression)), symbolizer_base(), + width_(), + height_(), ignore_placement_(false), allow_overlap_(false), spacing_(100.0), max_error_(0.2), - width_(boost::make_shared(10.0)), - height_(boost::make_shared(10.0)), marker_p_(MARKER_LINE_PLACEMENT) {} markers_symbolizer::markers_symbolizer(path_expression_ptr const& filename) : symbolizer_with_image(filename), symbolizer_base(), + width_(), + height_(), ignore_placement_(false), allow_overlap_(false), spacing_(100.0), max_error_(0.2), - width_(boost::make_shared(10.0)), - height_(boost::make_shared(10.0)), marker_p_(MARKER_LINE_PLACEMENT) {} markers_symbolizer::markers_symbolizer(markers_symbolizer const& rhs) : symbolizer_with_image(rhs), symbolizer_base(rhs), + width_(rhs.width_), + height_(rhs.height_), ignore_placement_(rhs.ignore_placement_), allow_overlap_(rhs.allow_overlap_), spacing_(rhs.spacing_), max_error_(rhs.max_error_), - width_(rhs.width_), - height_(rhs.height_), fill_(rhs.fill_), stroke_(rhs.stroke_), marker_p_(rhs.marker_p_) {}