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

Adding rendering for craft #4809

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions openstreetmap-carto.style
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ node,way religion text linear
way route text linear
way service text linear
node,way shop text polygon
node,way craft text polygon
way surface text linear
node,way tourism text polygon
way tracktype text linear
Expand Down
4 changes: 4 additions & 0 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1545,6 +1545,7 @@ Layer:
'advertising_' || CASE WHEN tags->'advertising' in ('column') THEN tags->'advertising' END,
'emergency_' || CASE WHEN tags->'emergency' IN ('phone') AND way_area IS NULL THEN tags->'emergency' END,
'shop' || CASE WHEN shop IN ('yes', 'no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE '' END,
'craft' || CASE WHEN craft IN ('no', 'vacant', 'closed', 'disused', 'empty') OR craft IS NULL THEN NULL ELSE '' END,
'leisure_' || CASE WHEN leisure IN ('amusement_arcade', 'beach_resort', 'bird_hide', 'bowling_alley', 'dog_park', 'firepit', 'fishing',
'fitness_centre', 'fitness_station', 'garden', 'golf_course', 'ice_rink', 'marina', 'miniature_golf',
'outdoor_seating', 'park', 'picnic_table', 'pitch', 'playground',
Expand Down Expand Up @@ -1641,6 +1642,7 @@ Layer:
'music', 'medical_supply', 'dairy', 'video_games', 'houseware', 'ticket', 'charity', 'second_hand',
'interior_decoration', 'video', 'paint', 'massage', 'trade', 'wholesale') THEN shop
ELSE 'other' END AS shop,
craft,
CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building,
tags->'operator' AS operator,
ref,
Expand Down Expand Up @@ -1668,6 +1670,7 @@ Layer:
ref,
religion,
shop,
craft,
tourism,
waterway,
tags,
Expand Down Expand Up @@ -1697,6 +1700,7 @@ Layer:
ref,
religion,
shop,
craft,
tourism,
waterway,
tags,
Expand Down
43 changes: 43 additions & 0 deletions style/amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
@wetland-text: darken(#4aa5fa, 25%); /* Also for mud */
@shop-icon: #ac39ac;
@shop-text: #939;
@craft-icon: #8000ff;
@craft-text: #8000ff;
@transportation-icon: #0092da;
@transportation-text: #0066ff;
@accommodation-icon: @transportation-icon;
Expand Down Expand Up @@ -1198,6 +1200,32 @@
}
}

[feature='craft']{
[zoom >= 17]{
marker-fill: @craft-icon;
marker-placement: interior;
marker-clip: false;
}
[zoom >= 17][zoom < 18]{
marker-width: 4;
marker-line-width: 0;
}

[craft = 'shoemaker'][zoom >= 18] {
marker-file: url('symbols/craft/shoemaker.svg');
}

[craft = 'tailor'][zoom >= 18],
[craft = 'dressmaker'][zoom >= 18] {
marker-file: url('symbols/craft/tailor.svg');
}

[zoom >= 18][craft != 'shoemaker'][craft != 'tailor'][craft != 'dressmaker']{
marker-width: 6;
marker-line-width: 0;
}
}

[feature = 'advertising_column'][zoom >= 19]{
marker-file: url('symbols/amenity/advertising_column.svg');
marker-fill: @advertising-grey;
Expand Down Expand Up @@ -2607,6 +2635,21 @@
}
}

[feature = 'craft'] {
[zoom >= 18] {
text-name: "[name]";
text-size: @standard-font-size;
text-wrap-width: @standard-wrap-width;
text-line-spacing: @standard-line-spacing-size;
text-dy: 12;
text-fill: @craft-text;
text-face-name: @standard-font;
text-halo-radius: @standard-halo-radius;
text-halo-fill: rgba(255, 255, 255, 0.6);
text-clip: false;
}
}

[feature = 'office'] {
[zoom >= 18] {
[office = 'accountant'],
Expand Down
4 changes: 4 additions & 0 deletions symbols/craft/shoemaker.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions symbols/craft/tailor.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.