1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
[out:json][timeout:25];
way[leisure=playground]({{bbox}});
map_to_area;
 
foreach->.d(
   node(area.d)
     (if: is_tag("amenity") || is_tag("playground") ) -> .a;
   .a out skel;
   .a convert node
    ::=::, 
    ::id=id(),
    plac_id=d.min(id());
   out;
  
   way(area.d)[playground] -> .b;
   .b out geom;
   .b convert way
    ::=::, 
    ::id=id(),
    plac_id=d.min(id()),
    size=length();
  out;
  (.a;.b;) -> .c;  
  
  .d out geom;
  .d convert way
    ::=::,
    ::id=id(),
    playground_in=c.set(t["playground"]),
    amenity_in=c.set(t["amenity"]);
  out; 
);
 
{{style:
way[playground_in=~/.*seesaw.*/]
{ color:green; fill-color:green; }
 
way[playground_in=~/.*sandpit.*/]
{ color:yellow; fill-color:yellow; }
 
way[playground_in=~/.*swing.*/]
{ color:blue; fill-color:blue; }
}}
100 m
Leaflet © OpenStreetMap contributors
1