bcgov / bcgov/wps

ASA Go: Base Map Download

Open
#4,301 0 comments 0 reactions 0 assignees View on GitHub
4Refinement Task
Dominant language
Python
Stars
65
Forks
11
Avg merge
21h 25m
Merged PRs (30d)
70

Description

**Describe the task**
Capacitor does not support reading file assets from app assets built into apps. Instead we can follow the approach InvasivesBC used for their offline maps, and, when online:
1. Query the pmtiles header for extent and size of basemap
2. Request all z, x, y tiles and store them in a sqlite database: https://github.com/bcgov/invasivesbc/blob/dev/app/src/utils/tile-cache/sqlite-cache.ts
3. Provide feedback to the user of the download status

**Acceptance Criteria**
- [ ] A user can download the pmtiles basemap when connected to the internet

**Additional context**
- https://github.com/bcgov/invasivesbc/blob/dev/app/src/utils/tile-cache/sqlite-cache.ts
- Created from #4159
- Devona: https://apps.nrs.gov.bc.ca/int/confluence/display/WFSS/Deprecation+of+ESRI+tiled+raster+base+map+data+sources

Contributor guide

Open the contributing guide

Research direction

Read the linked InvasivesBC sqlite-cache.ts example first, then trace this app's existing pmtiles basemap and download flow. The work is complete when the app can query the basemap extent and size, download its tiles into SQLite while online, and show download status feedback to the user.

Written by the indexing model from the issue text.

Assessment

Tech stack
sqlite
Domain
databases, mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.