summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/heatmap_layer.cpp
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-07-04 23:12:58 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-07-05 15:11:14 +0300
commit514485502db8ecacf2b11abad4599d7af09b0cf8 (patch)
tree21a76d2fda8b5ec5e19624f5eedf609a545b59b4 /src/mbgl/style/layers/heatmap_layer.cpp
parent32dce870d756063167e000302afb553714f1f0cb (diff)
downloadqtlocation-mapboxgl-514485502db8ecacf2b11abad4599d7af09b0cf8.tar.gz
Rename `HeatmapColorPropertyValue` to `ColorRampPropertyValue`
Based on patch from @lbud (Lauren Budorick). Give `HeatmapColorPropertyValue` a more generic name, since the same value type will be used for both `heatmap-color` and `line-gradient` properties.
Diffstat (limited to 'src/mbgl/style/layers/heatmap_layer.cpp')
-rw-r--r--src/mbgl/style/layers/heatmap_layer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mbgl/style/layers/heatmap_layer.cpp b/src/mbgl/style/layers/heatmap_layer.cpp
index 3f7881ddd3..c2a1545a00 100644
--- a/src/mbgl/style/layers/heatmap_layer.cpp
+++ b/src/mbgl/style/layers/heatmap_layer.cpp
@@ -5,8 +5,8 @@
#include <mbgl/style/layer_observer.hpp>
// for constructing default heatmap-color ramp expression from style JSON
#include <mbgl/style/conversion.hpp>
+#include <mbgl/style/conversion/color_ramp_property_value.hpp>
#include <mbgl/style/conversion/json.hpp>
-#include <mbgl/style/conversion/heatmap_color_property_value.hpp>
namespace mbgl {
namespace style {
@@ -181,17 +181,17 @@ TransitionOptions HeatmapLayer::getHeatmapIntensityTransition() const {
return impl().paint.template get<HeatmapIntensity>().options;
}
-HeatmapColorPropertyValue HeatmapLayer::getDefaultHeatmapColor() {
+ColorRampPropertyValue HeatmapLayer::getDefaultHeatmapColor() {
conversion::Error error;
std::string rawValue = R"JSON(["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"])JSON";
- return *conversion::convertJSON<HeatmapColorPropertyValue>(rawValue, error);
+ return *conversion::convertJSON<ColorRampPropertyValue>(rawValue, error);
}
-HeatmapColorPropertyValue HeatmapLayer::getHeatmapColor() const {
+ColorRampPropertyValue HeatmapLayer::getHeatmapColor() const {
return impl().paint.template get<HeatmapColor>().value;
}
-void HeatmapLayer::setHeatmapColor(HeatmapColorPropertyValue value) {
+void HeatmapLayer::setHeatmapColor(ColorRampPropertyValue value) {
if (value == getHeatmapColor())
return;
auto impl_ = mutableImpl();