googlemaps / googlemaps/google-maps-services-java
GeoApiContext - Mobility - Failed to set the trip ID (Mobility Solution) via .experienceIdHeaderValue()
- 主要語言
- Java
- 星號
- 1.8k
- 分支
- 973
- PR 合併指標
- 30 天內沒有已合併 PR
描述
#### Environment details
Library version: 2.2.0
#### Steps to reproduce
We are going to manage trips for our mobility project and referring [this documentation](https://developers.google.com/maps/documentation/transportation-logistics-terms/on-demand-rides-deliveries-solution/managing-trips#java_example_2) to report the trip IDs (aka Experience IDs) but failed. It seems like there is no such method **experienceIdHeaderValue**. I created a GMP support ticket before but they asked me to report this issue here. Could you help on this?
Meanwhile, we'd like to know if we are allowed to set GMP request header for tripID by our own via the following part,


Please find our screencaps for the **experienceIdHeaderValue** part in the attachment.
>>Translation of the image
_Java: cannot find symbol
symbol: method experienceIdHeaderValue(java.lang.String)
location: class com.google.maps.GeoApiContext.Builder_
#### Code example
```Java
GeoApiContext context = new GeoApiContext.Builder()
.apiKey("AIza...")
.experienceIdHeaderValue("MCN-99a692...")
.build();
GeocodingResult[] results = GeocodingApi.geocode(context,
"1600 Amphitheatre Parkway Mountain View, CA 94043").await();
Gson gson = new GsonBuilder().setPrettyPrinting().create();
System.out.println(gson.toJson(results[0].addressComponents));
```
Thanks in advance.
Best Regards,
Sisi
貢獻指南
研究方向
先從報告中展示的 GeoApiContext.Builder 和 RequestHandler 介面開始,然後針對程式庫版本 2.2.0 重現缺少的 experienceIdHeaderValue() 呼叫。將用戶端 API 與連結的 Mobility 文件進行比較,並判斷是否支援 trip ID 標頭;當明確確立支援的用法或所需的程式庫變更後,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- api
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100