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

tileserver-gl-light: 400 (Bad Request) for font using "text-field" in mapbox-gl.js #262

Closed
tkohr opened this issue Mar 8, 2018 · 2 comments

Comments

@tkohr
Copy link

tkohr commented Mar 8, 2018

I have installed tileserver-gl-light via npm and have it running on port 4200. Everything works fine serving data from localhost:4200 for my web app on localhost:8080.

However, once I use "text-field" in one of my layers in my app like:

'layout': {
      'text-field': '{reg}'
       ...

I get the following error:

tileserver_font_error

@tkohr
Copy link
Author

tkohr commented Mar 12, 2018

Actually this does not seem to be a bug, but due to the fact that mapbox-gl js uses ["Open Sans Regular","Arial Unicode MS Regular"] as default text-font. This returns a "Font not allowed: Arial Unicode MS Regular"-Error. If I get rid of "Arial Unicode MS Regular" in my client, everything works fine for displaying numbers. Do I loose any characters getting rid of "Arial Unicode MS Regular"?

The following issue pointed me to the solution: openmaptiles/fonts#1

@klokan
Copy link
Member

klokan commented Mar 22, 2018

I expect this is closed. You have to fix your style JSON to load only fonts you really have on your server.

@klokan klokan closed this as completed Mar 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants