diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2018-11-05 19:49:40 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2018-11-07 16:34:20 +0200 |
commit | ffdeef3a26306e447f1cc52a8e14d42fb035611d (patch) | |
tree | 7e3217d761581161d39b2552072d1b3cef8df67a /include/mbgl/style/layers/custom_layer.hpp | |
parent | f560b4f9efebb4d448181724304f63b683a26b67 (diff) | |
download | qtlocation-mapboxgl-ffdeef3a26306e447f1cc52a8e14d42fb035611d.tar.gz |
Refer corresponding LayerFactory instance from the Layer::Impl
Diffstat (limited to 'include/mbgl/style/layers/custom_layer.hpp')
-rw-r--r-- | include/mbgl/style/layers/custom_layer.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/mbgl/style/layers/custom_layer.hpp b/include/mbgl/style/layers/custom_layer.hpp index 4ae59dfae3..f58e41adf5 100644 --- a/include/mbgl/style/layers/custom_layer.hpp +++ b/include/mbgl/style/layers/custom_layer.hpp @@ -85,5 +85,19 @@ public: Mutable<Layer::Impl> mutableBaseImpl() const final; }; +class CustomLayerFactory : public LayerFactory { +public: + CustomLayerFactory(); + // LayerFactory overrides. + ~CustomLayerFactory() override; + bool supportsType(const std::string& type) const final; + std::unique_ptr<style::Layer> createLayer(const std::string& id, const conversion::Convertible& value) final; + + static CustomLayerFactory* get(); + +private: + static CustomLayerFactory* instance; +}; + } // namespace style } // namespace mbgl |