summaryrefslogtreecommitdiff
path: root/platform/android/src/geometry/feature.cpp
blob: 5355d50ab72a5a6c59f6c614dbe3a67dec42f1c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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