mapbox / mapbox/mapbox-gl-js

Tile is not rendered when request for glyph fails with a 404

Open
#9,546 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug :lady_beetle:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

**mapbox-gl-js version**: v1.9.1

**browser**: Firefox/Chrome, likely any

This has been reported before in #662, but was fixed according to https://github.com/mapbox/mapbox-gl-js/issues/662#issuecomment-51666835.

### Steps to Trigger Behavior

Use a non-existing font as value for the `text-font` layout property.

### Link to Demonstration

#### Non-existing font resulting in 404 and affected tiles are not rendered

https://jsbin.com/mahoxoduhu/1/edit?html,output

![grafik](https://user-images.githubusercontent.com/20856381/79116679-711dee80-7d89-11ea-84f9-46e983a97b4a.png)

#### Existing font

https://jsbin.com/vexanaqiju/1/edit?html,output

![grafik](https://user-images.githubusercontent.com/20856381/79115644-a96ffd80-7d86-11ea-9569-e9bfc651f51b.png)

### Expected Behavior

All tiles are rendered (the tiles with missing glyphs without labels).

### Actual Behavior

Map is only partially rendered - tiles with labels are not rendered because of failing requests for glyphs (404).

There is no error or warning in the browser console (there is only the 404 in the network tab).

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 with the glyph-request and tile-rendering paths implicated by the report, using the JSBin reproduction with a non-existing text-font value. Compare it with the existing-font reproduction and verify that a 404 leaves affected tiles rendered without their labels, with no browser-console error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.