You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We encountered following problem in our project:
When we pass a list to the above mentioned method and if the last point in the list is the closest point, the index returned by the matching feature is List.size - 2 .
if ((double) stop.getNumberProperty("dist")
< (double) closestPt.getNumberProperty("dist")) {
closestPt = stop;
closestPt.addNumberProperty(INDEX_KEY, i + 1); // the index of the closest point is i + 1, not i
}
The text was updated successfully, but these errors were encountered:
We encountered following problem in our project:
When we pass a list to the above mentioned method and if the last point in the list is the closest point, the index returned by the matching feature is
List.size - 2
.I would expect the index to be
List.size - 1
.In the following code snippet the index seems not to be set correctly:
https://github.com/mapbox/mapbox-java/blob/main/services-turf/src/main/java/com/mapbox/turf/TurfMisc.java#L336-L339
Imo it should say
The text was updated successfully, but these errors were encountered: