You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot use text-field layers on third party maps #4808
Reacted by rainstop_3, Stanislav Panchenko, Ruslan Ishkildin, Konstantin Mochalov, Andreas Schönefeldt, Leonardo Eiji Koshimura, Philipp Duzak, nan and Daniele Santini
For others getting stuck on this, you need to add the "glyphs" property on the same level as "sources" and "layers". And you need to use a provider that has the fonts you use. For example for Mapbox example derivations you probably want "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf".
Reacted by Mike O'Meara, Anjum Faraz, Ian Shiland, Stanislav Panchenko, kk, Serg, dpmarley, Andreas Schönefeldt, Davit Barbakadze, Petr Hoskovec and 4 more
For others getting stuck on this, you need to add the "glyphs" property on the same level as "sources" and "layers". And you need to use a provider that has the fonts you use. For example for Mapbox example derivations you probably want "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf".
I can't figure out the layers in Python. Has anyone gotten this to work with a Python implementation?
Reacted by Baysan, Romulo Pulcinelli Benedetti and b-a0
You can find the list of available fonts that can be used here https://github.com/openmaptiles/fonts/blob/gh-pages/fontstacks.json
Thank you!!! I was stuck on this problem for many hours. It will be very helpful to show some error or warning, that it cannot be rendered due font settings. I was missing the combination of glyphs: 'http://fonts.openmaptiles.org/{fontstack}/{range}.pbf',
and available font setting for that symbol layer
'text-font': ['Open Sans Bold'],
It is crucial to have both in place, otherwise you get no feedback from map and you will be stuck as I was :)
Activity
daumann commentedon Jun 8, 2017
adding
"glyphs": "http://fonts.openmaptiles.org/{fontstack}/{range}.pbf"works.kannes commentedon May 18, 2018
For others getting stuck on this, you need to add the
"glyphs"property on the same level as"sources"and"layers". And you need to use a provider that has the fonts you use. For example for Mapbox example derivations you probably want"glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf".simison commentedon Sep 12, 2020
For OSM and other non Mapbox layers, see:
https://openmaptiles.org/docs/style/mapbox-gl-style-spec/
https://github.com/openmaptiles/fonts
They're served from Github via
"glyphs": "https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"wherefontstackwill be font name from https://github.com/openmaptiles/fonts/tree/gh-pages — for example "Open Sans Bold", when defined in your layer like so:kolen commentedon Oct 26, 2020
You should add layers which render text only after main style is loaded, i.e. in
map.on("styledata", …)adholmgren commentedon Dec 1, 2021
I can't figure out the layers in Python. Has anyone gotten this to work with a Python implementation?
Kysumi commentedon Dec 3, 2023
For anyone stumbling into this issue in the future.
#4808 (comment)
This comment is correct, you can load the glyphs from that address.
Here is a simple example of using it
You can find the list of available fonts that can be used here
https://github.com/openmaptiles/fonts/blob/gh-pages/fontstacks.jsonKhaldor48 commentedon Nov 10, 2024
Thank you!!! I was stuck on this problem for many hours. It will be very helpful to show some error or warning, that it cannot be rendered due font settings. I was missing the combination of
glyphs: 'http://fonts.openmaptiles.org/{fontstack}/{range}.pbf',and available font setting for that symbol layer
'text-font': ['Open Sans Bold'],It is crucial to have both in place, otherwise you get no feedback from map and you will be stuck as I was :)