diff --git a/include/mapnik/feature_style_processor.hpp b/include/mapnik/feature_style_processor.hpp index cabb515e8..d6d862764 100644 --- a/include/mapnik/feature_style_processor.hpp +++ b/include/mapnik/feature_style_processor.hpp @@ -144,7 +144,7 @@ namespace mapnik Envelope bbox(mx0,my0,mx1,my1); double resolution = m_.getWidth()/bbox.width(); - query q(bbox,resolution); //BBOX query + query q(bbox,resolution,scale_denom); //BBOX query std::vector const& style_names = lay.styles(); std::vector::const_iterator stylesIter = style_names.begin(); diff --git a/include/mapnik/query.hpp b/include/mapnik/query.hpp index e63ec14ac..bc72f7748 100644 --- a/include/mapnik/query.hpp +++ b/include/mapnik/query.hpp @@ -38,18 +38,26 @@ namespace mapnik { private: Envelope bbox_; double resolution_; + double scale_denominator_; std::set names_; public: + explicit query(const Envelope& bbox, double resolution, double scale_denominator) + : bbox_(bbox), + resolution_(resolution), + scale_denominator_(scale_denominator) + {} + explicit query(const Envelope& bbox, double resolution) : bbox_(bbox), - resolution_(resolution) - {} - + resolution_(resolution), + scale_denominator_(0.0) + {} query(const query& other) : bbox_(other.bbox_), resolution_(other.resolution_), + scale_denominator_(other.scale_denominator_), names_(other.names_) {} @@ -58,6 +66,7 @@ namespace mapnik { if (this == &other) return *this; bbox_=other.bbox_; resolution_=other.resolution_; + scale_denominator_=other.scale_denominator_; names_=other.names_; return *this; } @@ -66,6 +75,11 @@ namespace mapnik { { return resolution_; } + + double scale_denominator() const + { + return scale_denominator_; + } const Envelope& get_bbox() const {