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 itr = layers_.begin();
|
||||||
std::vector<layer>::const_iterator end = layers_.end();
|
std::vector<layer>::const_iterator end = layers_.end();
|
||||||
while (itr != end)
|
while (itr != end)
|
||||||
|
{
|
||||||
|
if (itr->isActive())
|
||||||
{
|
{
|
||||||
std::string const& layer_srs = itr->srs();
|
std::string const& layer_srs = itr->srs();
|
||||||
projection proj1(layer_srs);
|
projection proj1(layer_srs);
|
||||||
|
@ -384,6 +386,7 @@ void Map::zoom_all()
|
||||||
{
|
{
|
||||||
ext.expand_to_include(layerExt2);
|
ext.expand_to_include(layerExt2);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
++itr;
|
++itr;
|
||||||
}
|
}
|
||||||
zoom_to_box(ext);
|
zoom_to_box(ext);
|
||||||
|
|
Loading…
Add table
Reference in a new issue