Support symbols for the source._dataType='vector' instead of source.type=='vector'
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
## Motivation
So to add support to the custom vector layers I noticed that in the style.js we only support symbol layers for the `vector` and `geojson` source types. However I noticed that there is another parameter `source._dataType` which can be used so it also supports custom source types
Here is the line that checks for the source.type
https://github.com/mapbox/mapbox-gl-js/blob/fd2045fd6aef55d9265c9a4c43fb48b294289482/src/style/style.js#L1408
I guess changing it to check based on `source._dataType` will allow custom sources to support symbols too
## Design Alternatives
it allows to add better support for the vector custom sources.
### Implementation
https://github.com/mapbox/mapbox-gl-js/blob/fd2045fd6aef55d9265c9a4c43fb48b294289482/src/style/style.js#L1408
I guess changing it to check based on `source._dataType` will allow custom sources to support symbols too
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 at src/style/style.js around the source.type check linked in the issue, and trace how symbol-layer support is selected for vector and geojson sources. Verify the change would recognize sources whose _dataType is vector while preserving existing behavior for the built-in source types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100