diff options
| author | Ivo van Dongen <info@ivovandongen.nl> | 2017-02-16 16:16:47 +0200 |
|---|---|---|
| committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2017-02-24 17:54:20 +0200 |
| commit | 465c949153a838bb3159204ab268eb551fbd2e6c (patch) | |
| tree | 250922b879261580b1252a78b461218be9012bc0 /platform/android/src/geometry/feature.cpp | |
| parent | 7d9018093a61d327fa7ca1312845d2a00d928380 (diff) | |
| download | qtlocation-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.cpp | 20 |
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 |
