summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-11-28 16:03:09 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-11-28 17:18:38 +0200
commitad03e42b2890fd430e99e543a40be42f09f47fba (patch)
tree0644ddaab4f30ac1dc2c59507125cad832b366b2 /platform
parenta0b8f01c1baf640f34c0f46ba22efd399b7a0012 (diff)
downloadqtlocation-mapboxgl-ad03e42b2890fd430e99e543a40be42f09f47fba.tar.gz
[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.
Diffstat (limited to 'platform')
-rw-r--r--platform/android/src/style/layers/layer_manager.cpp2
-rw-r--r--platform/darwin/src/MGLStyleLayerManager.mm2
-rw-r--r--platform/default/layer_manager.cpp2
3 files changed, 6 insertions, 0 deletions
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