mapbox / mapbox/mapbox-gl-leaflet

Errors with modern Mapbox styles

Open
#127 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
546
Forks
148
PR merge metrics
No merged PRs in 30d

Description

When I try to use the modern static tiles from mapbox (like mapbox://styles/mapbox/streets-v11), I get Errors:

`Uncaught Error: [3]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead.
at createFilter (cde7cb78-f483-4f81-9246-b018e988d5b7:182)
at StyleLayerIndex.update (cde7cb78-f483-4f81-9246-b018e988d5b7:296)
at StyleLayerIndex.replace (cde7cb78-f483-4f81-9246-b018e988d5b7:296)
at Worker.setLayers (cde7cb78-f483-4f81-9246-b018e988d5b7:126)
at Actor.receive (cde7cb78-f483-4f81-9246-b018e988d5b7:326)`

Also:

`Uncaught TypeError: Cannot read property 'composite' of undefined
at WorkerTile.parse (cde7cb78-f483-4f81-9246-b018e988d5b7:128)
at cde7cb78-f483-4f81-9246-b018e988d5b7:124
at cde7cb78-f483-4f81-9246-b018e988d5b7:124
at XMLHttpRequest.r.onload (cde7cb78-f483-4f81-9246-b018e988d5b7:328)`

Usage:

`L.mapboxGL({
accessToken: {any_token},
style: 'mapbox://styles/mapbox/streets-v11'
});`

Is there a way to fix those errors?

Thanks a lot!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported errors with the L.mapboxGL usage shown and the mapbox://styles/mapbox/streets-v11 style URL. Trace the createFilter and WorkerTile.parse stack frames to identify the incompatible style data; done means the modern style loads without either reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.