31 if (
string.compare( QLatin1String(
"vector" ), Qt::CaseInsensitive ) == 0 )
33 else if (
string.compare( QLatin1String(
"raster" ), Qt::CaseInsensitive ) == 0 )
35 else if (
string.compare( QLatin1String(
"mesh" ), Qt::CaseInsensitive ) == 0 )
37 else if (
string.compare( QLatin1String(
"vector-tile" ), Qt::CaseInsensitive ) == 0 )
39 else if (
string.compare( QLatin1String(
"point-cloud" ), Qt::CaseInsensitive ) == 0 )
41 else if (
string.compare( QLatin1String(
"plugin" ), Qt::CaseInsensitive ) == 0 )
43 else if (
string.compare( QLatin1String(
"annotation" ), Qt::CaseInsensitive ) == 0 )
45 else if (
string.compare( QLatin1String(
"group" ), Qt::CaseInsensitive ) == 0 )
47 else if (
string.compare( QLatin1String(
"tiled-scene" ), Qt::CaseInsensitive ) == 0 )
59 return QStringLiteral(
"vector" );
61 return QStringLiteral(
"raster" );
63 return QStringLiteral(
"plugin" );
65 return QStringLiteral(
"mesh" );
67 return QStringLiteral(
"vector-tile" );
69 return QStringLiteral(
"annotation" );
71 return QStringLiteral(
"point-cloud" );
73 return QStringLiteral(
"group" );
75 return QStringLiteral(
"tiled-scene" );
106 return new QgsMeshLayer( uri, name, provider, meshOptions );
LayerType
Types of layers that can be added to a map.
@ Group
Composite group layer. Added in QGIS 3.24.
@ Plugin
Plugin based layer.
@ TiledScene
Tiled scene layer. Added in QGIS 3.34.
@ Annotation
Contains freeform, georeferenced annotations. Added in QGIS 3.16.
@ VectorTile
Vector tile layer. Added in QGIS 3.14.
@ Mesh
Mesh layer. Added in QGIS 3.2.
@ PointCloud
Point cloud layer. Added in QGIS 3.18.
Represents a map layer containing a set of georeferenced annotations, e.g.
A map layer which consists of a set of child layers, where all component layers are rendered as a sin...
static QString typeToString(Qgis::LayerType type)
Converts a map layer type to a string value.
static Qgis::LayerType typeFromString(const QString &string, bool &ok)
Returns the map layer type corresponding a string value.
static QgsMapLayer * createLayer(const QString &uri, const QString &name, Qgis::LayerType type, const LayerOptions &options, const QString &provider=QString())
Creates a map layer, given a uri, name, layer type and provider name.
Base class for all map layer types.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Represents a map layer supporting display of point clouds.
Represents a raster layer.
Represents a map layer supporting display of tiled scene objects.
Represents a vector layer which manages a vector based data sets.
Implements a map layer that is dedicated to rendering of vector tiles.
Setting options for loading annotation layers.
Setting options for loading group layers.
Setting options for loading layers.
QgsCoordinateTransformContext transformContext
Transform context.
bool loadAllStoredStyles
Controls whether the stored styles will be all loaded.
bool loadDefaultStyle
Set to true if the default layer style should be loaded.
Setting options for loading mesh layers.
QgsCoordinateTransformContext transformContext
Coordinate transform context.
bool loadDefaultStyle
Set to true if the default layer style should be loaded.
Setting options for loading point cloud layers.
bool loadDefaultStyle
Set to true if the default layer style should be loaded.
QgsCoordinateTransformContext transformContext
Coordinate transform context.
Setting options for loading raster layers.
bool loadDefaultStyle
Sets to true if the default layer style should be loaded.
QgsCoordinateTransformContext transformContext
Coordinate transform context.
Setting options for loading tiled scene layers.
bool loadDefaultStyle
Set to true if the default layer style should be loaded.
QgsCoordinateTransformContext transformContext
Coordinate transform context.
Setting options for loading vector layers.
bool loadDefaultStyle
Set to true if the default layer style should be loaded.
QgsCoordinateTransformContext transformContext
Coordinate transform context.
bool loadAllStoredStyles
Controls whether the stored styles will be all loaded.
Setting options for loading vector tile layers.