22#include <QNetworkRequest>
27 , mProviderKey( providerKey )
33 mSpatialExtentBox->setOutputCrs(
crs );
49 mSpatialExtentBox->setOutputCrs( destinationCrs );
50 mSpatialExtentBox->setMapCanvas(
mapCanvas() );
58 mSpatialExtentBox->setOutputCrs(
crs );
64 mSpatialExtentBox->setCurrentExtent(
extent, destinationCrs );
65 mSpatialExtentBox->setOutputExtentFromCurrent();
66 mSpatialExtentBox->setMapCanvas(
mapCanvas() );
71 return mSpatialExtentBox->outputExtent();
77 bool inverted = mSourceParts.value( QStringLiteral(
"InvertAxisOrientation" ) ).toBool();
79 QString bbox = mSourceParts.value( QStringLiteral(
"bbox" ) ).toString();
81 if ( !bbox.isEmpty() )
83 QStringList coords = bbox.split(
',' );
85 coords.takeAt( 1 ).toDouble(),
86 coords.takeAt( 0 ).toDouble(),
87 coords.takeAt( 2 ).toDouble(),
88 coords.takeAt( 3 ).toDouble() ) :
90 coords.takeAt( 0 ).toDouble(),
91 coords.takeAt( 1 ).toDouble(),
92 coords.takeAt( 2 ).toDouble(),
93 coords.takeAt( 3 ).toDouble() );
106 QVariantMap parts = mSourceParts;
110 if ( mSpatialExtentBox->isChecked() && !spatialExtent.
isNull() )
112 bool inverted = parts.value( QStringLiteral(
"InvertAxisOrientation" ) ).toBool();
114 QString bbox = QString( inverted ?
"%2,%1,%4,%3" :
"%1,%2,%3,%4" )
120 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.
double yMaximum() const SIP_HOLDGIL
Returns the y maximum value (top side of rectangle).
double xMaximum() const SIP_HOLDGIL
Returns the x maximum value (right side of rectangle).
double xMinimum() const SIP_HOLDGIL
Returns the x minimum value (left side of rectangle).
double yMinimum() const SIP_HOLDGIL
Returns the y minimum value (bottom side of rectangle).
bool isNull() const
Test if the rectangle is null (all coordinates zero or after call to setMinimal()).
QString qgsDoubleToString(double a, int precision=17)
Returns a string representation of a double.
const QgsCoordinateReferenceSystem & crs