Directions API. Url provider
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 438
- 派生
- 117
- PR 合并指标
- 30 天内没有已合并 PR
描述
Description
In terms of Navigation for Android exists 2 types of Navigation(Router), it's Offline and Online. Both of them needs Route-URL provider.(Offline and Online are different modules , have own dependency graph and might be used independent).
Online Router's Route URL is provided by MapboxDirections that is a part of services-core library(under the hood is Retrofit(+OkHttp) library)
Problem
Offline Router cannot consume url from services-core because it brings "network" dependencies like Retrofit and OkHttp(they shouldn't be in Offline navigation).
Offline Router has own route-url provider RouteUrl
The main issue here: two classes where the same piece of logic exist.
Solution
- keep
service-corelibrary interfaces as it is - create additional library (like
router-url-provider) that depends onservice-directions-modeland (if java doesn't have clever approach for creating url) additional java library
How dependency tree looks now

Suggestion

Pros
router-url-provider might be used independently on service-core 👍
cc @mapbox/navigation-android @mapbox/maps-android @mapbox/navigation-api
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先比较 Router.kt、MapboxDirections.java 和内部的 RouteUrl.kt 实现,然后检查 issue 中展示的模块依赖关系图。确定如何在不将网络依赖引入 Offline Router 的情况下独立使用共享的路线 URL 行为;当两种 router 类型都能使用共享 provider,且 service-core 接口保持不变时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android, java
- 领域
- api, build-system
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100