googlemaps / googlemaps/google-maps-services-java

GeoApiContext - Mobility - Failed to set the trip ID (Mobility Solution) via .experienceIdHeaderValue()

Đang mở
#993 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
triage me type: bug
Ngôn ngữ chính
Java
Star
1.8k
Fork
973
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

#### 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,
![Client Libraries_GeoApiContext_RequestHandler](https://github.com/googlemaps/google-maps-services-java/assets/68408504/d63e358b-1f56-4cd5-8fed-755f805fd63e)
![Client Libraries_GeoApiContext_RequestHandler_interface](https://github.com/googlemaps/google-maps-services-java/assets/68408504/a486a91c-2087-4932-bd06-9f1676e8f511)

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_
error when compiling the code for experienceIdHeaderValue
implement_cannot_find_experienceIdHeaderValue
ref_current_version
failed to retrieve experienceIdHeaderValue in github

#### 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.