Add requires field for root level properties in the spec
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Properties like `terrain` and `fog` are not supported if `projection.name` is anything other than `mercator`. Should documented properties like https://github.com/mapbox/mapbox-gl-js/blob/1333ef17ac2a047d3f7c916566fd078579eb5292/src/style-spec/reference/v8.json#L64-L67
be written with this?
```json
"fog": {
"type": "fog",
"doc": "A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features.",
"requires": [
{
"projection": {
"name": "mercator"
}
}
]
}
```
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/style-spec/reference/v8.json around lines 64-67 and trace how root-level property requirements are represented and consumed. Determine whether the proposed requires structure should be supported for properties such as fog and terrain, then verify that the documented conditional behavior is enforced wherever the spec is processed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100