[android][ios][carplay][android-auto] Show speed limit sign on all platforms #952
Labels
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference: organicmaps/organicmaps-tmp#952
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If the speed limit is known it'd be nice to be able to see it.
Upvote & Fund
Even better would be an easy and convenient way to add/improve speed limits along the way :)
EStimation of Arrival Time should be based on speed limit
Not every road in OSM has existing speed limit tag set. During the ride you may see the (probably outdated) speed limit, then see nothing. And then see a speed limit again.
Is it not?
as speed limit does not show I cannot tell it for sure, but my impression is that estimation is wrong in town
Remind me of a time in Iceland where the estimated time of a trip was 1h30, but Google Maps was giving me 2h30... Guess who was right...
I guess if speed limit is not known, it could give an average or a way to update OSM speed limit directly into the app?
In my opinion, the algorithm must be smarter than just calculating the estimated time based on the speed limits. One will simply never reach the destination in the time given by the speed limit in a residential area. Simply hit one traffic light and you're already off. The traffic lights make a huge difference, apart from the traffic itself. I'm often surprised by the 20-minute estimates when the actual ride to the town takes over one and half hours.
Other than that - please - the speed limit is quite important in the city. Where I live, there is a entangled mix of limits with 30, 50, 70+ speed limits and the signs are not always there. I'm not sure where the OSM guys get that data but I would never figured it out just by looking at the traffic signs. And that is an information overload when in a different town.
Adding the speed limits to OSM through the app would be great but even just showing it in the navigation mode would be a great improvement (would actually make me use the app for navigation).
Edit: elements that affect the travel speed under normal conditions:
Are you sure OSM has speed limit data for those roads? There were a couple highways in between two towns that I often routed between that didn't have
maxspeed
set, and as a result OsmAnd took me on some weird routes with completely inaccurate ETAs. That sounds like it's assuming 100 km/h on 30-50 km/h roads or something.Maybe it would be possible to incorporate implicit default speed limits database: https://wiki.openstreetmap.org/wiki/Default_speed_limits
Biggest question if, does map processor "knows" if road is urban (within place area) or rural using OSM data?
You can here OSM map here, where each road is marked with it's speed limit (if info is present):

https://www.openstreetbrowser.org/#map=17/50.07620/19.89539&categories=car_maxspeed
You can easily add speed limit there if no info is present.
@biodranik so, why not to show the speed limit from OSM data?
Perhaps the title should be adjusted to narrow down to showing the speed limit in navigation mode? It would really help driving in the city. Especially now that the routing feel better and the routes are different (and seem better) to other apps that I have, but which also use OSM data.
Also, if you sort the issues by the number of 👍s, this is the most up-voted issue.
@AntonM030481 implement it ) it was partially done already.
If a speed limit is known, it should be shown :)
The data might be outdated, but this argument is also true for other parts of the map:
Closed roads, exits, new lanes, new crossings...
If someone notice wrong data, the person is at least able to correct it. (Or making a note on osm)
@biodranik challenge accepted 😄
The problem is what to show when the speed limit is not known. An empty circle? A guess?
Nothing?
Waze does it like this:

If speed limit is unknown - red circle is not shown.
Maybe a transparent, gayish circle with "?" inside of it, but maybe better just don't show it.
See https://wiki.openstreetmap.org/wiki/Key:zone:traffic and https://wiki.openstreetmap.org/wiki/Key:zone:maxspeed
Also look at relations like https://www.openstreetmap.org/relation/8131479 that define default values like access restrictions and maxspeed for a country.
How to implement it and what at all - I don't know.
And to add a last link: https://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Maxspeed
It's a different version of the link that already got posted but it might still be helpful.
Yeah, this is really good to be displayed on screen if you use navi abroad (traveling, etc), pretty please? :)
@AntonM030481 what stops you from implementing it? Is it lack of free time or you still haven't decided on how it should look (style, size etc.)? If the latter here's my opinion with rationale:
@pm4rcin I had implemented basic text version for iOS several releases ago.
But I don't have enough experience yet to upgrade it to graphics and port to Android.
Is there a way to use the text version, i.e. in a format [current speed/speed limit] or similar? The need for seeing this information is relatively high, irrespective of the presentation of it. A visual speed-limit sign would be nice but having the information on the dashboard is a priority. If the feature is waiting for nice graphics I'd be all up for having whatever is available right now, and let the work on the visuals happen later.
You can check organicmaps/organicmaps#2963 and implement the same for Android.
Not so simple, unfortunately. It seems that the ObjectC code for iPhone has direct access to the FollowingInfo class, which contains the speed limit information in m_speedLimitMps, whereas in Android it goes through JNI.
There is a problem when I'm, in
Framework.cpp
, methodJava_app_organicmaps_Framework_nativeGetRouteFollowingInfo
trying to passinfo.m_speedLimitMps
to the constructor forRoutingInfo
. Always getting an Abort in native code so I don't see in the debugger what's the problem is. I've added the parameter to the RoutingInfo constructor. And there is already another double value,m_completionPercent
, being used directly, without any type conversions.If I set the speedLimit to be String and try to pass it as
jni::ToJavaString(env, info.m_speedLimitMps)
, I get something like "no ToJavaString method available", even though it is used several times in the same instruction without problem. There's something with accessing the speed limit field. I have not worked with JNI and NDK directly before so I'm not sure how this works exactly.On Android, the reason for the error/abort is always printed in the log. You can also setup JNI debugger in Android Studio:
https://developer.android.com/studio/debug
Thanks for the tip! I did not really understand the obscure syntax for GetConstructorID, it seems.
Continuing in #3817.
Now that the #3817 is more-or-less in place, I see two suggestions:
These can be created and discussed as separate issues, I believe.
Additional suggestions:
Not sure if it's easy to distinguish if your'e in city or not?
Maybe show table of speed limits, like ones you see when crossing boarder, showing speed limits for cities, higways, motorways, etc..? Though that might be not that easy to specify too...?
I think its perfectly doable. Osm usually uses administrative bounderies for countries, states, cities... so you need to do 3 things: 1. check if your position is within such an area. 2. During driving check if you cross an administrative boundary (to update rules). 3. Set the information in relation to the road type. For example highways "within" might have no limit.
The needed algo might be already there.
Default limit is not a good idea because it's not like city boundary is the same as the Urban speed limit boundary. In Poland we have green signs for city boundary but the white sings aka Urban area are separate so you can be in the city boundary but outside Urban area (it usually means there aren't homes and pedestrian ways nearby (simplified definition)). Better idea is to add speed limits to missing roads. To view them check Anton's link.
Good point. In Lithuania, blue signs means there's no city limit while crossing urban area, white signs means you go at 50.