[android] rendering interface changes

This commit is contained in:
Ivo van Dongen
2017-06-27 17:04:09 -07:00
committed by Ivo van Dongen
parent b6d56ad634
commit d68d8a7846
19 changed files with 229 additions and 68 deletions

View File

@@ -1,5 +1,7 @@
#include "vector_source.hpp"
#include <mbgl/renderer/query.hpp>
// Java -> C++ conversion
#include "../android_conversion.hpp"
#include "../conversion/filter.hpp"
@@ -28,8 +30,8 @@ namespace android {
) {
}
VectorSource::VectorSource(mbgl::Map& map, mbgl::style::VectorSource& coreSource)
: Source(map, coreSource) {
VectorSource::VectorSource(mbgl::style::VectorSource& coreSource)
: Source(coreSource) {
}
VectorSource::~VectorSource() = default;
@@ -46,8 +48,8 @@ namespace android {
using namespace mbgl::android::geojson;
std::vector<mbgl::Feature> features;
if (map) {
features = map->querySourceFeatures(source.getID(), { toVector(env, jSourceLayerIds), toFilter(env, jfilter) });
if (rendererFrontend) {
features = rendererFrontend->querySourceFeatures(source.getID(), { toVector(env, jSourceLayerIds), toFilter(env, jfilter) });
}
return *convert<jni::Array<jni::Object<Feature>>, std::vector<mbgl::Feature>>(env, features);
}