
meta {
    title: "Station names on subway entrances";
    version: "0.1.4_2018-10-15";
    description: "Shows station names on subway entrances via stop_area relation";
    author: "Alexander-II";
    link: "https://wiki.openstreetmap.org/wiki/Tag:public_transport%3Dstop_area";
}

meta[lang=ru] {
    title: "Названия станций на выходах метро";
    description: "Показывает названия станций метро на выходах из метро с использованием отношения stop_area";
    link: "https://wiki.openstreetmap.org/wiki/Tag:public_transport%3Dstop_area";
}

relation[type=public_transport][public_transport=stop_area][name] > node::subway_entrance_label {
  station_name: parent_tags(name); /* this list won't contain more than one item until https://josm.openstreetmap.de/ticket/7151 is unresolved */
  set .has_station_name;
}

node|z18-[railway=subway_entrance].has_station_name::subway_entrance_label {
  text: concat("Выход № ", tag(ref), " со станций: " ,join_list(", ", prop(station_name)));
  text-anchor-vertical: above;
  text-offset-x: 5;
  font-size: 11; /* TODO maybe it makes sense to put text size in settings */
}

