Skip to content

Commit

Permalink
Correct lock name rendering
Browse files Browse the repository at this point in the history
* Remove unreferenced lock code from amenity-points.mss
* Don't render waterway=lock_gate names
* Don't render lock=yes name
  • Loading branch information
matthijsmelissen committed Mar 14, 2015
1 parent 876f4df commit 3c297c0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 33 deletions.
11 changes: 0 additions & 11 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -202,17 +202,6 @@
marker-clip: false;
}

[feature = 'waterway_lock'],
[feature = 'lock_yes'] {
[zoom >= 15] {
marker-fill: #969494;
marker-width: 9;
marker-line-width: 0;
marker-placement: interior;
marker-clip: false;
}
}

[feature = 'man_made_mast'][zoom >= 17] {
marker-file: url('symbols/communications.16.svg');
marker-fill: #555;
Expand Down
8 changes: 4 additions & 4 deletions project.mml

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ Layer:
<<: *osm2pgsql
table: |-
(SELECT
way, waterway, lock, name, intermittent,
way, waterway, name, intermittent,
CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel,
'no' AS bridge
FROM planet_osm_line
Expand Down Expand Up @@ -1652,7 +1652,7 @@ Layer:
'shop_' || CASE WHEN shop IN ('supermarket', 'bakery', 'butcher', 'clothes', 'fashion', 'convenience', 'department_store', 'doityourself', 'florist', 'hairdresser', 'car', 'car_repair', 'bicycle', 'mall') THEN shop WHEN shop IN ('accessories', 'alcohol', 'antique', 'antiques', 'appliance', 'art', 'baby_goods', 'bag', 'bags', 'bakery', 'bathroom_furnishing', 'beauty', 'bed', 'betting', 'beverages', 'bicycle', 'boat', 'bookmaker', 'books', 'boutique', 'builder', 'building_materials', 'butcher', 'camera', 'car', 'car_parts', 'car_repair', 'car_service', 'carpet', 'charity', 'cheese', 'chemist', 'chocolate', 'clothes', 'coffee', 'communication', 'computer', 'confectionery', 'convenience', 'copyshop', 'cosmetics', 'craft', 'curtain', 'dairy', 'deli', 'delicatessen', 'department_store', 'discount', 'dive', 'doityourself', 'dry_cleaning', 'e-cigarette', 'electrical', 'electronics', 'energy', 'erotic', 'estate_agent', 'fabric', 'farm', 'fashion', 'fish', 'fishing', 'fishmonger', 'flooring', 'florist', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'furniture', 'gallery', 'gambling', 'games', 'garden_centre', 'gas', 'general', 'gift', 'glaziery', 'greengrocer', 'grocery', 'hairdresser', 'hardware', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hifi', 'hobby', 'household', 'houseware', 'hunting', 'ice_cream', 'insurance', 'interior_decoration', 'jewellery', 'jewelry', 'kiosk', 'kitchen', 'laundry', 'leather', 'lighting', 'locksmith', 'lottery', 'mall', 'market', 'massage', 'medical', 'medical_supply', 'mobile_phone', 'money_lender', 'motorcycle', 'motorcycle_repair', 'music', 'musical_instrument', 'newsagent', 'office_supplies', 'optician', 'organic', 'outdoor', 'paint', 'pastry', 'pawnbroker', 'perfumery', 'pet', 'pets', 'pharmacy', 'phone', 'photo', 'photo_studio', 'photography', 'pottery', 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'seafood', 'second_hand', 'sewing', 'shoe_repair', 'shoes', 'shopping_centre', 'solarium', 'souvenir', 'sports', 'stationery', 'supermarket', 'tailor', 'tanning', 'tattoo', 'tea', 'ticket', 'tiles', 'tobacco', 'toys', 'trade', 'travel_agency', 'tyres', 'vacuum_cleaner', 'variety_store', 'video', 'video_games', 'watches', 'wholesale', 'wine', 'winery', 'yes') THEN 'other' ELSE NULL END,
'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'sports_centre', 'stadium', 'track', 'pitch', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina', 'slipway') THEN leisure ELSE NULL END,
'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'conservation', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'military') THEN landuse ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower') THEN man_made ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne') THEN man_made ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('wood', 'peak', 'volcano', 'saddle', 'cave_entrance', 'water', 'lake', 'mud', 'wetland', 'marsh', 'bay', 'spring', 'scree', 'shingle', 'bare_rock', 'sand', 'heath', 'grassland', 'scrub', 'beach', 'glacier') THEN "natural" ELSE NULL END,
'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END,
'military_' || CASE WHEN military IN ('danger_area') THEN military ELSE NULL END,
Expand Down Expand Up @@ -1701,7 +1701,7 @@ Layer:
CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building
FROM planet_osm_line
WHERE man_made IN ('pier', 'breakwater', 'groyne')
OR waterway IN ('dam', 'weir', 'lock_gate')
OR waterway IN ('dam', 'weir')
) AS text_line
advanced: {}
- id: "text-point"
Expand Down Expand Up @@ -1732,7 +1732,7 @@ Layer:
'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'ford') THEN highway ELSE NULL END,
'power_' || CASE WHEN power IN ('station', 'generator', 'sub_station', 'substation') THEN power ELSE NULL END,
'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END,
'waterway_' || CASE WHEN waterway IN ('dam', 'weir', 'lock_gate') THEN waterway ELSE NULL END
'waterway_' || CASE WHEN waterway IN ('dam', 'weir') THEN waterway ELSE NULL END
) AS feature,
access,
(CASE WHEN "natural" IN ('peak', 'volcano', 'saddle') OR tourism = 'alpine_hut' OR amenity = 'shelter' THEN CASE WHEN ele IS NOT NULL THEN CASE WHEN name IS NOT NULL THEN CONCAT(name, E'\n', ele) ELSE ele END ELSE name END ELSE name END) AS name,
Expand All @@ -1755,7 +1755,7 @@ Layer:
OR highway IN ('bus_stop', 'services', 'rest_area', 'bus_stop', 'ford')
OR power IN ('station', 'generator', 'sub_station', 'substation')
OR boundary IN ('national_park')
OR waterway IN ('dam', 'weir', 'lock_gate')
OR waterway IN ('dam', 'weir')
) AS text
properties:
minzoom: 10
Expand Down
3 changes: 1 addition & 2 deletions water-features.mss
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@

.text {
[feature = 'waterway_dam'],
[feature = 'waterway_weir'],
[feature = 'waterway_lock_gate'] {
[feature = 'waterway_weir'] {
#text-poly[zoom >= 15],
#text-line[zoom >= 15],
#text-point[zoom >= 17] {
Expand Down
11 changes: 0 additions & 11 deletions water.mss
Original file line number Diff line number Diff line change
Expand Up @@ -208,17 +208,6 @@
}

#water-lines-text {
[lock = 'yes'][zoom >= 17] {
text-name: "[name]";
text-face-name: @oblique-fonts;
text-halo-radius: 1;
text-halo-fill: rgba(255,255,255,0.6);
text-size: 10;
text-fill: @water-text;
text-placement: point;
text-wrap-width: 20;
}

[lock != 'yes'] {
[waterway = 'river'][zoom >= 13] {
text-name: "[name]";
Expand Down

0 comments on commit 3c297c0

Please sign in to comment.