diff options
Diffstat (limited to 'platform/android/src')
-rw-r--r-- | platform/android/src/style/sources/source.cpp | 8 | ||||
-rw-r--r-- | platform/android/src/style/sources/source.hpp | 2 |
2 files changed, 9 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") ); } diff --git a/platform/android/src/style/sources/source.hpp b/platform/android/src/style/sources/source.hpp index 9a9d504d68..49fc50d754 100644 --- a/platform/android/src/style/sources/source.hpp +++ b/platform/android/src/style/sources/source.hpp @@ -45,6 +45,8 @@ public: jni::String getId(jni::JNIEnv&); + jni::String getAttribution(jni::JNIEnv&); + protected: // Release the owned view and return it std::unique_ptr<mbgl::style::Source> releaseCoreSource(); |