+ print bbox in Lat/Lon wgs84 to stdout

This commit is contained in:
Artem Pavlenko 2010-06-03 12:34:37 +00:00
parent 6cc6eac442
commit 68a620576f

View file

@ -464,7 +464,17 @@ void MapWidget::updateMap()
update();
// emit signal to interested widgets
emit mapViewChanged();
std::cout << map_->getCurrentExtent() << "\n";
projection prj(map_->srs()); // map projection
box2d<double> ext = map_->getCurrentExtent();
double x0 = ext.minx();
double y0 = ext.miny();
double x1 = ext.maxx();
double y1 = ext.maxy();
prj.inverse(x0,y0);
prj.inverse(x1,y1);
std::cout << "BBOX (WGS84): " << x0 << "," << y0 << "," << x1 << "," << y1 << "\n";
}
catch (mapnik::config_error & ex)
{