summaryrefslogtreecommitdiff
path: root/platform/android/src
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-04-25 12:56:59 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-05-02 08:45:09 -0700
commitc2b00378b78b55d50968a9b11ed75bb4edf62ec9 (patch)
tree12a164d821dcdeb84d8a88dc231b3f2f9bef8ffd /platform/android/src
parenta2350320988bd881e261f92930b2d3359ff2071e (diff)
downloadqtlocation-mapboxgl-c2b00378b78b55d50968a9b11ed75bb4edf62ec9.tar.gz
[all] Push querySourceFeatures back out to Map
Once Source and RendererSource are split, Source will no longer have access to tiles.
Diffstat (limited to 'platform/android/src')
-rw-r--r--platform/android/src/style/sources/geojson_source.cpp6
-rw-r--r--platform/android/src/style/sources/vector_source.cpp7
2 files changed, 8 insertions, 5 deletions
diff --git a/platform/android/src/style/sources/geojson_source.cpp b/platform/android/src/style/sources/geojson_source.cpp
index c201cdade1..9b56446e31 100644
--- a/platform/android/src/style/sources/geojson_source.cpp
+++ b/platform/android/src/style/sources/geojson_source.cpp
@@ -102,8 +102,10 @@ namespace android {
using namespace mbgl::android::conversion;
using namespace mbgl::android::geojson;
- auto filter = toFilter(env, jfilter);
- auto features = source.querySourceFeatures({ {}, filter });
+ std::vector<mbgl::Feature> features;
+ if (map) {
+ features = map->querySourceFeatures(source.getID(), { {}, toFilter(env, jfilter) });
+ }
return *convert<jni::Array<jni::Object<Feature>>, std::vector<mbgl::Feature>>(env, features);
}
diff --git a/platform/android/src/style/sources/vector_source.cpp b/platform/android/src/style/sources/vector_source.cpp
index 53aa144450..a8f74df142 100644
--- a/platform/android/src/style/sources/vector_source.cpp
+++ b/platform/android/src/style/sources/vector_source.cpp
@@ -40,9 +40,10 @@ namespace android {
using namespace mbgl::android::conversion;
using namespace mbgl::android::geojson;
- mbgl::optional<std::vector<std::string>> sourceLayerIds = { toVector(env, jSourceLayerIds) };
- auto filter = toFilter(env, jfilter);
- auto features = source.querySourceFeatures({ sourceLayerIds, filter });
+ std::vector<mbgl::Feature> features;
+ if (map) {
+ features = map->querySourceFeatures(source.getID(), { toVector(env, jSourceLayerIds), toFilter(env, jfilter) });
+ }
return *convert<jni::Array<jni::Object<Feature>>, std::vector<mbgl::Feature>>(env, features);
}