Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clip offline tiles to downloaded bounds #1852

Merged
merged 41 commits into from
Sep 11, 2023
Merged
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
b6f72cd
Remove unused enum
gino-m Sep 7, 2023
ec7e4e8
WIP
gino-m Sep 7, 2023
af92c01
Update string resources
gino-m Sep 8, 2023
56e2142
Fix detekt error
gino-m Sep 8, 2023
46c86e7
Fix typo
gino-m Sep 8, 2023
e157b29
Rename
gino-m Sep 8, 2023
a70528e
Refactor
gino-m Sep 8, 2023
76b1c0c
Refactor
gino-m Sep 8, 2023
b1a3d25
Offline area map selector mask and outline
gino-m Sep 8, 2023
8d92280
Merge branch 'master' of https://github.com/google/ground-android int…
gino-m Sep 8, 2023
234cb85
Update Cancel and Download layout
gino-m Sep 8, 2023
d031b27
Merge branch 'gino-m/1822/3' into gino-m/1822/1
gino-m Sep 8, 2023
1fd58f9
Remove unused resource
gino-m Sep 8, 2023
2fdce91
Merge branch 'gino-m/1822/3' into gino-m/1822/1
gino-m Sep 8, 2023
9c85437
Merge offline area estimator with latest UI
gino-m Sep 8, 2023
6f7a998
Merge branch 'master' of https://github.com/google/ground-android int…
gino-m Sep 8, 2023
71ed1a7
Fix force quit
gino-m Sep 8, 2023
30ef18e
Remove Apache Commons dep
gino-m Sep 9, 2023
f10dc51
Impl local offline area flow
gino-m Sep 9, 2023
9e82aad
Apply constructor method pattern to TileSource creation
gino-m Sep 9, 2023
d1f2463
Docs tweaks
gino-m Sep 9, 2023
6ab7e45
Merge branch 'gino-m/1822/1' of https://github.com/google/ground-andr…
gino-m Sep 9, 2023
720a676
Add tile + offset -> latlng
gino-m Sep 9, 2023
fefeaf8
Add clipping tile provider
gino-m Sep 9, 2023
0dfce04
Minor refactor
gino-m Sep 9, 2023
14b4f2a
Update table name missed on rename
gino-m Sep 9, 2023
948a402
Upgrade Room
gino-m Sep 9, 2023
88f44bc
WIP
gino-m Sep 9, 2023
7db3ec3
Merge branch 'master' of https://github.com/google/ground-android int…
gino-m Sep 9, 2023
bba7ed9
Clip offline imagery to selected areas
gino-m Sep 10, 2023
b974973
checkCode
gino-m Sep 10, 2023
fc90e51
Merge branch 'master' of https://github.com/google/ground-android int…
gino-m Sep 10, 2023
5e171d2
Add tests
gino-m Sep 10, 2023
eff3fce
Clean up Flow
gino-m Sep 10, 2023
3b15304
Clean up comment
gino-m Sep 10, 2023
21fa63b
Update comment
gino-m Sep 10, 2023
2b68694
Refactor transparency log
gino-m Sep 10, 2023
bffcbd3
Merge branch 'master' into gino-m/1850/1
gino-m Sep 11, 2023
8b264d3
Remove redundant setting of map type
gino-m Sep 11, 2023
ecd9342
Make clip bounds non-nullable
gino-m Sep 11, 2023
53c3826
ktfmt
gino-m Sep 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Docs tweaks
  • Loading branch information
gino-m committed Sep 9, 2023
commit d1f2463cd1b9fb82fae88c4a92087def29c21cc5
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ import timber.log.Timber
/**
* Fetches tile imagery from a server according to a formatted URL.
*
* Tile URLs should have the format: host/z/x/y
* `[urlTemplate]` may contain `{z}`, `{x}`, and `{y}`, which is replaced with the coordinates of
* the tile being rendered.
*/
class TemplateUrlTileProvider(private val template: String) : UrlTileProvider(256, 256) {
class TemplateUrlTileProvider(private val urlTemplate: String) : UrlTileProvider(256, 256) {
override fun getTileUrl(x: Int, y: Int, z: Int): URL? {
val url =
template
urlTemplate
.replace("{z}", z.toString())
.replace("{x}", x.toString())
.replace("{y}", y.toString())
Expand Down