Skip to content

Commit

Permalink
Merge pull request cyclosm#538 from cyclosm/defibrillators
Browse files Browse the repository at this point in the history
Render defibrillators
  • Loading branch information
Phyks committed May 27, 2021
2 parents c84bfea + 9a7fe60 commit 19a9266
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 4 deletions.
8 changes: 8 additions & 0 deletions amenities.mss
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,14 @@
marker-clip: false;
}

[feature = 'emergency_defibrillator'][zoom >= 19] {
marker-file: url('symbols/osmfr/aed2.svg');
marker-placement: interior;
marker-clip: false;
[access != ''][access != 'permissive'][access != 'yes'] {
marker-opacity: 0.33;
}
}
[feature = 'emergency_phone'][zoom >= 19] {
marker-file: url('symbols/openstreetmap-carto/amenity/emergency_phone.svg');
marker-fill: @amenity-common;
Expand Down
68 changes: 68 additions & 0 deletions symbols/osmfr/aed2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions views.sql
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ CREATE VIEW cyclosm_amenities_point AS
OR waterway IN ('waterfall')
OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross', 'fort', 'wayside_shrine', 'castle', 'manor', 'city_gate')
OR military IN ('bunker')
OR tags->'emergency'='phone'
OR tags->'emergency' IN ('defibrillator', 'phone')
OR highway IN ('elevator', 'traffic_signals')
OR ((highway='bus_stop' OR public_transport='platform') AND (tags->'shelter'='yes' OR covered='yes'))
OR (power = 'generator' AND "generator:source"='wind')
Expand All @@ -317,7 +317,7 @@ CREATE VIEW cyclosm_amenities_point AS
WHEN shop IN ('bicycle', 'sports') THEN 0
WHEN amenity IN ('bicycle_rental') Then 10
-- Emergency
WHEN tags->'healthcare' IS NOT NULL OR tags->'emergency'='phone' OR amenity IN ('hospital', 'clinic', 'doctors', 'pharmacy') THEN 20
WHEN tags->'healthcare' IS NOT NULL OR tags->'emergency' IN ('defibrillator', 'phone') OR amenity IN ('hospital', 'clinic', 'doctors', 'pharmacy') THEN 20
-- Other emergency-related amenities
WHEN amenity IN ('bicycle_repair_station', 'compressed_air', 'drinking_water', 'police', 'toilets',
'water_point', 'charging_station') THEN 21
Expand Down Expand Up @@ -444,7 +444,7 @@ CREATE VIEW cyclosm_amenities_poly AS
OR waterway IN ('waterfall')
OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross', 'fort', 'wayside_shrine', 'castle', 'manor', 'city_gate')
OR military IN ('bunker')
OR tags->'emergency'='phone'
OR tags->'emergency' IN ('defibrillator', 'phone')
OR highway IN ('elevator', 'traffic_signals')
OR ((highway='bus_stop' OR public_transport='platform') AND (tags->'shelter'='yes' OR covered='yes'))
OR (power = 'generator' AND "generator:source"='wind')
Expand All @@ -456,7 +456,7 @@ CREATE VIEW cyclosm_amenities_poly AS
WHEN shop IN ('bicycle', 'sports') THEN 0
WHEN amenity IN ('bicycle_rental') Then 10
-- Emergency
WHEN tags->'healthcare' IS NOT NULL OR tags->'emergency'='phone' OR amenity IN ('hospital', 'clinic', 'doctors', 'pharmacy') THEN 20
WHEN tags->'healthcare' IS NOT NULL OR tags->'emergency'IN ('defibrillator', 'phone') OR amenity IN ('hospital', 'clinic', 'doctors', 'pharmacy') THEN 20
-- Other emergency-related amenities
WHEN amenity IN ('bicycle_repair_station', 'compressed_air', 'drinking_water', 'police', 'toilets',
'water_point', 'charging_station') THEN 21
Expand Down

0 comments on commit 19a9266

Please sign in to comment.