I want to use GoogleMap for car navigation.

Asked 2 years ago, Updated 2 years ago, 63 views

We are investigating whether the Android app can enable the navigation function using GoogleMap.

The route from the current location to the destination was obtained through Google's route search API.
Because of the latitude and longitude of the route, I was able to draw a line on the map using it.

When I go to my destination, I want to draw a line in a different color, but I don't know how to do it.I don't know how to find the latitude and longitude of the current location on the route.

I'd like to use List<LatLng> to get the route from the starting point to the N-meter point in List<LatLng>.

Could you tell me how to request it?

Thank you for your cooperation.

android

2022-09-30 21:34

1 Answers

Selfless.

By using the functions computeHeading() and computeOffset() of the android-maps-utils SphericalUtil class provided by Google, we were able to obtain coordinate arrays from the starting point to the specified distance!


2022-09-30 21:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.