Skip to content

Commit

Permalink
Display building numbers (#945)
Browse files Browse the repository at this point in the history
  • Loading branch information
YongGoose authored Feb 3, 2025
1 parent 6cae7e0 commit 96cf335
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
11 changes: 8 additions & 3 deletions basemap/layers/building/number.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default {
layout: {
'text-allow-overlap': false,
'text-anchor': 'center',
'text-field': '{addr:housenumber}',
'text-field': ['get', 'addr:housenumber'],
'text-font': ['Noto Sans Regular'],
'text-offset': [0, 0],
'text-size': [
Expand All @@ -34,9 +34,9 @@ export default {
15,
0,
16,
11,
10,
20,
20,
11,
],
visibility: 'visible',
},
Expand All @@ -45,4 +45,9 @@ export default {
'text-halo-color': theme.buildingNumberTextHaloColor,
'text-halo-width': 1.2,
},
filter: ['all',
['==', ['geometry-type'], 'Polygon'],
['!=', ['get', 'building'], 'no'],
['!=', ['get', 'addr:housenumber'], '']
],
}
2 changes: 2 additions & 0 deletions basemap/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import highway_label from './layers/highway/highway_label.js';

import ocean_overlay from './layers/ocean/overlay.js';
import route_line from "./layers/route/style.js"
import building_number from "./layers/building/number.js";
import building_fill from "./layers/building/fill.js";
import building_extrusion from "./layers/building/extrusion.js";
import man_made_fill from "./layers/man_made/man_made_fill.js";
Expand Down Expand Up @@ -105,6 +106,7 @@ export default {
highway_tunnel_outline,
highway_tunnel_line,
building_fill,
building_number,
highway_construction_line,
highway_fill,
highway_outline,
Expand Down
2 changes: 2 additions & 0 deletions daylight/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import highway_label from '../basemap/layers/highway/highway_label.js';

import ocean_overlay from '../basemap/layers/ocean/overlay.js';
import route_line from "../basemap/layers/route/style.js"
import building_number from "../basemap/layers/building/number.js";
import building_fill from "../basemap/layers/building/fill.js";
import building_extrusion from "../basemap/layers/building/extrusion.js";
import man_made_fill from "../basemap/layers/man_made/man_made_fill.js";
Expand Down Expand Up @@ -102,6 +103,7 @@ export default {
highway_tunnel_line,
railway_tunnel,
building_fill,
building_number,
highway_construction_line,
highway_outline,
highway_line,
Expand Down

0 comments on commit 96cf335

Please sign in to comment.