maputnik icon indicating copy to clipboard operation
maputnik copied to clipboard

Notify user if map breaks on font 404

Open pathmapper opened this issue 4 years ago • 4 comments

Follow-up on https://github.com/maputnik/editor/issues/395#issuecomment-428962491:

Currently, if map breaks on font 404, there is no notification for the user, neither in the browser console nor in the UI.

Steps to reproduce:

  1. Use https://maputnik.github.io/releases/v1.7.0-beta2/#14.15/51.55152/0.00584
  2. Unzip and open the following style: test_failing.zip

Working version of the style: test.zip

pathmapper avatar Apr 13 '20 07:04 pathmapper

@pathmapper this looks to be an issue with mapbox-gl, although would need to confirm that outside of Maputnik. As soon as http requests for fonts 404 the map breaks. So in the test style you provided at zoom level 13 it renders the buildings and as soon as you enter zoom level 14 it'll stop rendering the buildings.

It's not a regression and exists in https://maputnik.github.io/editor so I suggest we fix in a patch release post v1.7.0

orangemug avatar Apr 13 '20 08:04 orangemug

@orangemug did some testing outside of Maputnik and it appears that only affected tiles are not rendered when a request for glyph fails with a 404 (for the test case above all visible tiles were affected, so it looked like the whole map broke).

Opened an upstream issue: https://github.com/mapbox/mapbox-gl-js/issues/9546

There is also a feature request regarding an event when a request for a glyph range PBF returns a bad response, which would be useful to notify the user: https://github.com/mapbox/mapbox-gl-js/issues/9528

I suggest we fix in a patch release post v1.7.0

:+1:

pathmapper avatar Apr 13 '20 12:04 pathmapper

I ran into a related issue when I was loading glyphs coming from ArcGIS Online. The issue was only in the react layer, and I was able to patch this with some quick and dirty JS changes to the JSX files (here). Has anyone else run into a similar issue?

jimmyrocks avatar Mar 16 '21 15:03 jimmyrocks