diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2018-07-13 18:14:12 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2018-07-20 11:56:30 -0700 |
commit | c8edbb0500cbf4baf1d5fdb0e63679539e166585 (patch) | |
tree | 750f3b72b9e3b1c91ddbc0541cfc64d7d80ffe71 /platform | |
parent | 6d7072162b764c2432c010cd463a5a2c0093d606 (diff) | |
download | qtlocation-mapboxgl-c8edbb0500cbf4baf1d5fdb0e63679539e166585.tar.gz |
[core] Replace {Source,Camera,Composite}Function with PropertyExpression
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/config.cmake | 2 | ||||
-rw-r--r-- | platform/android/src/style/conversion/function.hpp | 51 | ||||
-rw-r--r-- | platform/android/src/style/conversion/property_expression.hpp | 31 | ||||
-rw-r--r-- | platform/android/src/style/conversion/property_value.hpp | 14 | ||||
-rw-r--r-- | platform/darwin/src/MGLStyleValue_Private.h | 10 | ||||
-rw-r--r-- | platform/darwin/test/MGLBackgroundStyleLayerTests.mm | 6 | ||||
-rw-r--r-- | platform/darwin/test/MGLCircleStyleLayerTests.mm | 50 | ||||
-rw-r--r-- | platform/darwin/test/MGLFillExtrusionStyleLayerTests.mm | 26 | ||||
-rw-r--r-- | platform/darwin/test/MGLFillStyleLayerTests.mm | 26 | ||||
-rw-r--r-- | platform/darwin/test/MGLHeatmapStyleLayerTests.mm | 16 | ||||
-rw-r--r-- | platform/darwin/test/MGLHillshadeStyleLayerTests.mm | 12 | ||||
-rw-r--r-- | platform/darwin/test/MGLLineStyleLayerTests.mm | 52 | ||||
-rw-r--r-- | platform/darwin/test/MGLRasterStyleLayerTests.mm | 16 | ||||
-rw-r--r-- | platform/darwin/test/MGLStyleLayerTests.mm.ejs | 6 | ||||
-rw-r--r-- | platform/darwin/test/MGLSymbolStyleLayerTests.mm | 172 | ||||
-rw-r--r-- | platform/glfw/glfw_view.cpp | 6 |
16 files changed, 230 insertions, 266 deletions
diff --git a/platform/android/config.cmake b/platform/android/config.cmake index 88130dc104..21ec6a9e0c 100644 --- a/platform/android/config.cmake +++ b/platform/android/config.cmake @@ -129,7 +129,7 @@ add_library(mbgl-android STATIC # Conversion C++ -> Java platform/android/src/conversion/constant.hpp platform/android/src/conversion/conversion.hpp - platform/android/src/style/conversion/function.hpp + platform/android/src/style/conversion/property_expression.hpp platform/android/src/style/conversion/property_value.hpp platform/android/src/style/conversion/types.hpp platform/android/src/style/conversion/types_string_values.hpp diff --git a/platform/android/src/style/conversion/function.hpp b/platform/android/src/style/conversion/function.hpp deleted file mode 100644 index d6669b4508..0000000000 --- a/platform/android/src/style/conversion/function.hpp +++ /dev/null @@ -1,51 +0,0 @@ -#pragma once - -#include <mbgl/style/property_value.hpp> -#include "../../conversion/conversion.hpp" -#include "../../conversion/constant.hpp" -#include "types.hpp" -#include "../../java/lang.hpp" - -#include <jni/jni.hpp> -#include "../../gson/json_element.hpp" - -#include <tuple> -#include <map> - -namespace mbgl { -namespace android { -namespace conversion { - -template <class T> -struct Converter<jni::Object<android::gson::JsonElement>, mbgl::style::CameraFunction<T>> { - - Result<jni::Object<android::gson::JsonElement>> operator()(jni::JNIEnv& env, const mbgl::style::CameraFunction<T>& value) const { - // Convert expressions - mbgl::Value expressionValue = value.getExpression().serialize(); - return gson::JsonElement::New(env, expressionValue); - } -}; - -template <class T> -struct Converter<jni::Object<android::gson::JsonElement>, mbgl::style::SourceFunction<T>> { - - Result<jni::Object<android::gson::JsonElement>> operator()(jni::JNIEnv& env, const mbgl::style::SourceFunction<T>& value) const { - // Convert expressions - mbgl::Value expressionValue = value.getExpression().serialize(); - return gson::JsonElement::New(env, expressionValue); - } -}; - -template <class T> -struct Converter<jni::Object<android::gson::JsonElement>, mbgl::style::CompositeFunction<T>> { - - Result<jni::Object<android::gson::JsonElement>> operator()(jni::JNIEnv& env, const mbgl::style::CompositeFunction<T>& value) const { - // Convert expressions - mbgl::Value expressionValue = value.getExpression().serialize(); - return gson::JsonElement::New(env, expressionValue); - } -}; - -} // namespace conversion -} // namespace android -} // namespace mbgl diff --git a/platform/android/src/style/conversion/property_expression.hpp b/platform/android/src/style/conversion/property_expression.hpp new file mode 100644 index 0000000000..ae9d4ea41c --- /dev/null +++ b/platform/android/src/style/conversion/property_expression.hpp @@ -0,0 +1,31 @@ +#pragma once + +#include <mbgl/style/property_value.hpp> +#include "../../conversion/conversion.hpp" +#include "../../conversion/constant.hpp" +#include "types.hpp" +#include "../../java/lang.hpp" + +#include <jni/jni.hpp> +#include "../../gson/json_element.hpp" + +#include <tuple> +#include <map> + +namespace mbgl { +namespace android { +namespace conversion { + +template <class T> +struct Converter<jni::Object<android::gson::JsonElement>, mbgl::style::PropertyExpression<T>> { + + Result<jni::Object<android::gson::JsonElement>> operator()(jni::JNIEnv& env, const mbgl::style::PropertyExpression<T>& value) const { + // Convert expressions + mbgl::Value expressionValue = value.getExpression().serialize(); + return gson::JsonElement::New(env, expressionValue); + } +}; + +} // namespace conversion +} // namespace android +} // namespace mbgl diff --git a/platform/android/src/style/conversion/property_value.hpp b/platform/android/src/style/conversion/property_value.hpp index e6fbe42179..feed38b673 100644 --- a/platform/android/src/style/conversion/property_value.hpp +++ b/platform/android/src/style/conversion/property_value.hpp @@ -5,8 +5,8 @@ #include <mbgl/style/property_value.hpp> #include "../../conversion/conversion.hpp" #include "../../conversion/constant.hpp" +#include "property_expression.hpp" #include "types.hpp" -#include "function.hpp" namespace mbgl { namespace android { @@ -30,16 +30,8 @@ public: return *result; } - jni::jobject* operator()(const mbgl::style::CameraFunction<T> &value) const { - return *convert<jni::Object<android::gson::JsonElement>, mbgl::style::CameraFunction<T>>(env, value); - } - - jni::jobject* operator()(const mbgl::style::SourceFunction<T> &value) const { - return *convert<jni::Object<android::gson::JsonElement>, mbgl::style::SourceFunction<T>>(env, value); - } - - jni::jobject* operator()(const mbgl::style::CompositeFunction<T> &value) const { - return *convert<jni::Object<android::gson::JsonElement>, mbgl::style::CompositeFunction<T>>(env, value); + jni::jobject* operator()(const mbgl::style::PropertyExpression<T> &value) const { + return *convert<jni::Object<android::gson::JsonElement>, mbgl::style::PropertyExpression<T>>(env, value); } private: diff --git a/platform/darwin/src/MGLStyleValue_Private.h b/platform/darwin/src/MGLStyleValue_Private.h index 27f9e76632..c1958fc032 100644 --- a/platform/darwin/src/MGLStyleValue_Private.h +++ b/platform/darwin/src/MGLStyleValue_Private.h @@ -332,15 +332,7 @@ private: // Private utilities for converting from mbgl to mgl values return [NSExpression expressionForConstantValue:constantValue]; } - NSExpression *operator()(const mbgl::style::CameraFunction<MBGLType> &mbglValue) const { - return [NSExpression expressionWithMGLJSONObject:MGLJSONObjectFromMBGLExpression(mbglValue.getExpression())]; - } - - NSExpression *operator()(const mbgl::style::SourceFunction<MBGLType> &mbglValue) const { - return [NSExpression expressionWithMGLJSONObject:MGLJSONObjectFromMBGLExpression(mbglValue.getExpression())]; - } - - NSExpression *operator()(const mbgl::style::CompositeFunction<MBGLType> &mbglValue) const { + NSExpression *operator()(const mbgl::style::PropertyExpression<MBGLType> &mbglValue) const { return [NSExpression expressionWithMGLJSONObject:MGLJSONObjectFromMBGLExpression(mbglValue.getExpression())]; } }; diff --git a/platform/darwin/test/MGLBackgroundStyleLayerTests.mm b/platform/darwin/test/MGLBackgroundStyleLayerTests.mm index 9f805160d1..afd066df82 100644 --- a/platform/darwin/test/MGLBackgroundStyleLayerTests.mm +++ b/platform/darwin/test/MGLBackgroundStyleLayerTests.mm @@ -48,7 +48,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -101,7 +101,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -154,7 +154,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::string>( + propertyValue = mbgl::style::PropertyExpression<std::string>( step(zoom(), literal("Background Pattern"), 18.0, literal("Background Pattern")) ); } diff --git a/platform/darwin/test/MGLCircleStyleLayerTests.mm b/platform/darwin/test/MGLCircleStyleLayerTests.mm index d04e5d7271..7bfccd65ef 100644 --- a/platform/darwin/test/MGLCircleStyleLayerTests.mm +++ b/platform/darwin/test/MGLCircleStyleLayerTests.mm @@ -69,7 +69,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -84,7 +84,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -100,7 +100,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -147,7 +147,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -162,7 +162,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -178,7 +178,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1)))) ); } @@ -225,7 +225,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -240,7 +240,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -256,7 +256,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -303,7 +303,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::AlignmentType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::AlignmentType>( step(zoom(), literal("viewport"), 18.0, literal("viewport")) ); } @@ -347,7 +347,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -362,7 +362,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -378,7 +378,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -425,7 +425,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::CirclePitchScaleType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::CirclePitchScaleType>( step(zoom(), literal("viewport"), 18.0, literal("viewport")) ); } @@ -469,7 +469,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -484,7 +484,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -500,7 +500,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1)))) ); } @@ -547,7 +547,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -562,7 +562,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -578,7 +578,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -625,7 +625,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -640,7 +640,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -656,7 +656,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -709,7 +709,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::array<float, 2>>( + propertyValue = mbgl::style::PropertyExpression<std::array<float, 2>>( step(zoom(), literal({ 1, 1 }), 18.0, literal({ 1, 1 })) ); } @@ -753,7 +753,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::TranslateAnchorType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::TranslateAnchorType>( step(zoom(), literal("viewport"), 18.0, literal("viewport")) ); } diff --git a/platform/darwin/test/MGLFillExtrusionStyleLayerTests.mm b/platform/darwin/test/MGLFillExtrusionStyleLayerTests.mm index c7a9a0c74e..6427d672e7 100644 --- a/platform/darwin/test/MGLFillExtrusionStyleLayerTests.mm +++ b/platform/darwin/test/MGLFillExtrusionStyleLayerTests.mm @@ -69,7 +69,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -84,7 +84,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -100,7 +100,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -147,7 +147,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -162,7 +162,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -178,7 +178,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1)))) ); } @@ -225,7 +225,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -240,7 +240,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -256,7 +256,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -303,7 +303,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -356,7 +356,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::string>( + propertyValue = mbgl::style::PropertyExpression<std::string>( step(zoom(), literal("Fill Extrusion Pattern"), 18.0, literal("Fill Extrusion Pattern")) ); } @@ -415,7 +415,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::array<float, 2>>( + propertyValue = mbgl::style::PropertyExpression<std::array<float, 2>>( step(zoom(), literal({ 1, 1 }), 18.0, literal({ 1, 1 })) ); } @@ -459,7 +459,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::TranslateAnchorType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::TranslateAnchorType>( step(zoom(), literal("viewport"), 18.0, literal("viewport")) ); } diff --git a/platform/darwin/test/MGLFillStyleLayerTests.mm b/platform/darwin/test/MGLFillStyleLayerTests.mm index 3789133bc6..921b59416b 100644 --- a/platform/darwin/test/MGLFillStyleLayerTests.mm +++ b/platform/darwin/test/MGLFillStyleLayerTests.mm @@ -69,7 +69,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<bool>( + propertyValue = mbgl::style::PropertyExpression<bool>( step(zoom(), literal(false), 18.0, literal(false)) ); } @@ -113,7 +113,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -128,7 +128,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -144,7 +144,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1)))) ); } @@ -191,7 +191,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -206,7 +206,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -222,7 +222,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -269,7 +269,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -284,7 +284,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -300,7 +300,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1)))) ); } @@ -347,7 +347,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::string>( + propertyValue = mbgl::style::PropertyExpression<std::string>( step(zoom(), literal("Fill Pattern"), 18.0, literal("Fill Pattern")) ); } @@ -406,7 +406,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::array<float, 2>>( + propertyValue = mbgl::style::PropertyExpression<std::array<float, 2>>( step(zoom(), literal({ 1, 1 }), 18.0, literal({ 1, 1 })) ); } @@ -450,7 +450,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::TranslateAnchorType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::TranslateAnchorType>( step(zoom(), literal("viewport"), 18.0, literal("viewport")) ); } diff --git a/platform/darwin/test/MGLHeatmapStyleLayerTests.mm b/platform/darwin/test/MGLHeatmapStyleLayerTests.mm index c58cac9af0..a51a324cd9 100644 --- a/platform/darwin/test/MGLHeatmapStyleLayerTests.mm +++ b/platform/darwin/test/MGLHeatmapStyleLayerTests.mm @@ -69,7 +69,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -122,7 +122,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -175,7 +175,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -190,7 +190,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -206,7 +206,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -253,7 +253,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -268,7 +268,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -284,7 +284,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } diff --git a/platform/darwin/test/MGLHillshadeStyleLayerTests.mm b/platform/darwin/test/MGLHillshadeStyleLayerTests.mm index d5d470944c..2e8795759f 100644 --- a/platform/darwin/test/MGLHillshadeStyleLayerTests.mm +++ b/platform/darwin/test/MGLHillshadeStyleLayerTests.mm @@ -51,7 +51,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -104,7 +104,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -157,7 +157,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -210,7 +210,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::HillshadeIlluminationAnchorType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::HillshadeIlluminationAnchorType>( step(zoom(), literal("viewport"), 18.0, literal("viewport")) ); } @@ -254,7 +254,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -298,7 +298,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } diff --git a/platform/darwin/test/MGLLineStyleLayerTests.mm b/platform/darwin/test/MGLLineStyleLayerTests.mm index 3f9a824d38..8ad354ef58 100644 --- a/platform/darwin/test/MGLLineStyleLayerTests.mm +++ b/platform/darwin/test/MGLLineStyleLayerTests.mm @@ -69,7 +69,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::LineCapType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::LineCapType>( step(zoom(), literal("square"), 18.0, literal("square")) ); } @@ -113,7 +113,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::LineJoinType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::LineJoinType>( step(zoom(), literal("miter"), 18.0, literal("miter")) ); } @@ -151,7 +151,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -195,7 +195,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -239,7 +239,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -254,7 +254,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -270,7 +270,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -317,7 +317,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -332,7 +332,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -348,7 +348,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1)))) ); } @@ -395,7 +395,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::vector<float>>( + propertyValue = mbgl::style::PropertyExpression<std::vector<float>>( step(zoom(), literal({1, 2}), 18.0, literal({1, 2})) ); } @@ -439,7 +439,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -454,7 +454,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -470,7 +470,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -517,7 +517,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -532,7 +532,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -548,7 +548,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -595,7 +595,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -610,7 +610,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -626,7 +626,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -673,7 +673,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::string>( + propertyValue = mbgl::style::PropertyExpression<std::string>( step(zoom(), literal("Line Pattern"), 18.0, literal("Line Pattern")) ); } @@ -732,7 +732,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::array<float, 2>>( + propertyValue = mbgl::style::PropertyExpression<std::array<float, 2>>( step(zoom(), literal({ 1, 1 }), 18.0, literal({ 1, 1 })) ); } @@ -776,7 +776,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::TranslateAnchorType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::TranslateAnchorType>( step(zoom(), literal("viewport"), 18.0, literal("viewport")) ); } @@ -820,7 +820,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -835,7 +835,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -851,7 +851,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } diff --git a/platform/darwin/test/MGLRasterStyleLayerTests.mm b/platform/darwin/test/MGLRasterStyleLayerTests.mm index 217c585037..9325bb48f5 100644 --- a/platform/darwin/test/MGLRasterStyleLayerTests.mm +++ b/platform/darwin/test/MGLRasterStyleLayerTests.mm @@ -51,7 +51,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -95,7 +95,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -139,7 +139,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -192,7 +192,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -236,7 +236,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -280,7 +280,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -333,7 +333,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::RasterResamplingType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::RasterResamplingType>( step(zoom(), literal("nearest"), 18.0, literal("nearest")) ); } @@ -377,7 +377,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } diff --git a/platform/darwin/test/MGLStyleLayerTests.mm.ejs b/platform/darwin/test/MGLStyleLayerTests.mm.ejs index 13cec9820b..44996fa125 100644 --- a/platform/darwin/test/MGLStyleLayerTests.mm.ejs +++ b/platform/darwin/test/MGLStyleLayerTests.mm.ejs @@ -86,7 +86,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<<%- mbglType(property) %>>( + propertyValue = mbgl::style::PropertyExpression<<%- mbglType(property) %>>( step(zoom(), literal(<%- mbglExpressionTestValue(property, type) %>), 18.0, literal(<%- mbglExpressionTestValue(property, type) %>)) ); } @@ -102,7 +102,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<<%- mbglType(property) %>>( + propertyValue = mbgl::style::PropertyExpression<<%- mbglType(property) %>>( interpolate(linear(), number(get("keyName")), 18.0, literal(<%- mbglExpressionTestValue(property, type) %>)) ); } @@ -118,7 +118,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<<%- mbglType(property) %>>( + propertyValue = mbgl::style::PropertyExpression<<%- mbglType(property) %>>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(<%- mbglExpressionTestValue(property, type) %>))) ); } diff --git a/platform/darwin/test/MGLSymbolStyleLayerTests.mm b/platform/darwin/test/MGLSymbolStyleLayerTests.mm index f22ea04f6e..7566617872 100644 --- a/platform/darwin/test/MGLSymbolStyleLayerTests.mm +++ b/platform/darwin/test/MGLSymbolStyleLayerTests.mm @@ -69,7 +69,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<bool>( + propertyValue = mbgl::style::PropertyExpression<bool>( step(zoom(), literal(true), 18.0, literal(true)) ); } @@ -113,7 +113,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::SymbolAnchorType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::SymbolAnchorType>( step(zoom(), literal("bottom-right"), 18.0, literal("bottom-right")) ); } @@ -151,7 +151,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<bool>( + propertyValue = mbgl::style::PropertyExpression<bool>( step(zoom(), literal(true), 18.0, literal(true)) ); } @@ -195,7 +195,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::string>( + propertyValue = mbgl::style::PropertyExpression<std::string>( step(zoom(), literal("Icon Image"), 18.0, literal("Icon Image")) ); } @@ -239,7 +239,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::array<float, 2>>( + propertyValue = mbgl::style::PropertyExpression<std::array<float, 2>>( step(zoom(), literal({ 1, 1 }), 18.0, literal({ 1, 1 })) ); } @@ -254,7 +254,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<std::array<float, 2>>( + propertyValue = mbgl::style::PropertyExpression<std::array<float, 2>>( interpolate(linear(), number(get("keyName")), 18.0, literal({ 1, 1 })) ); } @@ -270,7 +270,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<std::array<float, 2>>( + propertyValue = mbgl::style::PropertyExpression<std::array<float, 2>>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal({ 1, 1 }))) ); } @@ -308,7 +308,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<bool>( + propertyValue = mbgl::style::PropertyExpression<bool>( step(zoom(), literal(true), 18.0, literal(true)) ); } @@ -352,7 +352,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -396,7 +396,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::AlignmentType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::AlignmentType>( step(zoom(), literal("auto"), 18.0, literal("auto")) ); } @@ -440,7 +440,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -455,7 +455,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -471,7 +471,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -509,7 +509,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::AlignmentType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::AlignmentType>( step(zoom(), literal("auto"), 18.0, literal("auto")) ); } @@ -553,7 +553,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -568,7 +568,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -584,7 +584,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -622,7 +622,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::IconTextFitType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::IconTextFitType>( step(zoom(), literal("both"), 18.0, literal("both")) ); } @@ -672,7 +672,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::array<float, 4>>( + propertyValue = mbgl::style::PropertyExpression<std::array<float, 4>>( step(zoom(), literal({ 1, 1, 1, 1 }), 18.0, literal({ 1, 1, 1, 1 })) ); } @@ -716,7 +716,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<bool>( + propertyValue = mbgl::style::PropertyExpression<bool>( step(zoom(), literal(true), 18.0, literal(true)) ); } @@ -760,7 +760,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<bool>( + propertyValue = mbgl::style::PropertyExpression<bool>( step(zoom(), literal(false), 18.0, literal(false)) ); } @@ -804,7 +804,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -848,7 +848,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -863,7 +863,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -879,7 +879,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -917,7 +917,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<bool>( + propertyValue = mbgl::style::PropertyExpression<bool>( step(zoom(), literal(true), 18.0, literal(true)) ); } @@ -961,7 +961,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::SymbolPlacementType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::SymbolPlacementType>( step(zoom(), literal("line"), 18.0, literal("line")) ); } @@ -1005,7 +1005,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -1049,7 +1049,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::string>( + propertyValue = mbgl::style::PropertyExpression<std::string>( step(zoom(), literal("Text Field"), 18.0, literal("Text Field")) ); } @@ -1087,7 +1087,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<bool>( + propertyValue = mbgl::style::PropertyExpression<bool>( step(zoom(), literal(true), 18.0, literal(true)) ); } @@ -1131,7 +1131,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::SymbolAnchorType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::SymbolAnchorType>( step(zoom(), literal("bottom-right"), 18.0, literal("bottom-right")) ); } @@ -1169,7 +1169,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::vector<std::string>>( + propertyValue = mbgl::style::PropertyExpression<std::vector<std::string>>( step(zoom(), literal({ "Text Font", "Tnof Txet" }), 18.0, literal({ "Text Font", "Tnof Txet" })) ); } @@ -1207,7 +1207,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -1222,7 +1222,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -1238,7 +1238,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -1276,7 +1276,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<bool>( + propertyValue = mbgl::style::PropertyExpression<bool>( step(zoom(), literal(true), 18.0, literal(true)) ); } @@ -1320,7 +1320,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::TextJustifyType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::TextJustifyType>( step(zoom(), literal("right"), 18.0, literal("right")) ); } @@ -1358,7 +1358,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -1373,7 +1373,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -1389,7 +1389,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -1427,7 +1427,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -1477,7 +1477,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::array<float, 2>>( + propertyValue = mbgl::style::PropertyExpression<std::array<float, 2>>( step(zoom(), literal({ 1, 1 }), 18.0, literal({ 1, 1 })) ); } @@ -1492,7 +1492,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<std::array<float, 2>>( + propertyValue = mbgl::style::PropertyExpression<std::array<float, 2>>( interpolate(linear(), number(get("keyName")), 18.0, literal({ 1, 1 })) ); } @@ -1508,7 +1508,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<std::array<float, 2>>( + propertyValue = mbgl::style::PropertyExpression<std::array<float, 2>>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal({ 1, 1 }))) ); } @@ -1546,7 +1546,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<bool>( + propertyValue = mbgl::style::PropertyExpression<bool>( step(zoom(), literal(true), 18.0, literal(true)) ); } @@ -1590,7 +1590,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -1634,7 +1634,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::AlignmentType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::AlignmentType>( step(zoom(), literal("auto"), 18.0, literal("auto")) ); } @@ -1678,7 +1678,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -1693,7 +1693,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -1709,7 +1709,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -1747,7 +1747,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::AlignmentType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::AlignmentType>( step(zoom(), literal("auto"), 18.0, literal("auto")) ); } @@ -1791,7 +1791,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::TextTransformType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::TextTransformType>( step(zoom(), literal("lowercase"), 18.0, literal("lowercase")) ); } @@ -1829,7 +1829,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -1844,7 +1844,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -1860,7 +1860,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1)))) ); } @@ -1907,7 +1907,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -1922,7 +1922,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -1938,7 +1938,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -1985,7 +1985,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -2000,7 +2000,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -2016,7 +2016,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1)))) ); } @@ -2063,7 +2063,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -2078,7 +2078,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -2094,7 +2094,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -2141,7 +2141,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -2156,7 +2156,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -2172,7 +2172,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -2225,7 +2225,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::array<float, 2>>( + propertyValue = mbgl::style::PropertyExpression<std::array<float, 2>>( step(zoom(), literal({ 1, 1 }), 18.0, literal({ 1, 1 })) ); } @@ -2269,7 +2269,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::TranslateAnchorType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::TranslateAnchorType>( step(zoom(), literal("viewport"), 18.0, literal("viewport")) ); } @@ -2313,7 +2313,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -2328,7 +2328,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -2344,7 +2344,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1)))) ); } @@ -2391,7 +2391,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -2406,7 +2406,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -2422,7 +2422,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -2469,7 +2469,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( step(zoom(), literal(mbgl::Color(1, 0, 0, 1)), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -2484,7 +2484,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1))) ); } @@ -2500,7 +2500,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<mbgl::Color>( + propertyValue = mbgl::style::PropertyExpression<mbgl::Color>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(mbgl::Color(1, 0, 0, 1)))) ); } @@ -2547,7 +2547,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -2562,7 +2562,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -2578,7 +2578,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -2625,7 +2625,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( step(zoom(), literal(1.0), 18.0, literal(1.0)) ); } @@ -2640,7 +2640,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::SourceFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), number(get("keyName")), 18.0, literal(1.0)) ); } @@ -2656,7 +2656,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CompositeFunction<float>( + propertyValue = mbgl::style::PropertyExpression<float>( interpolate(linear(), zoom(), 10.0, interpolate(linear(), number(get("keyName")), 18.0, literal(1.0))) ); } @@ -2709,7 +2709,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<std::array<float, 2>>( + propertyValue = mbgl::style::PropertyExpression<std::array<float, 2>>( step(zoom(), literal({ 1, 1 }), 18.0, literal({ 1, 1 })) ); } @@ -2753,7 +2753,7 @@ { using namespace mbgl::style::expression::dsl; - propertyValue = mbgl::style::CameraFunction<mbgl::style::TranslateAnchorType>( + propertyValue = mbgl::style::PropertyExpression<mbgl::style::TranslateAnchorType>( step(zoom(), literal("viewport"), 18.0, literal("viewport")) ); } diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp index 60cc20e05a..d7cabf6244 100644 --- a/platform/glfw/glfw_view.cpp +++ b/platform/glfw/glfw_view.cpp @@ -637,14 +637,14 @@ void GLFWView::toggle3DExtrusions(bool visible) { extrusionLayer->setSourceLayer("building"); extrusionLayer->setMinZoom(15.0f); extrusionLayer->setFilter(Filter(eq(get("extrude"), literal("true")))); - extrusionLayer->setFillExtrusionColor(SourceFunction<mbgl::Color>( + extrusionLayer->setFillExtrusionColor(PropertyExpression<mbgl::Color>( interpolate(linear(), number(get("height")), 0.f, toColor("#160e23"), 50.f, toColor("#00615f"), 100.f, toColor("#55e9ff")))); extrusionLayer->setFillExtrusionOpacity(0.6f); - extrusionLayer->setFillExtrusionHeight(SourceFunction<float>(get("height"))); - extrusionLayer->setFillExtrusionBase(SourceFunction<float>(get("min_height"))); + extrusionLayer->setFillExtrusionHeight(PropertyExpression<float>(get("height"))); + extrusionLayer->setFillExtrusionBase(PropertyExpression<float>(get("min_height"))); map->getStyle().addLayer(std::move(extrusionLayer)); } |