diff options
author | Tobrun <tobrun@mapbox.com> | 2017-04-13 17:24:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-13 17:24:46 +0200 |
commit | f045559b148d43cb836b69200c2b7fc7a6c6dd35 (patch) | |
tree | 78d62c02904b5f2da3c94a4283f4e5a59e166168 /platform/android/src/style/sources/source.cpp | |
parent | 21f54cc50605fd49e927bae340eac4732570f2e4 (diff) | |
download | qtlocation-mapboxgl-f045559b148d43cb836b69200c2b7fc7a6c6dd35.tar.gz |
[android] - derived source attribution (#8630)
Diffstat (limited to 'platform/android/src/style/sources/source.cpp')
-rw-r--r-- | platform/android/src/style/sources/source.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/platform/android/src/style/sources/source.cpp b/platform/android/src/style/sources/source.cpp index b780de5627..e0e9bb9870 100644 --- a/platform/android/src/style/sources/source.cpp +++ b/platform/android/src/style/sources/source.cpp @@ -43,6 +43,11 @@ namespace android { return jni::Make<jni::String>(env, source.getID()); } + jni::String Source::getAttribution(jni::JNIEnv& env) { + auto attribution = source.getAttribution(); + return attribution ? jni::Make<jni::String>(env, attribution.value()) : jni::Make<jni::String>(env,""); + } + void Source::addToMap(mbgl::Map& _map) { // Check to see if we own the source first if (!ownedSource) { @@ -71,7 +76,8 @@ namespace android { // Register the peer jni::RegisterNativePeer<Source>(env, Source::javaClass, "nativePtr", - METHOD(&Source::getId, "nativeGetId") + METHOD(&Source::getId, "nativeGetId"), + METHOD(&Source::getAttribution, "nativeGetAttribution") ); } |