From ad03e42b2890fd430e99e543a40be42f09f47fba Mon Sep 17 00:00:00 2001 From: Mikhail Pozdnyakov Date: Wed, 28 Nov 2018 16:03:09 +0200 Subject: [core] LayerManager can disable annotations At the moment, the annotations implementation in the `mapbox-gl-native` core is creating concrete layer instances apart from `LayerManager/LayerFactory` code path. So, annotations must be disabled if the `LayerManager` implementation does not provide line, fill or symbol layers (those, used by the annotations). Note: in future, annotations implementation will be moved from the core to the platform SDK level(see https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation) and `LayerManager` won't need to disable it. --- platform/android/src/style/layers/layer_manager.cpp | 2 ++ platform/darwin/src/MGLStyleLayerManager.mm | 2 ++ platform/default/layer_manager.cpp | 2 ++ 3 files changed, 6 insertions(+) (limited to 'platform') diff --git a/platform/android/src/style/layers/layer_manager.cpp b/platform/android/src/style/layers/layer_manager.cpp index 9f13fa0640..706c5a76a1 100644 --- a/platform/android/src/style/layers/layer_manager.cpp +++ b/platform/android/src/style/layers/layer_manager.cpp @@ -100,4 +100,6 @@ LayerManager* LayerManager::get() noexcept { return android::LayerManagerAndroid::get(); } +const bool LayerManager::annotationsEnabled = true; + } // namespace mbgl diff --git a/platform/darwin/src/MGLStyleLayerManager.mm b/platform/darwin/src/MGLStyleLayerManager.mm index 90272851c3..bdcc303de5 100644 --- a/platform/darwin/src/MGLStyleLayerManager.mm +++ b/platform/darwin/src/MGLStyleLayerManager.mm @@ -78,4 +78,6 @@ LayerManager* LayerManager::get() noexcept { return LayerManagerDarwin::get(); } +const bool LayerManager::annotationsEnabled = true; + } // namespace mbgl diff --git a/platform/default/layer_manager.cpp b/platform/default/layer_manager.cpp index 60cd0855b8..32d5cbc0fc 100644 --- a/platform/default/layer_manager.cpp +++ b/platform/default/layer_manager.cpp @@ -73,4 +73,6 @@ LayerManager* LayerManager::get() noexcept { return &instance; } +const bool LayerManager::annotationsEnabled = true; + } // namespace mbgl -- cgit v1.2.1