Refactor Tile into separate classes
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
We currently stick a lot of state in Tile objects, the particular properties used depending on the source type.
We should probably move to a small hierarchy similar to to gl-native, with, e.g. RasterTile being distinct from VectorTile. The latter would still require quite a bit of state, which it might be good to organize a bit, e.g. by grouping symbol placement & collision data into its own structure.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/source/tile.js lines 47-84 to inventory the state currently shared by Tile and identify which properties depend on source type. Compare the proposed hierarchy with the gl-native approach, then determine how RasterTile, VectorTile, and the symbol placement and collision data should be organized; done means the design is agreed and the affected tile behavior remains covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100