HikeMate / hikeMateApp

3 stars 1 forks source link

Address the Date Line problem in the hike details screen and list of hikes repository #202

Open rBergCode opened 5 hours ago

rBergCode commented 5 hours ago

The hike details screen uses some computations with latitude and longitude to find out where the hike to display is centered, so that the map can show the whole hike and be centered on it.

The current computations do not handle edge cases very well though. For example, suppose we have a minimum longitude of -11 and a maximum longitude of 170, the algorithm apparently won't do very well to find the center of this. Further, our Bounds class does not handle these cases at all.

So, our proposed solution is to filter out these hikes when the API gets them.

rBergCode commented 5 hours ago

Note that searching on the date line makes the app crash. I will try to implement some logic to permit searching there.