diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-12-17 14:39:19 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-12-17 15:15:55 -0800 |
commit | 110f1ec796ab46e4f16bcf9673f0aa89ae153aeb (patch) | |
tree | bee9af94074a24ec4b3ae757047747b5da1625bf /src/mbgl/map/map_context.cpp | |
parent | d3c92a8b5cf9a5ac89320c66cf58ff9f84ab28ee (diff) | |
download | qtlocation-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.cpp | 6 |
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) { |