Skip to content

Commit

Permalink
Add more icons
Browse files Browse the repository at this point in the history
  • Loading branch information
bubelov committed Oct 18, 2023
1 parent d37a9de commit c7329ce
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
21 changes: 21 additions & 0 deletions src/command/generate_android_icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ impl OverpassElement {
let attraction = self.get_tag_value("attraction");
let golf = self.get_tag_value("golf");
let shelter_type = self.get_tag_value("shelter_type");
let aeroway = self.get_tag_value("aeroway");

let mut icon_id: &str = "question_mark";

Expand Down Expand Up @@ -110,6 +111,10 @@ impl OverpassElement {
icon_id = "roofing"
}

if aeroway != "" {
icon_id = "paragliding"
}

if landuse == "retail" {
icon_id = "storefront"
}
Expand Down Expand Up @@ -930,6 +935,10 @@ impl OverpassElement {
icon_id = "pedal_bike"
}

if amenity == "bicycle_repair_station" {
icon_id = "pedal_bike"
}

if amenity == "townhall" {
icon_id = "group"
}
Expand Down Expand Up @@ -1046,6 +1055,14 @@ impl OverpassElement {
icon_id = "mic"
}

if amenity == "hookah_lounge" {
icon_id = "smoking_rooms";
}

if amenity == "library" {
icon_id = "menu_book";
}

if leisure == "sports_centre" {
icon_id = "fitness_center"
}
Expand Down Expand Up @@ -1210,6 +1227,10 @@ impl OverpassElement {
icon_id = "golf_course"
}

if sport == "equestrian" {
icon_id = "bedroom_baby"
}

if craft == "blacksmith" {
icon_id = "hardware"
}
Expand Down
5 changes: 2 additions & 3 deletions src/command/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,8 @@ pub async fn run(conn: Connection) -> Result<()> {
send_discord_message(message).await;
}

if element.osm_json.up_to_date()
&& (element.get_btcmap_tag_value_str("icon:android") == ""
|| element.get_btcmap_tag_value_str("icon:android") == "question_mark")
if element.get_btcmap_tag_value_str("icon:android") == ""
|| element.get_btcmap_tag_value_str("icon:android") == "question_mark"
{
let message = format!("{} Up-to-date element has no icon", url,);
error!(message);
Expand Down

0 comments on commit c7329ce

Please sign in to comment.