OneBusAway / onebusaway-android

The official Android app for OneBusAway
http://www.onebusaway.org/
Other
475 stars 292 forks source link

Highlight starred stops on map #680

Open barbeau opened 8 years ago

barbeau commented 8 years ago

Summary:

From user:

It would be neat to highlight starred stops on the map. When I'm scrolling around a crowded section of the map, that would help me orient / locate more quickly.

OBA iOS now has a feature that shows stop icons a different color if they are starred - see https://github.com/OneBusAway/onebusaway-iphone/pull/569 for details - screenshot is below showing yellow-highlighted stops for favorites.

image

We may need to be careful with performance here, as currently all stops in the StopOverlay are held in memory as elements returned directly from the OBA REST API. To check if a particular stop is a starred stop, we need to pull that info from the local database. If we do this synchronously while the stops are being added to the map, it could cause slow-down, and the map can already be pretty sluggish at high zoom levels due to Google Maps v2 behavior. We should benchmark to make sure we're not adding to the problem. An option is to do the marking of favorites asynchronously after the makers are added to the map, and just update the image via Marker.setIcon().

Steps to reproduce:

  1. Go to "Nearby" view to show stops on the map, and hover over a stop you have starred

Expected behavior:

Have a different icon than an unstarred stop

Observed behavior:

Starred and unstarred stops look the same on the map

Device and Android version:

N/A

Screenshots:

See above for implementation on iOS.

barbeau commented 4 years ago

Newest iOS UI for this feature is at https://github.com/OneBusAway/OBAKit/pull/254#issuecomment-661960035

image