street names
This commit is contained in:
parent
34c4f0051f
commit
897aa72cea
1 changed files with 36 additions and 1 deletions
|
|
@ -140,7 +140,42 @@ pub async fn get_style(
|
||||||
{ "id": "buildings", "type": "fill", "source": "planet_osm_polygon",
|
{ "id": "buildings", "type": "fill", "source": "planet_osm_polygon",
|
||||||
"source-layer": "planet_osm_polygon",
|
"source-layer": "planet_osm_polygon",
|
||||||
"filter": ["has", "building"],
|
"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
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue