Repository navigation
[NMA-1036 In progress] Explore Dash physical search results - #804
Conversation
Replaced callback based approach in the sync worker with more object oriented one
fix: the issue with BaseDao.clear() method
|
|
||
| defaultConfig { | ||
| minSdkVersion 19 | ||
| minSdkVersion 23 |
There was a problem hiding this comment.
excellent. This branch was left out of my Andriod 6 minimum PR's.
| const val METERS_IN_MILE = 1609.344 | ||
| const val METERS_IN_KILOMETER = 1000.0 |
There was a problem hiding this comment.
so internally distances will be in meters? And the user will be seeing km or miles?
There was a problem hiding this comment.
Yes, internally we should keep everything in metric because it's used in most of map and location APIs. The switch should only happen on the higher level (the ViewModel) to avoid doing conversions all over the place. Right now switching isn't implemented yet and the user sees miles.
| if (results.isNotEmpty()) { | ||
| // if (results.size < 20) { | ||
| setMarkers(results) | ||
| // } else setMarkers(results.shuffled().subList(0, 20)) | ||
| } |
There was a problem hiding this comment.
is this displaying all markers for thousands of stores, or is results already filtered in some way to limit the number.
There was a problem hiding this comment.
The results are limited by min(screen bounds, chosen radius). It still means there can be a couple of thousand points shown in big cities when you zoom out. I have left a suggestion to limit this further in NMA-785.
| false | ||
| } else { | ||
| // TODO: this can be moved to the viewModel, which will allow to write a test for it. | ||
| // Also, it might be better to set Id or Tag of the marker to the Id |
There was a problem hiding this comment.
I agree with using tags to handle clicks on markers
| .asBitmap() | ||
| .load(it.logoLocation) | ||
| .placeholder(R.drawable.ic_merchant) | ||
| .error(R.drawable.ic_merchant) // TODO: do we need this here given that placeholder is set below? It's a bit confusing |
There was a problem hiding this comment.
Given that the placeholder and error drawables are the same, I agree, we don't need to duplicated this
This PR unblocks map-related stories for the explore-dash (specifically NMA-785)
Issue being fixed or feature implemented
Changes related to the map:
Related PR's and Dependencies
Screenshots / Videos
How Has This Been Tested?
Checklist: