[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.
This commit is contained in:
Mikhail Pozdnyakov
2018-11-28 16:03:09 +02:00
parent a0b8f01c1b
commit ad03e42b28
9 changed files with 93 additions and 18 deletions

View File

@@ -73,4 +73,6 @@ LayerManager* LayerManager::get() noexcept {
return &instance;
}
const bool LayerManager::annotationsEnabled = true;
} // namespace mbgl