mapbox / mapbox/MapboxGeocoder.swift
Read API base URL from Info.plist
还没有人认领这个 Issue。
- 主要语言
- Swift
- 星标
- 133
- 派生
- 46
- PR 合并指标
- 30 天内没有已合并 PR
描述
If no host is passed into Geocoder(accessToken:host:), the fallback hostname should be either api.mapbox.com or api.mapbox.cn depending on the value of MGLMapboxAPIBaseURL in Info.plist:
This would be consistent with how we read the access token out of Info.plist:
This will make it easier for developers to keep their map and geocoder usage in sync, since Geocoder.shared would automatically pick up the API endpoint specified in Info.plist. Developers who need a different value for the geocoder can still override the API base URL when creating a separate Geocoder instance.
/cc @pdgoodman
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 MapboxGeocoder/MBGeocoder.swift 第 147-154 行附近开始,将 Info.plist 中现有的 access-token 查找与回退 host 逻辑进行比较。当省略 host 时从 MGLMapboxAPIBaseURL 选择 api.mapbox.com 或 api.mapbox.cn,而显式提供的 host 仍然作为覆盖值时,修改就完成了。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- swift
- 领域
- mobile-dev
- Issue 类型
- 功能
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 35/100