summaryrefslogtreecommitdiff
path: root/platform/android/src/geometry/feature.cpp
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2017-02-16 16:16:47 +0200
committerIvo van Dongen <ivovandongen@users.noreply.github.com>2017-02-24 17:54:20 +0200
commit465c949153a838bb3159204ab268eb551fbd2e6c (patch)
tree250922b879261580b1252a78b461218be9012bc0 /platform/android/src/geometry/feature.cpp
parent7d9018093a61d327fa7ca1312845d2a00d928380 (diff)
downloadqtlocation-mapboxgl-465c949153a838bb3159204ab268eb551fbd2e6c.tar.gz
[android] jni high level binding refactor
Diffstat (limited to 'platform/android/src/geometry/feature.cpp')
-rw-r--r--platform/android/src/geometry/feature.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/platform/android/src/geometry/feature.cpp b/platform/android/src/geometry/feature.cpp
new file mode 100644
index 0000000000..5355d50ab7
--- /dev/null
+++ b/platform/android/src/geometry/feature.cpp
@@ -0,0 +1,20 @@
+#include "feature.hpp"
+
+namespace mbgl {
+namespace android {
+
+jni::Object<Feature> Feature::fromGeometry(jni::JNIEnv& env, jni::Object<Geometry> geometry, jni::Object<JsonObject> properties, jni::String id) {
+ static auto method = Feature::javaClass.GetStaticMethod<jni::Object<Feature> (jni::Object<Geometry>, jni::Object<JsonObject>, jni::String)>(env, "fromGeometry");
+ return Feature::javaClass.Call(env, method, geometry, properties, id);
+}
+
+void Feature::registerNative(jni::JNIEnv& env) {
+ // Lookup the class
+ Feature::javaClass = *jni::Class<Feature>::Find(env).NewGlobalRef(env).release();
+}
+
+jni::Class<Feature> Feature::javaClass;
+
+
+} // namespace android
+} // namespace mbgl \ No newline at end of file