30 if (
string.compare( QLatin1String(
"vector" ), Qt::CaseInsensitive ) == 0 )
32 else if (
string.compare( QLatin1String(
"raster" ), Qt::CaseInsensitive ) == 0 )
34 else if (
string.compare( QLatin1String(
"mesh" ), Qt::CaseInsensitive ) == 0 )
36 else if (
string.compare( QLatin1String(
"vector-tile" ), Qt::CaseInsensitive ) == 0 )
38 else if (
string.compare( QLatin1String(
"point-cloud" ), Qt::CaseInsensitive ) == 0 )
40 else if (
string.compare( QLatin1String(
"plugin" ), Qt::CaseInsensitive ) == 0 )
42 else if (
string.compare( QLatin1String(
"annotation" ), Qt::CaseInsensitive ) == 0 )
44 else if (
string.compare( QLatin1String(
"group" ), Qt::CaseInsensitive ) == 0 )
56 return QStringLiteral(
"vector" );
58 return QStringLiteral(
"raster" );
60 return QStringLiteral(
"plugin" );
62 return QStringLiteral(
"mesh" );
64 return QStringLiteral(
"vector-tile" );
66 return QStringLiteral(
"annotation" );
68 return QStringLiteral(
"point-cloud" );
70 return QStringLiteral(
"group" );
100 return new QgsMeshLayer( uri, name, provider, meshOptions );
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 QgsMapLayerType typeFromString(const QString &string, bool &ok)
Returns the map layer type corresponding a string value.
static QString typeToString(QgsMapLayerType type)
Converts a map layer type to a string value.
static QgsMapLayer * createLayer(const QString &uri, const QString &name, QgsMapLayerType 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 vector layer which manages a vector based data sets.
Implements a map layer that is dedicated to rendering of vector tiles.
QgsMapLayerType
Types of layers that can be added to a map.
@ PointCloudLayer
Point cloud layer. Added in QGIS 3.18.
@ MeshLayer
Mesh layer. Added in QGIS 3.2.
@ VectorLayer
Vector layer.
@ RasterLayer
Raster layer.
@ GroupLayer
Composite group layer. Added in QGIS 3.24.
@ VectorTileLayer
Vector tile layer. Added in QGIS 3.14.
@ AnnotationLayer
Contains freeform, georeferenced annotations. Added in QGIS 3.16.
@ PluginLayer
Plugin based layer.
Setting options for loading annotation layers.
Setting options for loading group layers.
Setting options for loading layers.
QgsCoordinateTransformContext transformContext
Transform context.
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 vector layers.
bool loadDefaultStyle
Set to true if the default layer style should be loaded.
QgsCoordinateTransformContext transformContext
Coordinate transform context.
Setting options for loading vector tile layers.