This patch introduces the initial implementation of - A `LayerFactory` abstract class that creates `style::Layer` instances of a certain layer type (line, hillshade, round, ..) - A singleton `LayerManager` class, which is responsible for initializing the `LayerFactory` instances and forwarding the `create()` calls to the corresponding factory.
82 lines
2.8 KiB
C++
82 lines
2.8 KiB
C++
// This file is generated. Do not edit.
|
|
|
|
#pragma once
|
|
|
|
#include <mbgl/style/color_ramp_property_value.hpp>
|
|
#include <mbgl/style/layer.hpp>
|
|
#include <mbgl/style/filter.hpp>
|
|
#include <mbgl/style/property_value.hpp>
|
|
#include <mbgl/style/expression/formatted.hpp>
|
|
|
|
#include <mbgl/util/color.hpp>
|
|
|
|
namespace mbgl {
|
|
namespace style {
|
|
|
|
class TransitionOptions;
|
|
|
|
class HeatmapLayer : public Layer {
|
|
public:
|
|
HeatmapLayer(const std::string& layerID, const std::string& sourceID);
|
|
~HeatmapLayer() final;
|
|
|
|
// Dynamic properties
|
|
optional<conversion::Error> setLayoutProperty(const std::string& name, const conversion::Convertible& value) final;
|
|
optional<conversion::Error> setPaintProperty(const std::string& name, const conversion::Convertible& value) final;
|
|
|
|
// Paint properties
|
|
|
|
static PropertyValue<float> getDefaultHeatmapRadius();
|
|
PropertyValue<float> getHeatmapRadius() const;
|
|
void setHeatmapRadius(PropertyValue<float>);
|
|
void setHeatmapRadiusTransition(const TransitionOptions&);
|
|
TransitionOptions getHeatmapRadiusTransition() const;
|
|
|
|
static PropertyValue<float> getDefaultHeatmapWeight();
|
|
PropertyValue<float> getHeatmapWeight() const;
|
|
void setHeatmapWeight(PropertyValue<float>);
|
|
void setHeatmapWeightTransition(const TransitionOptions&);
|
|
TransitionOptions getHeatmapWeightTransition() const;
|
|
|
|
static PropertyValue<float> getDefaultHeatmapIntensity();
|
|
PropertyValue<float> getHeatmapIntensity() const;
|
|
void setHeatmapIntensity(PropertyValue<float>);
|
|
void setHeatmapIntensityTransition(const TransitionOptions&);
|
|
TransitionOptions getHeatmapIntensityTransition() const;
|
|
|
|
static ColorRampPropertyValue getDefaultHeatmapColor();
|
|
ColorRampPropertyValue getHeatmapColor() const;
|
|
void setHeatmapColor(ColorRampPropertyValue);
|
|
void setHeatmapColorTransition(const TransitionOptions&);
|
|
TransitionOptions getHeatmapColorTransition() const;
|
|
|
|
static PropertyValue<float> getDefaultHeatmapOpacity();
|
|
PropertyValue<float> getHeatmapOpacity() const;
|
|
void setHeatmapOpacity(PropertyValue<float>);
|
|
void setHeatmapOpacityTransition(const TransitionOptions&);
|
|
TransitionOptions getHeatmapOpacityTransition() const;
|
|
|
|
// Private implementation
|
|
|
|
class Impl;
|
|
const Impl& impl() const;
|
|
|
|
Mutable<Impl> mutableImpl() const;
|
|
HeatmapLayer(Immutable<Impl>);
|
|
std::unique_ptr<Layer> cloneRef(const std::string& id) const final;
|
|
|
|
protected:
|
|
Mutable<Layer::Impl> mutableBaseImpl() const final;
|
|
};
|
|
|
|
class HeatmapLayerFactory : public LayerFactory {
|
|
protected:
|
|
// LayerFactory overrides.
|
|
~HeatmapLayerFactory() override;
|
|
const char* type() const final;
|
|
std::unique_ptr<style::Layer> createLayer(const std::string& id, const conversion::Convertible& value) override;
|
|
};
|
|
|
|
} // namespace style
|
|
} // namespace mbgl
|