Skip to content

Commit b93eca5

Browse files
authored
Merge pull request #38 from tordans/patch-2
Update creating-cooperative-challenges with a full example
2 parents 8e41c4d + a426a3e commit b93eca5

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

src/en-us/documentation/creating-cooperative-challenges.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,48 @@ eleventyNavigation:
8787
```
8888

8989
{% translate "CreatingCooperativeChallanges.content6", page.url | getUrlLang %}
90+
91+
### Full example
92+
93+
This is a full example of a valid GeoJSON that uses `setTags` for two features.
94+
95+
```javascript
96+
{
97+
"type": "FeatureCollection",
98+
"features": [
99+
{
100+
"type": "Feature",
101+
"properties": {
102+
"id": "point/123",
103+
"otherkeys": "othervalues"
104+
},
105+
"geometry": {
106+
"type": "Point",
107+
"coordinates": [13.4050, 52.5200]
108+
}
109+
}
110+
],
111+
"cooperativeWork": {
112+
"meta": {
113+
"version": 2,
114+
"type": 1
115+
},
116+
"operations": [
117+
{
118+
"operationType": "modifyElement",
119+
"data": {
120+
"id": "point/123", // same id as `feature[0].properties.id` above
121+
"operations": [
122+
{
123+
"operation": "setTags",
124+
"data": {
125+
"nice": "place"
126+
}
127+
}
128+
]
129+
}
130+
}
131+
]
132+
}
133+
}
134+
```

0 commit comments

Comments
 (0)