Hi, I am trying to find a way to save the waypoint data of a direction route to an entity. is it possible for googlemaps library to return the "overview_path" and save it to an entity
or are there other ways for me to save and show the waypoint data like an entity?
You could extend the Google Maps library in another script to return the data to you. This would be a much cleaner approach as avoids making changes inside of the Google library code to get the data you need. A google search below shows that you should be able to fetch the overview data you are looking for using its various API services:
The best way to store the data in an entity could be either to call a client/screen action asynchronously that saves the data to the entity or to make a request to a custom REST API end point to save the data to your entity using the JS `fetch` function and return the result back to you via a promise so the request is asynchronous and doesn't block the main thread.
This details how to call client actions asynchronously:
https://success.outsystems.com/documentation/11/integration_with_external_systems/javascript/defining_asynchronous_javascript_code/
Personally I think calling a client action would be a lot cleaner and saves you having to setup a custom REST API. You would need to refresh your data on the client side though once your action has returned with success if you are storing those paths anywhere and need it to persist in the JS application.
Hope this helps