diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2017-05-11 15:01:33 +0300 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2017-05-11 18:59:11 +0300 |
commit | 489f76d3a218ac07188947e4e219801745d15318 (patch) | |
tree | 7bd07b0a6f291585e24098e6e479cf25681fd381 /platform/android/src/style/sources/geojson_source.cpp | |
parent | 625c2ea52777f53c1f23ca71e2aa5094dc4630c5 (diff) | |
download | qtlocation-mapboxgl-489f76d3a218ac07188947e4e219801745d15318.tar.gz |
[android] url getter on sources
Diffstat (limited to 'platform/android/src/style/sources/geojson_source.cpp')
-rw-r--r-- | platform/android/src/style/sources/geojson_source.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/android/src/style/sources/geojson_source.cpp b/platform/android/src/style/sources/geojson_source.cpp index 9b56446e31..780cc4b6f6 100644 --- a/platform/android/src/style/sources/geojson_source.cpp +++ b/platform/android/src/style/sources/geojson_source.cpp @@ -97,6 +97,11 @@ namespace android { source.as<mbgl::style::GeoJSONSource>()->GeoJSONSource::setURL(jni::Make<std::string>(env, url)); } + jni::String GeoJSONSource::getURL(jni::JNIEnv& env) { + optional<std::string> url = source.as<mbgl::style::GeoJSONSource>()->GeoJSONSource::getURL(); + return url ? jni::Make<jni::String>(env, *url) : jni::String(); + } + jni::Array<jni::Object<geojson::Feature>> GeoJSONSource::querySourceFeatures(jni::JNIEnv& env, jni::Array<jni::Object<>> jfilter) { using namespace mbgl::android::conversion; @@ -133,6 +138,7 @@ namespace android { METHOD(&GeoJSONSource::setFeature, "nativeSetFeature"), METHOD(&GeoJSONSource::setGeometry, "nativeSetGeometry"), METHOD(&GeoJSONSource::setURL, "nativeSetUrl"), + METHOD(&GeoJSONSource::getURL, "nativeGetUrl"), METHOD(&GeoJSONSource::querySourceFeatures, "querySourceFeatures") ); } |