pass the scale_denom in a mapnik::query - closes 465
This commit is contained in:
parent
f543f56524
commit
1b91db1db3
2 changed files with 18 additions and 4 deletions
|
@ -144,7 +144,7 @@ namespace mapnik
|
|||
Envelope<double> 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<std::string> const& style_names = lay.styles();
|
||||
std::vector<std::string>::const_iterator stylesIter = style_names.begin();
|
||||
|
|
|
@ -38,18 +38,26 @@ namespace mapnik {
|
|||
private:
|
||||
Envelope<double> bbox_;
|
||||
double resolution_;
|
||||
double scale_denominator_;
|
||||
std::set<std::string> names_;
|
||||
public:
|
||||
|
||||
explicit query(const Envelope<double>& bbox, double resolution, double scale_denominator)
|
||||
: bbox_(bbox),
|
||||
resolution_(resolution),
|
||||
scale_denominator_(scale_denominator)
|
||||
{}
|
||||
|
||||
explicit query(const Envelope<double>& 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<double>& get_bbox() const
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue