Feature Request: Port `turf-bezier-spline` to Mapbox Java (Android)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- android, java
- 領域
- mobile-dev
調査の方向性
Turf.js と Turf for Swift にある既存の turf-bezier-spline 実装を比較し、続いて Java SDK の TurfMisc エントリポイントを調べます。LineString 入力に対応する未実装の TurfMisc.bezier API を実装し、その曲線出力が Web と iOS の動作と一致することを検証します。
索引モデルが issue の本文から書いたものです。
説明
Description
Currently, the Mapbox Java SDK's Turf implementation lacks the turf-bezier-spline module. This feature is readily available in both Turf.js (Web) and Turf for Swift (iOS), but Android developers are left without a native way to generate smooth Bézier curves from a LineString.
When building cross-platform applications that rely on consistent map rendering, the absence of TurfMisc.bezier() in Java forces Android developers to write custom mathematical utilities to calculate intermediate curve coordinates, rather than relying on the official Turf ecosystem.
Expected Behavior
Port the turf-bezier-spline algorithm to mapbox-java so that Android developers can pass a straight LineString with control points and receive a curved LineString or Feature in return, matching the behavior of the Web and iOS SDKs.
Example of Desired API usage (Java)
List<Point> points = Arrays.asList(
Point.fromLngLat(-122.414, 37.776),
Point.fromLngLat(-122.420, 37.780), // Control point
Point.fromLngLat(-122.425, 37.776)
);
LineString straightLine = LineString.fromLngLats(points);
// This is currently missing:
Feature curvedFeature = TurfMisc.bezier(straightLine);
Current Workaround
Manually calculating the Quadratic/Cubic Bézier mathematical formulas in a custom Java utility class, generating a dense list of Point objects, and then passing those to a standard LineString. This is inefficient and prone to projection errors compared to a dedicated Turf module.
Context
This missing feature was also noted internally by the Mapbox team in the navigation-android SDK (Issue #3018) back in 2020. Adding this would greatly improve feature parity between Mapbox's Web, iOS, and Android ecosystems.
- 主要言語
- Java
- スター
- 438
- フォーク
- 117
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mapbox/mapbox-java のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mapbox/mapbox-java#1640 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
mapbox/mapbox-java#1619 ·
-
Mapbox-java incompatible with gson 2.13.0 and up - call to internal GSON classes that were renamed オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
mapbox/mapbox-java#1614 · コメント 2 件 · リアクション 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
mapbox/mapbox-java#1612 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
mapbox/mapbox-java#1603 ·
mapbox/mapbox-java の issue をすべて見る
似ている issue
-
bug untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
opensearch-project/ml-commons#5094 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
emitter:client:csharp feature
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
affects/8.10 affects/8.9 component/clients kind/bug likelihood/mid severity/mid
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 オープンbug frontend maui-pilot
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100