only zoom to active layers

This commit is contained in:
Dane Springmeyer 2010-11-08 18:57:30 +00:00
parent 389ad44878
commit 4f9dce9a0c

View file

@ -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);
@ -384,6 +386,7 @@ void Map::zoom_all()
{
ext.expand_to_include(layerExt2);
}
}
++itr;
}
zoom_to_box(ext);