It's also possible to include icons from external URLs.
Show cafes and banks with an icon
The following example selects amenity=cafe
and amenity=bank
in Zermatt and puts an icon for the found nodes.
{{geocodeArea: Zermatt }} -> .zermatt;
(
node[ amenity=bank ](area.zermatt);
node[ amenity=cafe ](area.zermatt);
);
out geom;
{{style:
node[amenity=bank] {
icon-image : url('icons/maki/bank-24.png');
}
node[amenity=cafe] {
icon-image : url('icons/maki/cafe-24.png');
}
}}
Icon width and height
The size of icons can be specified with icon-width
and icon-height
, for example like so:
node[amenity=cafe] {
icon-image : url('icons/maki/cafe-24.png');
icon-width : 24;
icon-height : 24;
}