-
Notifications
You must be signed in to change notification settings - Fork 640
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
Unknown expression "pitch" in layers filter #1272
Comments
TileServer-GL now uses the maplibre-style-spec and MapLibre js / native. MapLibre was forked from the open source mapbox 1.x , so support to current mapbox 2.x+ spec is not 100% since they have been on diverged paths for several years since mapbox went closed source. For TileServer-GL and MapLibre, you might want to try maputnik My guess is the pitch expression was added to mapbox after the fork, so it likely isn't supported. For example, I saw this discussion recently ( maplibre/maplibre-gl-js#4207 ) |
I don’t know how to thank you, acalcutt 🙏🙏🙏 |
I found another online map style editor. It has more modern look than maplibre maputnik and can save your map style in your online profile. |
Edit: Going to move this to maplibre, landed here searching and realize this is better suited there. |
I created a new style using mapbox studio. After Importing mapbox style.json to tileserver-gl styles, and when i start the server i get this error:
[Unknown expression "pitch"](undefined: layers[35].filter[4][1][0]: Unknown expression "pitch". If you wanted a literal array, use ["literal", [...]].)
I noticed that server cannot pars the filter of mapbox in some layers. the layer with problem is:
{
"id": "tunnel-oneway-arrow-white",
"type": "symbol",
"metadata": {
"mapbox:featureComponent": "road-network",
"mapbox:group": "Road network, tunnels"
},
"source": "composite",
"source-layer": "road",
"minzoom": 16,
"filter": [
"all",
["==", ["get", "structure"], "tunnel"],
[
"match",
["get", "class"],
["motorway", "motorway_link", "trunk", "trunk_link"],
true,
false
],
["==", ["get", "oneway"], "true"],
[
"step",
["pitch"],
true,
50,
["<", ["distance-from-center"], 1],
60,
["<", ["distance-from-center"], 1.5],
70,
["<", ["distance-from-center"], 2]
]
],
"layout": {
"symbol-placement": "line",
"icon-image": [
"step",
["zoom"],
"oneway-white-small",
18,
"oneway-white-large"
],
"symbol-spacing": 200,
"icon-rotation-alignment": "map",
"icon-allow-overlap": true,
"icon-ignore-placement": true
},
"paint": {}
}
when I remove the ["pitch"] fitler from the style.json, server error get vanish.
If I can help in any part of this problem and create pull request, please tell me. Thank you very much
The text was updated successfully, but these errors were encountered: