mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
Merge branch 'master' into custom-variant-2
This commit is contained in:
commit
1d02eb0d1d
@ -261,7 +261,13 @@ void ogr_datasource::init(mapnik::parameters const& params)
|
||||
else
|
||||
{
|
||||
OGREnvelope envelope;
|
||||
layer->GetExtent(&envelope);
|
||||
OGRErr e = layer->GetExtent(&envelope);
|
||||
if (e == OGRERR_FAILURE)
|
||||
{
|
||||
std::ostringstream s;
|
||||
s << "OGR Plugin: Extent missing for layer '" << layer->GetName() << "'. Use <extent> paramater to define a custom extent value.";
|
||||
throw datasource_exception(s.str());
|
||||
}
|
||||
extent_.init(envelope.MinX, envelope.MinY, envelope.MaxX, envelope.MaxY);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user