Can't override xml-provided source using the constructor opts
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- backend
Research direction
Start at index.js around line 80 and trace how constructor options are combined with the XML-provided source, comparing this with the handling of scale and format. Confirm that an explicitly provided constructor source takes precedence over the XML source, while existing behavior remains unchanged for other options.
Written by the indexing model from the issue text.
Description
It's not possible (or if it is, not obvious how!) to override the source provided in the xml. This would be useful, for example, when using a style generated by tm2, but serving the vector tiles from a local cache on a non-networked device.
With the options passed to the constructor, the source is handled differently from other options, such as scale and format. The xml-provided values for these can be overridden in the constructor opts, but the reverse happens for source - the xml value overrides any source provided in the constructor.
https://github.com/mapbox/tilelive-vector/blob/4969f7af2c0490a7bb7ac80c95eddab49f3b5ed6/index.js#L80
I think if a source is provided in the constructor, then it should override the source in the xml, as per the behaviour of scale and format.
- Dominant language
- JavaScript
- Stars
- 72
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from mapbox/tilelive-vector
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
mapbox/tilelive-vector#164 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
mapbox/tilelive-vector#154 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
mapbox/tilelive-vector#153 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
mapbox/tilelive-vector#151 · 1 comment · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
mapbox/tilelive-vector#146 · 2 comments · 1 reaction ·
All issues in mapbox/tilelive-vector
Similar issues
-
clawsweeper:needs-product-decision clawsweeper:needs-security-review clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:security issue-rating: 🦞 diamond lobster P2
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
openclaw/openclaw#166870 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
⚠ needs intervention document structure changed
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Bug pulumi/pulumi
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
uoftblueprint/canada-basketball#32 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
andromarces/agent-loops#571 ·
Maintainers usually reply within 1 day