[core] Custom layers
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <mbgl/map/map_data.hpp>
|
||||
#include <mbgl/annotation/point_annotation.hpp>
|
||||
#include <mbgl/annotation/shape_annotation.hpp>
|
||||
#include <mbgl/style/style_layer.hpp>
|
||||
|
||||
#include <mbgl/util/projection.hpp>
|
||||
#include <mbgl/util/thread.hpp>
|
||||
@@ -415,6 +416,16 @@ AnnotationIDs Map::getPointAnnotationsInBounds(const LatLngBounds& bounds) {
|
||||
LatLngBounds Map::getBoundsForAnnotations(const AnnotationIDs& annotations) {
|
||||
return data->getAnnotationManager()->getBoundsForAnnotations(annotations);
|
||||
}
|
||||
|
||||
#pragma mark - Style API
|
||||
|
||||
void Map::addLayer(std::unique_ptr<StyleLayer> layer) {
|
||||
context->invoke(&MapContext::addLayer, std::move(layer), mapbox::util::optional<std::string>());
|
||||
}
|
||||
|
||||
void Map::addLayer(std::unique_ptr<StyleLayer> layer, const std::string& before) {
|
||||
context->invoke(&MapContext::addLayer, std::move(layer), before);
|
||||
}
|
||||
|
||||
#pragma mark - Toggles
|
||||
|
||||
|
||||
Reference in New Issue
Block a user