summaryrefslogtreecommitdiff
path: root/src/mbgl/map/map_context.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-12-17 14:39:19 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-12-17 15:15:55 -0800
commit110f1ec796ab46e4f16bcf9673f0aa89ae153aeb (patch)
treebee9af94074a24ec4b3ae757047747b5da1625bf /src/mbgl/map/map_context.cpp
parentd3c92a8b5cf9a5ac89320c66cf58ff9f84ab28ee (diff)
downloadqtlocation-mapboxgl-110f1ec796ab46e4f16bcf9673f0aa89ae153aeb.tar.gz
[ios, android] Add methods to remove a custom layer
Diffstat (limited to 'src/mbgl/map/map_context.cpp')
-rw-r--r--src/mbgl/map/map_context.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp
index 96f4a68d9b..75ca188fbb 100644
--- a/src/mbgl/map/map_context.cpp
+++ b/src/mbgl/map/map_context.cpp
@@ -289,6 +289,12 @@ void MapContext::addLayer(std::unique_ptr<StyleLayer> layer, mapbox::util::optio
asyncUpdate.send();
}
+void MapContext::removeLayer(const std::string& id) {
+ style->removeLayer(id);
+ updateFlags |= Update::Classes;
+ asyncUpdate.send();
+}
+
void MapContext::setSourceTileCacheSize(size_t size) {
assert(util::ThreadContext::currentlyOn(util::ThreadType::Map));
if (size != sourceCacheSize) {