Add run-time plug-in layer support to iOS (#3430)

This commit is contained in:
AtlasProgramming
2025-06-26 00:27:32 -04:00
committed by GitHub
parent 779b893468
commit 5171f6b966
45 changed files with 4259 additions and 13 deletions

View File

@@ -67,6 +67,15 @@ public:
*/
static const bool annotationsEnabled;
/**
* Enables a layer type for JSON style only.
*
* We might not want to expose runtime API for some layer types
* in order to save binary size (the corresponding SDK layer wrappers
* should be excluded from the project build).
*/
virtual void addLayerTypeCoreOnly(std::unique_ptr<mbgl::LayerFactory>);
protected:
virtual ~LayerManager() = default;
virtual LayerFactory* getFactory(const std::string& type) noexcept = 0;

View File

@@ -90,6 +90,10 @@ struct LayerTypeInfo {
} tileKind;
};
// Added this to support plugins and that their LayerTypeInfo isn't the same point
// across the board
bool layerTypeInfoEquals(const mbgl::style::LayerTypeInfo* one, const mbgl::style::LayerTypeInfo* other);
/**
* The runtime representation of a [layer](https://maplibre.org/maplibre-style-spec/#layers)
* from the MapLibre Style Spec.