I need to force OSRM to switch the language in road.mNodes.mInstructions to English in order to work with English TTS. How do I achieve that in Kotlin? I'm using OSRMRoadManager from OSMBonusPack.
How do I select a language in OSRM's RoadManager
203 Views Asked by tymwitko At
2
There are 2 best solutions below
0
MKer
On
I don't see an obvious answer. Basically, you need to change the way DIRECTIONS hashmap is initialized.
Suggestion : you could subclass OSRMRoadManager, adapting buildInstructions(int maneuver, String roadName), to use your own DIRECTIONS object.
If you see a simple change to do inside the lib (adding a "language" option somewhere), don't hesitate to push a PR.
Related Questions in JAVA
- I need the BIRT.war that is compatible with Java 17 and Tomcat 10
- Creating global Class holder
- No method found for class java.lang.String in Kafka
- Issue edit a jtable with a pictures
- getting error when trying to launch kotlin jar file that use supabase "java.lang.NoClassDefFoundError"
- Does the && (logical AND) operator have a higher precedence than || (logical OR) operator in Java?
- Mixed color rendering in a JTable
- HTTPS configuration in Spring Boot, server returning timeout
- How to use Layout to create textfields which dont increase in size?
- Function for making the code wait in javafx
- How to create beans of the same class for multiple template parameters in Spring
- How could you print a specific String from an array with the values of an array from a double array on the same line, using iteration to print all?
- org.telegram.telegrambots.meta.exceptions.TelegramApiException: Bot token and username can't be empty
- Accessing Secret Variables in Classic Pipelines through Java app in Azure DevOps
- Postgres && statement Error in Mybatis Mapper?
Related Questions in KOTLIN
- getting error when trying to launch kotlin jar file that use supabase "java.lang.NoClassDefFoundError"
- ussd reader in Recket Native module
- making android analyze with coverity sast tool
- Jooq - Insert does not update object with generated id
- Doesn't work TrafficStats.clearThreadStatsTag() in Kotlin
- Difference between map and function returning when in Kotlin
- Every Time i run the app it gives me an error related to gradle
- How Do I Create A Path In The pubspec.yaml File?
- Android jetpack compose webview, image selector not works
- Why doesn't CIOEngine have a dispatcher in kotlin script?
- preventing duplicate text
- onCompletion(mp: MediaPlayer?) is unintentionally called after USB storage is connected
- When using a Room database on an Android application, is it possible to pre-populate data
- Jetpack compose - how I can hookup LiveData property from ViewModel with TextField in activity?
- Failed to getEnergyData
Related Questions in OSMDROID
- OSMDROID: load offline tiles from database
- Osmdroid Cache Location Not Respecting Config
- Could the OSMBonusPack work on an Open Sea Map-project?
- how to remove overlays from mapview with index in osmdroid?
- OsmDroid make on cluster clicklistener
- Fragment - TileLoader failed to load tile due to mWriter being null (Message displayed after onPause and onResume)
- using osmdroid in a jetpack compose project
- OSMDroid: how do I set a fixed layer alpha?
- How to implement OsmdroidMap Android?
- OSMDroid - Cannot navigate to a fragment after clicking on a marker
- osmdroid map disappears after switchings tabs
- Osmdroid disable map rotation
- Create a map using openstreetmap with jetpack compose in Kotlin programming language for Android
- (Android/Kotlin) OpenStreetMap - Public Transport OSMdroid
- Handling configuration changes in OSMDroid + Jetpack Compose
Related Questions in OSRM
- confirm route button not working but cancel button is
- osrm's response order after consecutive requests in a short time
- Specifying bearings doesn't provide the routes in the same direction
- When to use the maneuver and the lane information from OSRM?
- Running osrm-frontend docker failing due to syntax error in Micromatch
- How to Enforce a Specific Starting Point for a Vehicle in VROOM
- Real time map matching
- OSRM snap to road is not working in some cases
- OSRM and car.lua change (problem to adapt)
- Passing values from multiple lists through an API
- Calculate the travel time on foot between two coordinates with R and OpenStreetMap (OSM)
- Use OSRM and OVERPASS as extern memory o postprocess tracks?
- Connection Timeouts on OSRM Server
- Get the name of a street and maxspeed given a node id
- Inaccurate output of OSRM match service
Related Questions in OSMBONUSPACK
- Osmdroid how to move position marker in animative way with animateTo function
- Osmbonuspack : marker's onDoubleTap function not working when adding the markers in RadiusMarkerClusterer
- Why androidx.appcompat.widget.AppCompatEditText cannot be cast to com.google.android.material.textfield.TextInputEditText?
- Custom Marker in RadiusMarkerClusterer
- OSMDroid Points of interest using multiple facilities
- Creating URL based on an API key in OSRMRoadManager
- How do I select a language in OSRM's RoadManager
- Failed to resolve: com.github.MKergall:osmbonuspack:6.7.0 #410
- osmbonuspack: unable to assign each marker its own style in kml structure
- Reasons for using OSMBonusPack versus OSRM (Open Source Routing Machine)?
- OSM Bonus Pack - OSRMRoadManager::getRoad: request failed
- customized icon in osmdroid marker android
- How do I Stop a running runOnUiThread Runnable
- Display multiple InfoWindows using osmdroid
- osmdroid zoomToBoundingBox not zooming to boundingBox coordinates
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I've actually managed to find a workaround which suits my needs, without needing to subclass OSRMRoadManager and all that. For anyone with the same problem - I've switched the language using Locale, as shown here. Nevertheless, I think it's probably something that should be in OSMBonusPack as an option, in case one wants to preserve the default language in some other parts of the app. I can try looking into the lib myself.