We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 4aec105 commit e2094d8Copy full SHA for e2094d8
tests/src/3d/sandbox/qgis_3d_sandbox.cpp
@@ -42,6 +42,13 @@ void initCanvas3D( Qgs3DMapCanvas *canvas )
42
QgsLayerTree *root = QgsProject::instance()->layerTreeRoot();
43
const QList< QgsMapLayer * > visibleLayers = root->checkedLayers();
44
45
+ QgsCoordinateReferenceSystem crs = QgsProject::instance()->crs();
46
+ if ( crs.isGeographic() )
47
+ {
48
+ // we can't deal with non-projected CRS, so let's just pick something
49
+ QgsProject::instance()->setCrs( QgsCoordinateReferenceSystem( QStringLiteral( "EPSG:3857" ) ) );
50
+ }
51
+
52
QgsMapSettings ms;
53
ms.setDestinationCrs( QgsProject::instance()->crs() );
54
ms.setLayers( visibleLayers );
0 commit comments