diff --git a/backend/src/routes/tiles.rs b/backend/src/routes/tiles.rs index d2fcac9..1528696 100644 --- a/backend/src/routes/tiles.rs +++ b/backend/src/routes/tiles.rs @@ -140,7 +140,42 @@ pub async fn get_style( { "id": "buildings", "type": "fill", "source": "planet_osm_polygon", "source-layer": "planet_osm_polygon", "filter": ["has", "building"], - "paint": { "fill-color": "#d9d0c7", "fill-outline-color": "#bbb" } } + "paint": { "fill-color": "#d9d0c7", "fill-outline-color": "#bbb" } }, + { "id": "road-names", "type": "symbol", "source": "planet_osm_line", + "source-layer": "planet_osm_line", + "minzoom": 13, + "filter": ["has", "name"], + "layout": { + "text-field": ["get", "name"], + "text-font": ["Noto Sans Regular", "Open Sans Regular"], + "text-size": 11, + "symbol-placement": "line", + "text-max-angle": 30, + "text-padding": 10 + }, + "paint": { + "text-color": "#444", + "text-halo-color": "#fff", + "text-halo-width": 1.5 + } + }, + { "id": "place-names", "type": "symbol", "source": "planet_osm_point", + "source-layer": "planet_osm_point", + "minzoom": 10, + "filter": ["all", ["has", "name"], ["has", "place"]], + "layout": { + "text-field": ["get", "name"], + "text-font": ["Noto Sans Regular", "Open Sans Regular"], + "text-size": ["interpolate", ["linear"], ["zoom"], 10, 11, 14, 14], + "text-anchor": "center", + "text-padding": 5 + }, + "paint": { + "text-color": "#333", + "text-halo-color": "#fff", + "text-halo-width": 1.5 + } + } ] });