Symptom
When using cluster layers with MapLibre GL JS on PTV Vector Maps, cluster labels may not be rendered when zooming in/out or switching tiles.
In the browser console, the following error is displayed:
GET
https://vectormaps-resources.myptv.com/fonts/latest/Open%20Sans%20Regular,Arial%20Unicode%20MS%2
Cause
This error is caused by unsupported font definitions in the layer styling.
By default, MapLibre uses:
["Open Sans Regular", "Arial Unicode MS Regular"]
However, PTV Vector Maps only support fonts from the "Noto" family.
Fonts like Open Sans or Arial Unicode MS are not available on the PTV-hosted tile servers — they are only present on MapLibre demo tiles.
Resolution
To resolve the issue and ensure cluster labels render correctly, explicitly set the supported "Noto Sans Regular" font in your style layer.
Example:
map.addLayer({
id: 'cluster-count',
type: 'symbol',
source: 'earthquakes',
filter: ['has', 'point_count'],
layout: {
'text-field': '{point_count_abbreviated}',
'text-font': ['Noto Sans Regular'],
'text-size': 12
}
});
This avoids the 404 error and displays the labels as expected.
Technical Notes
Rendering engine:
maplibre-glv4.0.2Supported fonts on
vectormaps-resources.myptv.com: Noto onlyUnsupported fonts: Open Sans, Arial Unicode MS, etc.