Instanciate Mapchart without using web component

Is it possible to instanciate Map chart without using Web component.
I need to calculate the distance between two places.
I want to achieve this whiteout showing the map.

Hi,

you can just use the Google Maps API directly: Get started with the Distance Matrix API  |  Google Developers. There is an official java API client from google: GitHub - googlemaps/google-maps-services-java: Java client library for Google Maps API Web Services

Bye
Mario

Yes. I found the Java Client and has installed the maven repository.
Have written the code based on some examples.
It works as expected.
I will share my code and steps here at the forum.