[android] query source features
This commit is contained in:
committed by
Ivo van Dongen
parent
12568f21a3
commit
b2b5f9e571
@@ -36,6 +36,7 @@
|
||||
// C++ -> Java conversion
|
||||
#include "conversion/conversion.hpp"
|
||||
#include "conversion/collection.hpp"
|
||||
#include "style/conversion/filter.hpp"
|
||||
#include "geometry/conversion/feature.hpp"
|
||||
|
||||
#include "jni.hpp"
|
||||
@@ -721,22 +722,6 @@ jni::Array<jlong> NativeMapView::queryPointAnnotations(JNIEnv& env, jni::Object<
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline optional<mbgl::style::Filter> toFilter(jni::JNIEnv& env, jni::Array<jni::Object<>> jfilter) {
|
||||
using namespace mbgl::style;
|
||||
using namespace mbgl::style::conversion;
|
||||
|
||||
mbgl::optional<Filter> filter;
|
||||
if (jfilter) {
|
||||
Value filterValue(env, jfilter);
|
||||
auto converted = convert<Filter>(filterValue);
|
||||
if (!converted) {
|
||||
mbgl::Log::Error(mbgl::Event::JNI, "Error setting filter: " + converted.error().message);
|
||||
}
|
||||
filter = std::move(*converted);
|
||||
}
|
||||
return filter;
|
||||
}
|
||||
|
||||
jni::Array<jni::Object<Feature>> NativeMapView::queryRenderedFeaturesForPoint(JNIEnv& env, jni::jfloat x, jni::jfloat y,
|
||||
jni::Array<jni::String> layerIds,
|
||||
jni::Array<jni::Object<>> jfilter) {
|
||||
|
||||
Reference in New Issue
Block a user