Is it possible to update the Audio Advice returned to Navigation to use Imperial units (miles and feet)?

When playing an Audio Advice in navigation mode using the Android SKMaps SDK (v2.5), can the advice be updated prior to its release to reflect the Imperial / American Standard and not Metric?

Looking at the audio files that come with the SDK I can see pre-recorded files representing imperial units, but I can't find a method in the documentation that shows how to update this.

The closest I can find is getAdviceList () , which allows you to specify SKDistanceUnitType for generating visual advice texts, however I don't see anything in SKAdvisorSettings (sorry for missing link, this is a new account that doesn't allow more than 2 links in a post). which will allow me to change the way the Audio Advice is output.

Does anyone have any idea how this can be done? Thanks for any help!

-Keith

+3


source to share


2 answers


After seeing SylviA's post on this question, I dug a little deeper into the getAdviceList () method and noticed that although he called his own function this.setmeasurementunit () to keep the distance type passed to the method, it still wasn't reflective of the sound and text being displayed in navigation mode.

The returned object List<SKRouteAdvice>

did show units in Imperial, but after starting navigation, the tips returned to the metric.

After a while, I found another method in the SKNavigationSettings class called setDistanceUnit that solved my problem.



SKNavigationSettings navSettings = new SKNavigationSettings();
navSettings.setDistanceUnit(SKMaps.SKDistanceUnitType.DISTANCE_UNIT_MILES_FEET);
...
navManager.startNavigation(navSettings);

      

After making this change, make sure that both the audio and text returned in navigation mode are used by me by Imperial / US Standard.

Hope this helps, and thanks again for SylviA's post that led me to this implementation.

+2


source


In the onRouteCalculationCompleted method , paste the following code:SKRouteManager.getInstance().getAdviceList(routeInfo.getRouteID(), SKMaps.SKDistanceUnitType.DISTANCE_UNIT_MILES_FEET);



+1


source







All Articles