summaryrefslogtreecommitdiff
path: root/platform/android/src/style/sources/geojson_source.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/src/style/sources/geojson_source.cpp')
-rw-r--r--platform/android/src/style/sources/geojson_source.cpp6
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")
);
}