Feature request: Style root level property "attribution"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
## Motivation
Sometimes it is required to attribute a style different than the sources used in the style.
## Design Alternatives
- Currently it's possible to use a dummy source to pass such a style attribution to the [AttributionControl](https://www.mapbox.com/mapbox-gl-js/api#attributioncontrol) (https://github.com/mapbox/mapbox-gl-js/issues/1485#issuecomment-403661564), so do nothing is an option.
- If https://github.com/mapbox/mapbox-gl-js/issues/1485 would be implemented it would be possible to achieve this with GL JS.
- Implement an optional [style root level property](https://www.mapbox.com/mapbox-gl-js/style-spec#root) `attribution`, which (if present) is passed to the AttributionControl.
## Design
Which design should we implement?
I favor a style root level property `attribution`.
What are the advantages of this design?
No need to use dummy sources (and dummy layers after https://github.com/mapbox/mapbox-gl-js/issues/6281 is fixed).
It's possible to included the proper attribution in the style.
No need to pass a custom attribution string to the AttributionControl (if possible after https://github.com/mapbox/mapbox-gl-js/issues/1485 is implemented).
What are some potential drawbacks of this design?
It's an addition to the style spec. Although such a property would be optional, maybe it affects also other implementers of the spec.
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 the style root-level property specification and the AttributionControl API linked in the issue, then review the three design alternatives and their referenced issues. Done means the design is selected and the optional attribution behavior is clearly specified for the style and control.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100