+ print bbox in Lat/Lon wgs84 to stdout
This commit is contained in:
parent
6cc6eac442
commit
68a620576f
1 changed files with 25 additions and 15 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue