summaryrefslogtreecommitdiff
path: root/platform/qt/src
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-02-02 17:26:02 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-02-08 17:06:58 +0200
commit45b4c64a5e6429e984e375d30d2d3804df81d004 (patch)
tree11813bec8736f5b98a8d17b2a3d41be78b030060 /platform/qt/src
parent9810dbd7a2959ac114ede3b3c0d452b862f69544 (diff)
downloadqtlocation-mapboxgl-45b4c64a5e6429e984e375d30d2d3804df81d004.tar.gz
[Qt] Added QMapboxGL::layerExists
Diffstat (limited to 'platform/qt/src')
-rw-r--r--platform/qt/src/qmapboxgl.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/platform/qt/src/qmapboxgl.cpp b/platform/qt/src/qmapboxgl.cpp
index bdc99994b5..bc5cd1daae 100644
--- a/platform/qt/src/qmapboxgl.cpp
+++ b/platform/qt/src/qmapboxgl.cpp
@@ -1392,7 +1392,15 @@ void QMapboxGL::addLayer(const QVariantMap &params)
}
/*!
- 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)
{