30 if (
string.compare( QLatin1String(
"vector" ), Qt::CaseInsensitive ) == 0 )
31 return Qgis::LayerType::Vector;
32 else if (
string.compare( QLatin1String(
"raster" ), Qt::CaseInsensitive ) == 0 )
33 return Qgis::LayerType::Raster;
34 else if (
string.compare( QLatin1String(
"mesh" ), Qt::CaseInsensitive ) == 0 )
35 return Qgis::LayerType::Mesh;
36 else if (
string.compare( QLatin1String(
"vector-tile" ), Qt::CaseInsensitive ) == 0 )
37 return Qgis::LayerType::VectorTile;
38 else if (
string.compare( QLatin1String(
"point-cloud" ), Qt::CaseInsensitive ) == 0 )
39 return Qgis::LayerType::PointCloud;
40 else if (
string.compare( QLatin1String(
"plugin" ), Qt::CaseInsensitive ) == 0 )
41 return Qgis::LayerType::Plugin;
42 else if (
string.compare( QLatin1String(
"annotation" ), Qt::CaseInsensitive ) == 0 )
43 return Qgis::LayerType::Annotation;
44 else if (
string.compare( QLatin1String(
"group" ), Qt::CaseInsensitive ) == 0 )
45 return Qgis::LayerType::Group;
48 return Qgis::LayerType::Vector;
55 case Qgis::LayerType::Vector:
56 return QStringLiteral(
"vector" );
57 case Qgis::LayerType::Raster:
58 return QStringLiteral(
"raster" );
59 case Qgis::LayerType::Plugin:
60 return QStringLiteral(
"plugin" );
61 case Qgis::LayerType::Mesh:
62 return QStringLiteral(
"mesh" );
63 case Qgis::LayerType::VectorTile:
64 return QStringLiteral(
"vector-tile" );
65 case Qgis::LayerType::Annotation:
66 return QStringLiteral(
"annotation" );
67 case Qgis::LayerType::PointCloud:
68 return QStringLiteral(
"point-cloud" );
69 case Qgis::LayerType::Group:
70 return QStringLiteral(
"group" );
79 case Qgis::LayerType::Vector:
88 case Qgis::LayerType::Raster:
96 case Qgis::LayerType::Mesh:
101 return new QgsMeshLayer( uri, name, provider, meshOptions );
104 case Qgis::LayerType::VectorTile:
110 case Qgis::LayerType::Annotation:
116 case Qgis::LayerType::Group:
122 case Qgis::LayerType::PointCloud:
130 case Qgis::LayerType::Plugin:
LayerType
Types of layers that can be added to a map.
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 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 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.