diff --git a/addressing.mss b/addressing.mss index d2f4c86b5f..d4f13ee3e1 100644 --- a/addressing.mss +++ b/addressing.mss @@ -25,7 +25,6 @@ } } } - text-placement: interior; text-face-name: @book-fonts; text-fill: @address-color; text-halo-radius: @standard-halo-radius; diff --git a/project.mml b/project.mml index e6146513f9..5509d23cb4 100644 --- a/project.mml +++ b/project.mml @@ -2079,13 +2079,13 @@ Layer: <<: *osm2pgsql table: |- (SELECT - way, + ST_PointOnSurface(way) AS way, "addr:housenumber" AS addr_housenumber, "addr:housename" AS addr_housename, tags->'addr:unit' AS addr_unit, way_area/NULLIF(POW(!scale_denominator!*0.001*0.28,2),0) AS way_pixels FROM planet_osm_polygon - WHERE (("addr:housenumber" IS NOT NULL) OR ("addr:housename" IS NOT NULL) OR ((tags->'addr:unit') IS NOT NULL)) + WHERE way && !bbox! AND (("addr:housenumber" IS NOT NULL) OR ("addr:housename" IS NOT NULL) OR ((tags->'addr:unit') IS NOT NULL)) AND building IS NOT NULL UNION ALL SELECT @@ -2095,7 +2095,7 @@ Layer: tags->'addr:unit' AS addr_unit, NULL AS way_pixels FROM planet_osm_point - WHERE ("addr:housenumber" IS NOT NULL) OR ("addr:housename" IS NOT NULL) OR ((tags->'addr:unit') IS NOT NULL) + WHERE way && !bbox! AND ("addr:housenumber" IS NOT NULL) OR ("addr:housename" IS NOT NULL) OR ((tags->'addr:unit') IS NOT NULL) ORDER BY way_pixels DESC NULLS LAST ) AS addresses properties: