Create a consistent convention for getters, setters, and constructor options
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Many attributes of the map have getters, setters, and constructor options (for example, `minZoom`, `getMinZoom`, `setMinZoom` 👍 )
Some have only a subset of the three, even though it would be practical and useful to have all three. (for example, `maxBounds` and `setMaxBounds` exist but `getMaxBounds` does not) (for example, `renderWorldCopies` exists as a constructor option but we do not provide `setRenderWorldCopies` or `getRenderWorldCopies`).
We should do a review of all getters, setters, and constructor options to ensure that
- for every constructor option, there exists a getter
- for every constructor option that could be changed at runtime, there exists a setter
- for every getter that could be set in the constructor, there exists a constructor option
- for every setter, there exists a getter
We may want to create some infrastructure to automatically plumb together constructor options and getters.
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 by inventorying the map attributes that expose constructor options, getters, and setters, using the examples in the issue as a guide. Determine which combinations are missing and which options are mutable at runtime. Done means the API follows one documented convention, with any shared plumbing agreed and covered by the repository's existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100