Closed felipemendes1994 closed 1 year ago
That is strange.
Can you confirm the version running in your kubernetes is the same version, can you see the same version on the bottom of the main page in both?
Maybe a font issue? when you view in raster mode does the page load? sometimes if fonts are missing some things that use them display differently.
are these pictures both from a 'raster' display mode? there is one level zoom difference between vector and raster display modes. I forget the specifics of that, but it has to do with tile size (256px vs 512px tiles)
Hi @Acalcutt,
I upgraded the docker image version. I was using 4.4.10, local and k8s, but now I've been using 4.5.0, in both envs, for more than a week.
I'm not having difference between local and k8s envs anymore, however, I still have a problem. My motorway_construction
layer does not render as the expected behaviour.
{
"id": "highway-motorway-construction",
"type": "line",
"source": "openmaptiles",
"source-layer": "transportation",
"minzoom": 5,
"maxzoom": 24,
"filter": ["all",
["==", "$type", "LineString"],
["all",
[
"==",
"class",
"motorway_construction"
]
]
],
"layout": {
"line-cap": "round",
"line-join": "round",
"visibility": "visible"
},
"paint": {
"line-color": "rgba(231, 119, 116, 1)",
"line-dasharray": [3, 3],
"line-gap-width": {
"stops": [[12, 0]]
},
"line-opacity": 1,
"line-width": {
"base": 1.3,
"stops": [[13, 0.5], [20, 6]]
}
}
},
That's my layer setup. Note that I have minzoom
and maxzoon
fields. When I zoom out, at Vector 10.92
, and 10
raster zoom level, my layer disappear. But generally I use the viewer
button. So I'm not sure about wich option is default.
Now about the font issue, I have an error log about fonts, but I have fonts place in the project as below.
Here's one log excerpt.
Starting tileserver-gl v4.5.0
Using specified config file from config.json
Starting server
Listening at http://[::]:8080/
Startup complete
GET / 200 4089 - 35.690 ms
GET /index.css 200 3320 - 3.865 ms
GET /images/logo.png 200 6407 - 2.790 ms
GET /images/placeholder.png 200 2084 - 4.822 ms
GET /images/maptiler-logo.svg 200 5136 - 5.367 ms
GET /images/header-map-1280px.png 200 174969 - 5.913 ms
GET /fonts/OpenSans-Regular.ttf 200 217360 - 6.665 ms
GET /fonts/OpenSans-Bold.ttf 200 224592 - 0.846 ms
ERROR: Font not found: Noto Sans Regular
ERROR: Trying to use Open Sans Regular as a fallback
ERROR: Font not found: Noto Sans Regular
ERROR: Trying to use Open Sans Regular as a fallback
GET /styles/maplink-custom/13/3034/4648.png 200 42918 - 366.630 ms
GET /styles/basic-preview/17/48549/74368.png 200 45782 - 643.664 ms
GET /favicon.ico 200 5430 - 0.488 ms
GET /styles/maplink-custom/ 200 4510 - 10.969 ms
GET /maplibre-gl.css 200 63722 - 1.238 ms
GET /maplibre-gl-inspect.css 200 1877 - 5.920 ms
GET /leaflet.css 200 14001 - 5.980 ms
I don't have the Noto font placed in my project, but I have the fallback font.
Project dir/fonts content
Config.json
{
"options": {
"paths": {
"fonts": "fonts",
"styles": "styles"
}
},
"styles": { ... },
"data": {
"openmaptiles": {
"mbtiles": "/maps/2023-08-planet.mbtiles"
}
}
}
style.json
{
"version": 8,
"name": "Server Custom",
"metadata": {
"openmaptiles:version": "3.x"
},
"center": [-46.653690, -23.566329],
"zoom": 13,
"sources": {
"openmaptiles": {
"type": "vector",
"url": "mbtiles://{openmaptiles}"
}
},
"sprite": "{styleJsonFolder}/sprite",
"glyphs": "{fontstack}/{range}.pbf",
"layers": [ ... ],
"id": "server-custom-09-14"
}
I would start with trying to add noto-sans from https://github.com/openmaptiles/fonts/releases/tag/v2.0 to you font folder and see if that helps.
@acalcutt,
I just installed the noto-sans font in my project. It's placed into fonts folder.
In logs, the error mentioned above, has disappeard
Startup complete
GET /styles/maplink-custom/ 304 - - 13.586 ms
GET /maplibre-gl.css 304 - - 2.393 ms
GET /maplibre-gl-inspect.css 304 - - 1.353 ms
GET /maplibre-gl.js 304 - - 1.414 ms
GET /leaflet.css 304 - - 1.555 ms
GET /leaflet.js 304 - - 1.559 ms
GET /maplibre-gl-inspect.min.js 304 - - 1.692 ms
GET /leaflet-hash.js 304 - - 0.590 ms
GET /L.TileLayer.NoGap.js 304 - - 0.686 ms
GET /mapbox-gl-rtl-text.js 304 - - 0.602 ms
GET /styles/maplink-custom/style.json 304 - - 3.021 ms
GET /mapbox-gl-rtl-text.js 304 - - 0.409 ms
GET /data/openmaptiles.json 304 - - 4.220 ms
GET /styles/maplink-custom/sprite.json 304 - - 1.429 ms
GET /styles/maplink-custom/sprite.png 304 - - 1.375 ms
GET /favicon.ico 304 - - 0.262 ms
**GET /fonts/Noto%20Sans%20Regular/0-255.pbf 200 76580 - 4.643 ms**
GET /favicon.ico 304 - - 0.535 ms
As the problem still happening I made another test.
I opened my map vector, the same problem happen. The road disappear depending the zoom level. See the error in the prints below.
May this issue be related to the mbtile?
from the screen shots, the url says those are different zoom levels . One is 10.91 the other is 11.09. the extra zoom level could make a difference what shows. And yes it could be either your style minimums or minimums built into the mbtiles.
for example in planetiler, there is this code that sets minimum zooms for different classes or roads https://github.com/openmaptiles/planetiler-openmaptiles/blob/main/src/main/java/org/openmaptiles/layers/Transportation.java#L169-L182 this is based on what OpenMapTiles does in https://github.com/openmaptiles/openmaptiles/blob/master/layers/transportation/transportation.sql i think.
In the past I wanted to show paths at a higher zoom level, I had to manually make changes like these to make them available at higher zoom levels. https://github.com/acalcutt/planetiler/commit/118a143ced9574ea584121d2906a62dbf39e8ef0 https://github.com/acalcutt/planetiler/commit/81a021233476d956d2b0b089ea0f98b03fb70a9c
hm... I got it.
Unfortunatelly, I'm not working in this kind of task right now. But I'll pay attention to this behaviour in the next task.
But, only finding the reason for this issue, is enough to answert clients tickets. And I can try to change the behaviour when generating mbtiles.
For now, I'm gonna clone this issue cause aparentilly I found the issue. If I realise another weired behaviour related to this, I reopen the issue, or I open another one.
Thank you @acalcutt for all your help!!
I've been running a tileserver-gl to server maps renderization over kubernetes cluster. The problem is, I have a certain class of road (motorway_construction) that needs to be shown at any zoom level. When I run tileserver-gl locally, no problem happens, but when I deploy my style to my k8s cluster the same road only appears only at a certain zoom range, even my style.json not containing the specific configuration for this behavior.
Here some pics of both envs:
Construction road how should appears (local render)
Construction road not rendering (K8s cluster)
Here it is my style.json file: https://www.coderstool.com/cs/DqL8Ha
I use exactly the same file locally and in k8s, but the behaviour is different.