-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
65f5c47
to
31dbec6
Compare
a315df3
to
6fd77bf
Compare
d9a6051
to
58a21c4
Compare
This should be ready for review. In the test app: Query Source Features and Query feature properties seem to work. A couple of points to consider:
|
0d249d6
to
e2b19fc
Compare
Still have one remaining crash that I cannot figure out. It crashes while executing in whiel doing : GeoJsonSource source = new GeoJsonSource("extrusion-source", domTower); It crashes pretty reliably. I see that Navigation repo has mapboxSdk 5.3 and mapbox-java3.0 which is bad match to have at the moment so it is important to resolve this. I think Navigation people just got luck that it works. cc @tobrun |
7ec560e
to
5788f61
Compare
5788f61
to
77e7dcf
Compare
77e7dcf
to
8ff1cb3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one question and a couple nits related to commented code
|
||
static constexpr auto Type() { return "LineString"; }; | ||
|
||
static mapbox::geojson::line_string convert(jni::JNIEnv&, jni::Object<LineString>); | ||
|
||
static mapbox::geojson::line_string convert(jni::JNIEnv&, jni::Object<java::util::List/*<Position>*/>); | ||
static mapbox::geojson::line_string convert(jni::JNIEnv&, jni::Object<java::util::List/*<Point>*/>); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented code
} | ||
|
||
return multiLineString; | ||
} | ||
|
||
mapbox::geojson::multi_line_string MultiLineString::convert(jni::JNIEnv &env, jni::Object<java::util::List/*<java::util::List<Position>>*/> jPositionListsList) { | ||
mapbox::geojson::multi_line_string MultiLineString::convert(jni::JNIEnv &env, jni::Object<java::util::List/*<java::util::List<Position>>*/> jPointListsList) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented code
return point; | ||
} | ||
|
||
mapbox::geojson::point Point::convert(jni::JNIEnv &env, jni::Object<java::util::List/*<Double>*/> jDoubleList) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented code
mapbox::geojson::point Point::convert(jni::JNIEnv &env, jni::Object<java::util::List/*<Double>*/> jDoubleList) { | ||
auto jDoubleArray = java::util::List::toArray<double>(env, jDoubleList); | ||
// static jni::jclass* javaClass = jni::NewGlobalRef(env, &jni::FindClass(env, "java/lang/Double")).release(); | ||
//static auto method = jni::GetMethodID(env, javaClass, "doubleValue", "()D"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented code
@@ -3,6 +3,7 @@ apply plugin: 'com.android.library' | |||
dependencies { | |||
api dependenciesList.mapboxAndroidTelemetry | |||
api dependenciesList.mapboxJavaGeoJSON | |||
api dependenciesList.mapboxJavaTurf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the reason why we need this in the SDK?
// | ||
// return &jarray; | ||
// } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented code above
8ff1cb3
to
489454f
Compare
old 2.2.9 telementry is still used though
489454f
to
0ee6c2c
Compare
Updated PR with requested changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, can you cherry-pick this to release-boba
after merging?
if (jPositionListsList) { | ||
auto multiLine = MultiLineString::convert(env, jPositionListsList); | ||
if (jPointListsList) { | ||
auto multiLine = MultiLineString::convert(env, jPointListsList); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tobrun could it be that DeleteLocalRef() for multiline was and is missing here between lines 31 & 32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it seems that we aren't DeleteLocalRef on jPointListsList
as we are doing in the other classes eg.
jni::DeleteLocalRef(env, jPointListsList); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tobrun Looks like a false alarm on my side:
/src/platform/android/src/geojson/polygon.cpp:32:34: error: no viable conversion from 'mapbox::geometry::multi_line_string<double, std::vector>' to 'jni::jobject *'
jni::DeleteLocalRef(env, multiLine);
^~~~~~~~~```
migrated to use mapbox-java3.0
old 2.2.9 telemetry is still used though
closes #10663