[core] Custom layers

This commit is contained in:
John Firebaugh
2015-12-08 14:30:42 -08:00
parent 0346cfd865
commit bde07c8f0e
17 changed files with 274 additions and 56 deletions

View File

@@ -11,6 +11,7 @@
#include <mbgl/storage/response.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/style/style_layer.hpp>
#include <mbgl/sprite/sprite_atlas.hpp>
#include <mbgl/sprite/sprite_store.hpp>
@@ -277,6 +278,10 @@ double MapContext::getTopOffsetPixelsForAnnotationIcon(const std::string& name)
return data.getAnnotationManager()->getTopOffsetPixelsForIcon(name);
}
void MapContext::addLayer(std::unique_ptr<StyleLayer> layer, mapbox::util::optional<std::string> after) {
style->addLayer(std::move(layer), after);
}
void MapContext::setSourceTileCacheSize(size_t size) {
assert(util::ThreadContext::currentlyOn(util::ThreadType::Map));
if (size != sourceCacheSize) {