You choose the city, enter 2 addresses and calculator counts kilometer. How can this be implemented? And in general, is it really?
If the customer is ready to display the data on the map, then you can get the address using the Sage https: //Tech.yandex.ru/maps/jsbox/2.1/suggest , build a route on the map using an example https://tech.yandex.ru/maps/jsbox/2.1/multiroute_Data_Access and get the length of the route.
If without a card, then the second item is changing on an HTTP request, which you can read here: https://tech.yandex.ru/routing/router/?from=mapsapi
In general, really. Probably the interface will still differ, since both Yandex Maps and Google Maps require addressing addresses along with the city.
You will need a geocoding API, for example Google Geocoding API . You send a request containing the address and the service returns you to the coordinates.
Then, with, for example, Gaversinus Formulas You calculate the distance between two points specified by your coordinates.
In this case, we are talking about calculating the smallest distance, that is, the lengths of the arc connecting two points. If we are talking about building a route, here you will help Direction API . Google or Yandex can build several routes immediately, their length can be different.