only zoom to active layers
This commit is contained in:
parent
389ad44878
commit
4f9dce9a0c
1 changed files with 29 additions and 26 deletions
|
@ -355,6 +355,8 @@ void Map::zoom_all()
|
|||
std::vector<layer>::const_iterator itr = layers_.begin();
|
||||
std::vector<layer>::const_iterator end = layers_.end();
|
||||
while (itr != end)
|
||||
{
|
||||
if (itr->isActive())
|
||||
{
|
||||
std::string const& layer_srs = itr->srs();
|
||||
projection proj1(layer_srs);
|
||||
|
@ -371,10 +373,10 @@ void Map::zoom_all()
|
|||
prj_trans.backward(x1,y1,z1);
|
||||
|
||||
box2d<double> layerExt2(x0,y0,x1,y1);
|
||||
#ifdef MAPNIK_DEBUG
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::clog << " layer1 - > " << layerExt << "\n";
|
||||
std::clog << " layer2 - > " << layerExt2 << "\n";
|
||||
#endif
|
||||
#endif
|
||||
if (first)
|
||||
{
|
||||
ext = layerExt2;
|
||||
|
@ -384,6 +386,7 @@ void Map::zoom_all()
|
|||
{
|
||||
ext.expand_to_include(layerExt2);
|
||||
}
|
||||
}
|
||||
++itr;
|
||||
}
|
||||
zoom_to_box(ext);
|
||||
|
|
Loading…
Add table
Reference in a new issue