[core] Introduce Map::getLayer
This commit is contained in:
@@ -149,6 +149,7 @@ public:
|
||||
|
||||
AnnotationIDs getPointAnnotationsInBounds(const LatLngBounds&);
|
||||
|
||||
style::Layer* getLayer(const std::string& layerID);
|
||||
void addLayer(std::unique_ptr<style::Layer>, const optional<std::string>& beforeLayerID = {});
|
||||
void removeLayer(const std::string& layerID);
|
||||
|
||||
|
||||
@@ -736,6 +736,10 @@ std::vector<Feature> Map::queryRenderedFeatures(const ScreenBox& box, const opti
|
||||
|
||||
#pragma mark - Style API
|
||||
|
||||
style::Layer* Map::getLayer(const std::string& layerID) {
|
||||
return impl->style ? impl->style->getLayer(layerID) : nullptr;
|
||||
}
|
||||
|
||||
void Map::addLayer(std::unique_ptr<Layer> layer, const optional<std::string>& before) {
|
||||
impl->view.activate();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user