diff options
Diffstat (limited to 'platform/qt/src/qmapboxgl.cpp')
-rw-r--r-- | platform/qt/src/qmapboxgl.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/platform/qt/src/qmapboxgl.cpp b/platform/qt/src/qmapboxgl.cpp index fb56c4d993..61a71cf24d 100644 --- a/platform/qt/src/qmapboxgl.cpp +++ b/platform/qt/src/qmapboxgl.cpp @@ -1390,7 +1390,15 @@ void QMapboxGL::addLayer(const QVariantMap ¶ms) } /*! - Removes the layer \a id. + Returns true if the layer with given \a id exists, false otherwise. +*/ +bool QMapboxGL::layerExists(const QString& id) +{ + return !!d_ptr->mapObj->getLayer(id.toStdString()); +} + +/*! + Removes the layer with given \a id. */ void QMapboxGL::removeLayer(const QString& id) { |