summaryrefslogtreecommitdiff
path: root/include/mbgl/style/layers/heatmap_layer.hpp
blob: d1760100ad7d74e62906550da8c76fd26c8002d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// 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 {
public:
    HeatmapLayerFactory();
    ~HeatmapLayerFactory() override;

    // LayerFactory overrides.
    const LayerTypeInfo* getTypeInfo() const noexcept final;
    std::unique_ptr<style::Layer> createLayer(const std::string& id, const conversion::Convertible& value) final;
};

} // namespace style
} // namespace mbgl