diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-02-02 17:26:02 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-02-08 17:06:58 +0200 |
commit | 45b4c64a5e6429e984e375d30d2d3804df81d004 (patch) | |
tree | 11813bec8736f5b98a8d17b2a3d41be78b030060 /platform/qt/src | |
parent | 9810dbd7a2959ac114ede3b3c0d452b862f69544 (diff) | |
download | qtlocation-mapboxgl-45b4c64a5e6429e984e375d30d2d3804df81d004.tar.gz |
[Qt] Added QMapboxGL::layerExists
Diffstat (limited to 'platform/qt/src')
-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 bdc99994b5..bc5cd1daae 100644 --- a/platform/qt/src/qmapboxgl.cpp +++ b/platform/qt/src/qmapboxgl.cpp @@ -1392,7 +1392,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) { |