summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyleValue_Private.h
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 /platform/darwin/src/MGLStyleValue_Private.h
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 'platform/darwin/src/MGLStyleValue_Private.h')
-rw-r--r--platform/darwin/src/MGLStyleValue_Private.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/platform/darwin/src/MGLStyleValue_Private.h b/platform/darwin/src/MGLStyleValue_Private.h
index cc63793d0d..27f9e76632 100644
--- a/platform/darwin/src/MGLStyleValue_Private.h
+++ b/platform/darwin/src/MGLStyleValue_Private.h
@@ -8,9 +8,9 @@
#import "MGLTypes.h"
#import "MGLConversion.h"
+#include <mbgl/style/conversion/color_ramp_property_value.hpp>
#include <mbgl/style/conversion/property_value.hpp>
#include <mbgl/style/conversion/data_driven_property_value.hpp>
-#include <mbgl/style/conversion/heatmap_color_property_value.hpp>
#include <mbgl/style/conversion/position.hpp>
#import <mbgl/style/types.hpp>
@@ -54,7 +54,7 @@ public:
}
// Convert an mbgl heatmap color property value into an mgl style value
- NSExpression *toExpression(const mbgl::style::HeatmapColorPropertyValue &mbglValue) {
+ NSExpression *toExpression(const mbgl::style::ColorRampPropertyValue &mbglValue) {
if (mbglValue.isUndefined()) {
return nil;
}
@@ -65,7 +65,7 @@ public:
Converts an NSExpression to an mbgl property value.
*/
template <typename MBGLValue>
- typename std::enable_if_t<!std::is_same<MBGLValue, mbgl::style::HeatmapColorPropertyValue>::value,
+ typename std::enable_if_t<!std::is_same<MBGLValue, mbgl::style::ColorRampPropertyValue>::value,
MBGLValue> toPropertyValue(NSExpression *expression) {
if (!expression) {
return {};
@@ -100,7 +100,7 @@ public:
Converts an NSExpression to an mbgl property value.
*/
template <typename MBGLValue>
- typename std::enable_if_t<std::is_same<MBGLValue, mbgl::style::HeatmapColorPropertyValue>::value,
+ typename std::enable_if_t<std::is_same<MBGLValue, mbgl::style::ColorRampPropertyValue>::value,
MBGLValue> toPropertyValue(NSExpression *expression) {
if (!expression) {
return {};
@@ -109,7 +109,7 @@ public:
NSArray *jsonExpression = expression.mgl_jsonExpressionObject;
mbgl::style::conversion::Error valueError;
- auto value = mbgl::style::conversion::convert<mbgl::style::HeatmapColorPropertyValue>(
+ auto value = mbgl::style::conversion::convert<mbgl::style::ColorRampPropertyValue>(
mbgl::style::conversion::makeConvertible(jsonExpression), valueError);
if (!value) {
[NSException raise:NSInvalidArgumentException