From 7954c7d1abbb591c3ebd36a70987b4c879477173 Mon Sep 17 00:00:00 2001 From: Nicholas Hallahan Date: Thu, 16 Jul 2015 07:55:10 -0700 Subject: [PATCH] iterating through list of lat legs #1716 --- android/cpp/jni.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/android/cpp/jni.cpp b/android/cpp/jni.cpp index 0b5344178..81cf6160b 100644 --- a/android/cpp/jni.cpp +++ b/android/cpp/jni.cpp @@ -524,6 +524,16 @@ jlong JNICALL nativeAddPolyline(JNIEnv *env, jobject obj, jlong nativeMapViewPtr return -1; } + for (jsize i = 0; i < len; i++) { + jobject jobj = reinterpret_cast(env->GetObjectArrayElement(array, i)); + if (jobj == nullptr) { + env->ExceptionDescribe(); + return -1; + } + + // vector.push_back(std_string_from_jstring(env, jstr)); + } + return (jlong)width; }