summaryrefslogtreecommitdiff
path: root/platform/android/src/geometry/feature.cpp
diff options
context:
space:
mode:
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