OneBusAway / onebusaway-iphone

OBA development has moved!
https://github.com/OneBusAway/OBAKit
Apache License 2.0
219 stars 117 forks source link

search not working when far from current location #1456

Closed alanb2718 closed 4 years ago

alanb2718 commented 5 years ago

Search is working OK for Puget Sound. However, when I try to do a search for a route or stop in other regions the map says "No stops at this location", even though there are. I tried San Diego, Tampa, and Spokane, with the same result.

The two screenshots show this for Tampa. The first image shows the map for a randomly chosen stop (Marion St @ Zack St). Routes 8 and 20 stop there. Then, keeping the map at the same location, I search for route 8, and get the second image, which says "No stops at this location" even though clearly there are.

The same thing happens for searching for a stop number. App 19.1.0, running on an iPhone 7, iOS version 13.1.3

IMG_3006

IMG_3007

barbeau commented 5 years ago

This sounds similar to an issue we had on Android. IIRC, search uses the stops-for-location and routes-for-location API endpoints, which requires a radius for search from a location. If your real-time location is always used, then search for other regions never returns results because the results are all outside the typical radius being used. IIRC we fixed this on Android by using the map view center as the search point if the real-time location was a large distance away from the map view center.

alanb2718 commented 5 years ago

That sounds a good diagnosis! I changed the title to be clearer about the issue.