in remove_all clear all styles as well!

This commit is contained in:
Artem Pavlenko 2006-10-09 10:29:57 +00:00
parent 514f500bfb
commit 9cc2237290

View file

@ -105,6 +105,7 @@ namespace mapnik
void Map::remove_all()
{
layers_.clear();
styles_.clear();
}
const Layer& Map::getLayer(size_t index) const
@ -181,8 +182,10 @@ namespace mapnik
coord2d center = currentExtent_.center();
double w = factor * currentExtent_.width();
double h = factor * currentExtent_.height();
currentExtent_ = Envelope<double>(center.x - 0.5 * w, center.y - 0.5 * h,
center.x + 0.5 * w, center.y + 0.5 * h);
currentExtent_ = Envelope<double>(center.x - 0.5 * w,
center.y - 0.5 * h,
center.x + 0.5 * w,
center.y + 0.5 * h);
fixAspectRatio();
}