Therein lies the problem, the user should not provide the coordinates, but write in the search. I am beginner, sorry, but I've read the documentation and could not find what I want. I understand that I will have to make an appointment with the REST API and with it get the return of latitude and longitude, and only then finding the distance somehow still do not know well.
I need not just mount a route, this is easy. I need is to get the distance, as if somehow API shows the distance that exists when you ride the route, must have some way of obtela so I can use this data.