formatting
This commit is contained in:
parent
e9d1ea8032
commit
106ecb2b9c
2 changed files with 18 additions and 7 deletions
|
@ -254,16 +254,27 @@ void ogr_datasource::init(mapnik::parameters const& params)
|
|||
OGRLayer* layer = layer_.layer();
|
||||
|
||||
// initialize envelope
|
||||
|
||||
boost::optional<std::string> ext = params.get<std::string>("extent");
|
||||
|
||||
|
||||
if (ext && !ext->empty())
|
||||
|
||||
|
||||
{
|
||||
extent_.from_string(*ext);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
|
||||
|
||||
{
|
||||
OGREnvelope envelope;
|
||||
layer->GetExtent(&envelope);
|
||||
extent_.init(envelope.MinX, envelope.MinY, envelope.MaxX, envelope.MaxY);
|
||||
|
||||
|
||||
}
|
||||
|
||||
// scan for index file
|
||||
|
|
Loading…
Reference in a new issue