stadiamaps / ferrostar

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

Generic distance formatting protocol #75

Closed ianthetechie closed 1 month ago

ianthetechie commented 1 month ago

Background

          Minor: Not sure if it's an issue, but this requires the view to have some "smarts" and that feels a tiny bit wrong. Feels like we should be able to have an `MKDistanceFormatter` at a higher level that gets configured once rather than creating one every time we re-compute a `ManeuverInstructionView`.

_Originally posted by @ianthetechie in https://github.com/stadiamaps/ferrostar/pull/71#discussion_r1542292427_

Resolution

Discussed on slack; we'll make a generic protocol for distance formatters and allow one to be set by the user for greater configurability.

ianthetechie commented 1 month ago

Fixed; we now use Formatter for iOS.