apps-android-commons icon indicating copy to clipboard operation
apps-android-commons copied to clipboard

Nearby: Load pins as I move the screen, cache pins, remove "search this area" button

Open nicolas-raoul opened this issue 1 year ago • 4 comments
trafficstars

Currently, when you move the map in Nearby, you have to tap "search this area" to load the pins in the area you moved the map to.

It would be more user friendly to automatically load the pins (like Wikishootme does).

Our queries take more time than Wikishootme because we load more information about each point. To avoid losing the already loaded pins (which probably are close to where I am, and thus will probably be shown in the map again shortly afterwards), each pin should be cached in the local database, with its attributes (label, class, latitude/longitude, Wikipedia URL, needs photo or not, exists or not, etc) and also the timestamp it were fetched.

Cache invalidation:

  • Once a day, the cached pins whose timestamp is more than 7 days in the past should be removed from the cache.
  • Every time the user initiates an upload from Nearby, the pin it came from should be removed from cache (no need to wait for the upload to finish if that makes implementation complex).

nicolas-raoul avatar Mar 27 '24 14:03 nicolas-raoul

@nicolas-raoul this will greatly enhance the Nearby feature, I am currently working on Nearby, I would love to take this task as well, can I work on this?

shashankiitbhu avatar Mar 27 '24 15:03 shashankiitbhu

Hey @shashankiitbhu, I think we should work on https://github.com/commons-app/apps-android-commons/issues/4560 first than working on this issue. Otherwise this issue will make things much expensive. Also this issue is now part of GSoC project. How about leaving this for GSoC ?

kanahia1 avatar Mar 27 '24 16:03 kanahia1

Hey @shashankiitbhu, I think we should work on https://github.com/commons-app/apps-android-commons/issues/4560 first than working on this issue. Otherwise this issue will make things much expensive. Also this issue is now part of GSoC project. How about leaving this for GSoC ?

Sorry , Just Checked it on Phabricator, Leaving it For GSOC

shashankiitbhu avatar Mar 27 '24 16:03 shashankiitbhu

@kanahia1 It's better do both together in a GSOC , I agree that the mentioned task should be done first

shashankiitbhu avatar Mar 27 '24 16:03 shashankiitbhu

@nicolas-raoul, would we want to cache the pins only within a specific radius around the user or cache all loaded pins? Also, shouldn't we invalidate the cached pins if the current user location changes by a significant distance (for ex, before and after giving location permission, the location changes from default to the current location)?

ShashwatKedia avatar Mar 28 '24 13:03 ShashwatKedia

I think we should cache everything, irrespective of distance. The data is light, I don't think it will ever go over 10 MB.

nicolas-raoul avatar Mar 28 '24 13:03 nicolas-raoul