Skip to content

Commit

Permalink
Use ST_PointOnSurface for bridge names (#3902)
Browse files Browse the repository at this point in the history
Co-authored-by: Joseph E <42757252+jeisenbe@users.noreply.github.com>
  • Loading branch information
pnorman and jeisenbe committed Jan 25, 2020
1 parent 48e5416 commit e7de1cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1400,18 +1400,19 @@ Layer:
properties:
minzoom: 11
- id: bridge-text
geometry: polygon
geometry: point
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way,
ST_PointOnSurface(way) AS way,
way_area/NULLIF(POW(!scale_denominator!*0.001*0.28,2),0) AS way_pixels,
man_made,
name
FROM planet_osm_polygon
WHERE man_made = 'bridge'
WHERE way && !bbox!
AND man_made = 'bridge'
ORDER BY way_area DESC
) AS bridge_text
properties:
Expand Down
1 change: 0 additions & 1 deletion roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -2720,7 +2720,6 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
text-halo-fill: @standard-halo-fill;
text-margin: 3; // 0.3 em
text-wrap-width: 30;
text-placement: interior;
[way_pixels > 250] {
text-size: 11;
text-margin: 3.3; // 0.3 em
Expand Down

0 comments on commit e7de1cd

Please sign in to comment.