Does not load traffic layer by default
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- frontend
Research direction
Start by locating the MapboxTraffic control and its handling of the showTraffic option, then reproduce the issue with the map initialization snippet in this report. Done means traffic is visible immediately after the map loads with showTraffic enabled, without pressing the traffic button twice.
Written by the indexing model from the issue text.
Description
This can not show traffic by default, I have to press the traffic button twice to cycle it. there does not seem to be a working method to show traffic on load.
My code looks like this:
mapboxgl.accessToken = 'redacted_privatekey_';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v11',
zoom: 8,
center: [-122, 47.8],
});
map.on('load', function() {
map.addControl(new mapboxgl.NavigationControl());
map.addControl(new MapboxTraffic({showTraffic: true}));
});
- Dominant language
- JavaScript
- Stars
- 109
- Forks
- 36
- 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/mapbox-gl-traffic
-
Difficulty 1/5 Under an hour Newbie friendliness 35/100
mapbox/mapbox-gl-traffic#14 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
mapbox/mapbox-gl-traffic#11 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Global variablesOpen
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
mapbox/mapbox-gl-traffic#4 · 2 comments ·
All issues in mapbox/mapbox-gl-traffic
Similar issues
-
[guide] AGENTS.md claims the coverage gate, e2e and full lint run on every PR after ADR 0011 focused validationPossibly taken @hivecommons-hive claimed this today. Openagent/guide documentation hive/claimed-by-guide stage/040-covered-by-pr
Difficulty 2/5 1-3 hours Newbie friendliness 81/100
cncf/endusers#2006 · 1 comment ·
Maintainers usually reply within 1 day
-
check:passed feeds:add
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
all-contributors/cli#587 ·
Maintainers usually reply within 1 day
-
RGAA5
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 8 days
-
feedback simulation workshop
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
githubnext/gh-aw-workshop#5157 ·
Maintainers usually reply within 1 day