Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render entrances. #2936

Merged
merged 1 commit into from
Jan 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions addressing.mss
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@
text-wrap-width: 30; // 3.0 em
text-line-spacing: -1.5; // -0.15 em
text-margin: 3; // 0.3 em
[zoom >= 18]["addr_unit" != null]["addr_housenumber" = null] {
text-name: [addr_unit];
[zoom >= 18] {
text-halo-radius: @standard-halo-radius * 1.25;
["addr_unit" != null]["addr_housenumber" = null] {
text-name: [addr_unit];
}
}
[zoom >= 20] {
text-size: 11;
Expand Down
44 changes: 44 additions & 0 deletions buildings.mss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
@building-major-fill: darken(@building-fill, 20%);
@building-major-line: darken(@building-major-fill, 25%);

@entrance-permissive: darken(@building-line, 15%);
@entrance-normal: @building-line;

#buildings {
[zoom >= 13] {
Expand Down Expand Up @@ -42,3 +44,45 @@
polygon-fill: #B8B8B8;
}
}

#entrances {
[zoom >= 18]["entrance" != null] {
marker-fill: @entrance-normal;
marker-allow-overlap: true;
marker-ignore-placement: true;
marker-file: url('symbols/rect.svg');
marker-width: 5.0;
marker-height: 5.0;
marker-opacity: 0.0;
["entrance" = "main"] {
marker-opacity: 1.0;
marker-file: url('symbols/square.svg');
}
}
[zoom >= 19] {
["entrance" = "yes"],
["entrance" = "main"],
["entrance" = "home"],
["entrance" = "service"],
["entrance" = "staircase"] {
marker-opacity: 1.0;
marker-width: 6.0;
marker-height: 6.0;
["entrance" = "service"] {
marker-file: url('symbols/corners.svg');
}
}
["access" = "yes"],
["access" = "permissive"] {
marker-fill: @entrance-permissive;
}
["access" = "no"] {
marker-fill: @entrance-normal;
marker-file: url('symbols/rectdiag.svg');
}
}
[zoom >= 20]["entrance" != null] {
marker-width: 8.0;
marker-height: 8.0;
}
}
16 changes: 16 additions & 0 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,22 @@ Layer:
) AS guideways
properties:
minzoom: 11
- id: entrances
geometry: point
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way,
tags->'entrance' AS entrance,
access
FROM planet_osm_point
WHERE tags->'indoor' = 'no'
OR tags->'indoor' IS NULL)
AS entrances
properties:
minzoom: 18
- id: aeroways
geometry: linestring
<<: *extents
Expand Down
30 changes: 30 additions & 0 deletions symbols/corners.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions symbols/rect.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions symbols/rectdiag.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.