feat(Google Maps): Adding headers on the Google Maps Request for On-demand Rides and Deliveries (ODRD)
Feature Description
There's a new Google Maps Solution: On-demand Rides and Deliveries. And, there's a requirement for adding a header on the Google Maps Request to register the specific request, not as a normal Google Maps API call, but as an ODRD call.
I am trying to add this header
X-Goog-Maps-Experience-ID: <tripID>
Reference is on this one is https://developers.google.com/maps/documentation/transportation-logistics-terms/on-demand-rides-deliveries-solution/managing-trips#_making_calls
This may be a feature request as I haven't seen implementation on this one.
Use Case
- This will enable to route Google Maps Platform calls to ODRD calls. Thus, the billing set to be on Google Maps API will be changed to
- This is overall on the implementation of On-demand Rides and Deliveries solution.
Hello @xiandalisay ,
The @angular/google-maps package implements the Google Maps JavaScript API. If there is something in the Google Maps JavaScript API that is not implemented please file a bug here. For improvements with the Google Maps JavaScript API, the best place to file that is with the Google Maps JavaScript API itself.
-Zach
Hello @xiandalisay ,
I may have resolved this issue prematurely :). Generally, we accept feature requests that can clearly be implemented with the Google Maps JavaScript API.
I noticed that there is a class in the javascript API that takes a tripId: https://developers.google.com/maps/documentation/javascript/reference/journey-sharing-trip-and-order-progress. Could you please let me know if it meets your needs? Then we can decide if we should move forward with this feature request.
-Zach
@zarend I was able to do this by adding @types/google.maps on the google maps and having the apiVersion as beta.
const loader = new Loader({
// Replace with your API key
apiKey: "YOUR_API_KEY",
version: "beta",
// @ts-ignore
libraries: ["map"],
});
Upon loading of the map, I added the header.
loader
.load()
.then((google) => {
google.maps.Settings.getInstance().experienceIds = [this.tripId];
});
Thanks for the support!
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.