stadiamaps / ferrostar

A FOSS navigation SDK built from the ground up for the future
https://stadiamaps.github.io/ferrostar/
Other
184 stars 24 forks source link

Add a speedometer widget #247

Open ianthetechie opened 2 months ago

ianthetechie commented 2 months ago

This should display the user's current speed (which we should be getting from GPS), when it is available.

We had a prospective user say this was a hard requirement for them, and they are migrating from some archaic Mapbox SDKs. I have not personally used this, so I don't have a good intuition for what it should look like and how it interacts with the speed limit view that we already have.

I'll push for some better definition, but in the meantime, perhaps @Archdoog or @haysmike have some opinions / screenshots / mockups to share (be sure to note source and license if it's not a permissive one so we don't accidentally run into issues).

Archdoog commented 2 months ago

If we wanted a built in method, we should probably attach it to the speed limit signs like several navigation apps do (e.g. Google Maps, Mapbox Navigation, etc). It could be customizable in the default view where you you can configure:

enum SpeedView {
    case speedAndLimit
    case limit
    case speed
}

As an aside, I would also say this is also extremely easy to build on their own once we surface a formatted speed value. A significant number of navigation apps have their own customized widget for this. (e.g. Waze). I've already got a bespoke speedometer in my app that's part of a custom arrival view. Last note here, it should be very easy to place this on the navigation views using the empty grid spots.

ianthetechie commented 4 weeks ago

Yeah, I've been looking around at other designs and rather like the option to have a speedometer "attached" with the speed limit sign if desired. I'll whip up something for this next week since it's probably pretty easy.

ianthetechie commented 1 week ago

See https://github.com/stadiamaps/ferrostar/pull/360#discussion_r1847505234 for Android ideas. We'll eventually incorporate this probably.

Note from @Archdoog: there may be an issue with GPS updates never delivering a "zero" speed update when you stop. Needs further investigation. Currently observed on Android; unsure of iOS.