19#include "moc_qgsowssourcewidget.cpp"
23#include <QNetworkRequest>
28 , mProviderKey( providerKey )
34 mSpatialExtentBox->setOutputCrs(
crs );
50 mSpatialExtentBox->setOutputCrs( destinationCrs );
51 mSpatialExtentBox->setMapCanvas(
mapCanvas() );
59 mSpatialExtentBox->setOutputCrs(
crs );
65 mSpatialExtentBox->setCurrentExtent(
extent, destinationCrs );
66 mSpatialExtentBox->setOutputExtentFromCurrent();
67 mSpatialExtentBox->setMapCanvas(
mapCanvas() );
72 return mSpatialExtentBox->outputExtent();
78 bool inverted = mSourceParts.value( QStringLiteral(
"InvertAxisOrientation" ) ).toBool();
80 QString bbox = mSourceParts.value( QStringLiteral(
"bbox" ) ).toString();
82 if ( !bbox.isEmpty() )
84 QStringList coords = bbox.split(
',' );
86 coords.takeAt( 1 ).toDouble(),
87 coords.takeAt( 0 ).toDouble(),
88 coords.takeAt( 2 ).toDouble(),
89 coords.takeAt( 3 ).toDouble() ) :
91 coords.takeAt( 0 ).toDouble(),
92 coords.takeAt( 1 ).toDouble(),
93 coords.takeAt( 2 ).toDouble(),
94 coords.takeAt( 3 ).toDouble() );
107 QVariantMap parts = mSourceParts;
111 if ( mSpatialExtentBox->isChecked() && !spatialExtent.
isNull() )
113 bool inverted = parts.value( QStringLiteral(
"InvertAxisOrientation" ) ).toBool();
115 QString bbox = QString( inverted ?
"%2,%1,%4,%3" :
"%1,%2,%3,%4" )
121 parts.insert( QStringLiteral(
"bbox" ), bbox );
This class represents a coordinate reference system (CRS).
Map canvas is a class for displaying all GIS data types on a canvas.
const QgsMapSettings & mapSettings() const
Gets access to properties used for map rendering.
QgsCoordinateReferenceSystem destinationCrs() const
Returns the destination coordinate reference system for the map render.
QVariantMap decodeUri(const QString &providerKey, const QString &uri)
Breaks a provider data source URI into its component paths (e.g.
static QgsProviderRegistry * instance(const QString &pluginPath=QString())
Means of accessing canonical single instance.
QString encodeUri(const QString &providerKey, const QVariantMap &parts)
Reassembles a provider data source URI from its component paths (e.g.
A rectangle specified with double values.
QString qgsDoubleToString(double a, int precision=17)
Returns a string representation of a double.
const QgsCoordinateReferenceSystem & crs