Don't use Mapnik in generateLayout?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 186
- Forks
- 70
- PR merge metrics
- No merged PRs in 30d
Description
Currently, spritezero uses [Mapnik in the generateLayout step](https://github.com/mapbox/spritezero/blob/master/index.js#L118-L129). While this is helpful when the layout is passed to `generateImage`, it is a lot of unneeded work when the layout json is all an application needs.
Can we move this logic to the generateImage step? It would mean needing to calculate an icons width with something other than Mapnik Image.
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 in index.js at the generateLayout logic linked in the issue, then trace how its layout is passed to generateImage. Determine which Mapnik work is only needed for image generation and how icon widths can be calculated without Mapnik Image. Done means layout-only callers avoid that work while generateImage still produces correct sprites.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100