Skip to content

Commit

Permalink
Merge pull request #299 from headwaymaps/mkirk/map-style-tweaks
Browse files Browse the repository at this point in the history
[basemap] small tweaks to map style:  water, background, and building style
  • Loading branch information
michaelkirk authored Jan 10, 2024
2 parents af4d937 + 9e431df commit fab9e19
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
11 changes: 6 additions & 5 deletions services/frontend/www-app/src/components/BaseMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ export default defineComponent({
}
// Add 3-D buildings
const render3DZoomLevel = 15;
const render3DZoomLevel = 17;
type LerpableValue =
| maplibregl.ExpressionSpecification
| maplibregl.ColorSpecification
Expand Down Expand Up @@ -647,10 +647,11 @@ export default defineComponent({
type: 'fill-extrusion',
minzoom: render3DZoomLevel,
paint: {
'fill-extrusion-color': zoomLerp<maplibregl.ColorSpecification>(
'hsl(35, 8%, 85%)',
'hsl(35, 8%, 75%)'
),
// This value is based on the background-fill of the "buildings" layer in tileserver/styles/basic/style.json
// But the extruded rendering appears "brighter", presumably due rendering lighting effects, so I've
// reduced the brightness here to compensate. What we want is an imperceptible transition between 2d and 3d
// as the user zooms in.
'fill-extrusion-color': 'hsl(40, 5.5%, 87%)',
'fill-extrusion-height':
zoomLerp<maplibregl.ExpressionSpecification>(0, [
'*',
Expand Down
10 changes: 5 additions & 5 deletions services/tileserver/styles/basic/style.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 8,
"name": "OSM Liberty",
"name": "Headway Default",
"metadata": {
"maputnik:license": "https://github.com/maputnik/osm-liberty/blob/gh-pages/LICENSE.md",
"maputnik:renderer": "mbgljs",
Expand All @@ -24,7 +24,7 @@
{
"id": "background",
"type": "background",
"paint": {"background-color": "rgb(239,239,239)"}
"paint": {"background-color": "rgb(241,239,231)"}
},
{
"id": "natural_earth",
Expand Down Expand Up @@ -159,7 +159,7 @@
"source": "openmaptiles",
"source-layer": "water",
"filter": ["all", ["!=", "brunnel", "tunnel"]],
"paint": {"fill-color": "rgb(158,189,255)"}
"paint": {"fill-color": "rgb(141,220,248)"}
},
{
"id": "waterway_river",
Expand Down Expand Up @@ -1225,10 +1225,10 @@
"source-layer": "building",
"minzoom": 13,
"paint": {
"fill-color": "hsl(35, 8%, 85%)",
"fill-color": "hsl(40, 5.5%, 89.2%)",
"fill-outline-color": {
"base": 1,
"stops": [[13, "hsla(35, 6%, 79%, 0.32)"], [14, "hsl(35, 6%, 79%)"]]
"stops": [[13, "hsla(40, 6%, 79%, 0.32)"], [14, "hsl(40, 6%, 79%)"]]
}
}
},
Expand Down

0 comments on commit fab9e19

Please sign in to comment.