Answer the question
In order to leave comments, you need to log in
How to build a route from current location to latitude, longitude?
Hello, tell me how to make it so that it does not show me a point by coordinates, but builds a route from the current location to latitude, longitude. At the moment I have done this:
private void showMap(Uri geoLocation) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(geoLocation);
if (intent.resolveActivity(getPackageManager()) != null) {
startActivity(intent);
}
}
I need the user to click on the button and he was asked to choose which map to open, after: from the current location to the selected point, he would build a route
Uri.parse("geo:" + latitude + "," + longitude);
Answer the question
In order to leave comments, you need to log in
As far as I know, there is no generally accepted scheme for routes. That is, such an intent cannot be built. It is possible to look in PackageManager'e, what applications are, for the most popular cartographic do everything by hand.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question