cyclestreets / android

The Android app brings CycleStreets routing and turn-by-turn live navigation to your phone.
https://www.cyclestreets.net/mobile/android/
GNU General Public License v3.0
212 stars 215 forks source link

POIs - Use Bounding Box API instead of Radius API #81

Open si-the-pie opened 10 years ago

si-the-pie commented 10 years ago

Based on our access logs it looks as though the Android app might be requesting points of interest using metres for the radius argument, rather than km.

GET /api/pois.xml?key=&type=racetracks&longitude=-2.906913&latitude=55.54359&radius=85066&limit=150 HTTP/1.1" 200 24563 "-" "CycleStreets Android/1.0"

The effect of that is a slower query as it currently searches a vast area, measuring the distance of each.

si-the-pie commented 10 years ago

Also, I think you should use the bounding box method, providing n, s, e, w rather than latitude, longitude, radius. At the moment if I select bus stops and zoom out I eventually see a big clump of icons around the middle of the screen. The bounding box method will spread them out.

http://www.cyclestreets.net/api/pois/.

oliverlockwood commented 5 years ago

@si-the-pie @mvl22 is this issue still as described?

(I can see from the code that we're still using the radius mechanism rather than bounding box, but it looks to me from https://github.com/cyclestreets/android/blob/master/libraries/cyclestreets-view/src/main/java/net/cyclestreets/views/overlay/POIOverlay.java#L337 that we're dividing into km.)

mvl22 commented 5 years ago

@si-the-pie Can you check.

oliverlockwood commented 5 years ago

@si-the-pie ping

si-the-pie commented 5 years ago

Yes, I can confirm that the radius being sent to the api is in km.

oliverlockwood commented 5 years ago

Thanks @si-the-pie.

Reopening this to consider the secondary aspect: moving to the Bounding Box API rather than the Radius API.