Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify user if map breaks on font 404 #651

Open
pathmapper opened this issue Apr 13, 2020 · 4 comments
Open

Notify user if map breaks on font 404 #651

pathmapper opened this issue Apr 13, 2020 · 4 comments

Comments

@pathmapper
Copy link
Contributor

Follow-up on #395 (comment):

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

@orangemug
Copy link
Collaborator

@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

@pathmapper
Copy link
Contributor Author

@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: mapbox/mapbox-gl-js#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: mapbox/mapbox-gl-js#9528

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

👍

@jimmyrocks
Copy link

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?

@1ec5
Copy link

1ec5 commented Aug 16, 2024

With maplibre/maplibre-gl-js#4564, GL JS will attempt to fall back to a locally rendered glyph and warn about the missing PBF instead of crashing. I don’t think there will be an event for Maputnik to hook into, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants