[android] - add heatmap color property

This commit is contained in:
Tobrun
2018-02-16 10:47:06 +01:00
committed by Tobrun
parent 2187d140df
commit 2e008aa29e
8 changed files with 95 additions and 6 deletions

View File

@@ -2,6 +2,7 @@
#include <mbgl/style/property_value.hpp>
#include <mbgl/style/data_driven_property_value.hpp>
#include <mbgl/style/heatmap_color_property_value.hpp>
#include "../../conversion/conversion.hpp"
#include "../../conversion/constant.hpp"
#include "types.hpp"
@@ -70,6 +71,18 @@ struct Converter<jni::jobject*, mbgl::style::DataDrivenPropertyValue<T>> {
}
};
/**
* Convert core heat map color property value to java
*/
template <>
struct Converter<jni::jobject*, mbgl::style::HeatmapColorPropertyValue> {
Result<jni::jobject*> operator()(jni::JNIEnv& env, const mbgl::style::HeatmapColorPropertyValue value) const {
PropertyValueEvaluator<mbgl::style::HeatmapColorPropertyValue> evaluator(env);
return *convert<jni::jobject*>(env, value.evaluate(evaluator));
}
};
} // namespace conversion
} // namespace android
} // namespace mbgl