[Qt] Added QMapboxGL::layerExists
This commit is contained in:
@@ -221,6 +221,7 @@ public:
|
||||
void* context,
|
||||
char* before = NULL);
|
||||
void addLayer(const QVariantMap ¶ms);
|
||||
bool layerExists(const QString &id);
|
||||
void removeLayer(const QString &id);
|
||||
|
||||
void setFilter(const QString &layer, const QVariant &filter);
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user