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
I'm using mbtiles from openmaptiles with tileserver.php, and this mapbox-gl.js. Vector tiles and all other files are on my computer. Map is showing and working for the different zoom levels, but and there is no label and icon displayed for airport(s) - and I'm getting this error in the browser console:
Error: Source layer "aerodrome_label" does not exist on source "openmaptiles" as specified by style layer "airport-label-major"
Below there is a copy of the error from the browser console.
At the end there is the relevant code from the style-cdn.json file.
Does anyone know what I have to do to make the name and icon for the airports to show in the map?
@bongobongo Thank you for using mapbox-GL-JS! As the error states, the vector tiles you are referencing are missing the aerodrome_label source layer. I recommend that you work with the vector tile and style author to rectify this issue with the style you are using.
For those stumbling across this in the future - I think this error indicates that there exists a style that isn't used, and this is enough to disable the map entirely. Why doesn't it just ignore unused styles? Dunno.
To fix search in the style.json of the style you are using for that section, and delete it.
I'm using mbtiles from openmaptiles with tileserver.php, and this mapbox-gl.js. Vector tiles and all other files are on my computer. Map is showing and working for the different zoom levels, but and there is no label and icon displayed for airport(s) - and I'm getting this error in the browser console:
Error: Source layer "aerodrome_label" does not exist on source "openmaptiles" as specified by style layer "airport-label-major"
Below there is a copy of the error from the browser console.
At the end there is the relevant code from the style-cdn.json file.
Does anyone know what I have to do to make the name and icon for the airports to show in the map?
In the style-cdn.json file I find this relevant information:
{
"id": "airport-label-major",
"type": "symbol",
"source": "openmaptiles",
"source-layer": "aerodrome_label",
"minzoom": 10,
"filter": [
"all",
[
"has",
"iata"
]
],
"layout": {
"icon-image": "airport_11",
"icon-size": 1,
"text-anchor": "top",
"text-field": "{name:latin}\n{name:nonlatin}",
"text-font": [
"Klokantech Noto Sans Regular"
],
"text-max-width": 9,
"text-offset": [
0,
0.6
],
"text-optional": true,
"text-padding": 2,
"text-size": 12,
"visibility": "visible"
},
"paint": {
"text-color": "#666",
"text-halo-blur": 0.5,
"text-halo-color": "#ffffff",
"text-halo-width": 1
}
},
The text was updated successfully, but these errors were encountered: