wtg / Shuttle-Tracker-SwiftUI

Rensselaer campus shuttle tracker
https://shuttletracker.app
Mozilla Public License 2.0
9 stars 2 forks source link

Avoid recreating bus annotations when the coordinates don’t change #11

Closed Gerzer closed 2 years ago

Gerzer commented 3 years ago

Currently, the bus annotations on the map are recreated every time new data are fetched from the server, even if those new data are exactly the same. This means that if the map updates while a bus annotation is in its "selected" state, then it automatically reverts to its "unselected" state, which is undesirable. Bus annotations should be recreated only when the relevant resolved lat-long coordinate pair actually changes.