Skip to content

Commit 2e16169

Browse files
Merge pull request #4 from Esri/jcardonadcdev-schema-changes
Incorporate minor project json schema changes
2 parents e16fd42 + a47d832 commit 2e16169

File tree

3 files changed

+21
-15
lines changed

3 files changed

+21
-15
lines changed

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,24 +115,25 @@ The properties for the objects in the `observationLayers` array.
115115
| Name | Description | Type | Required | Default |
116116
| ------ | ----------- | ----- | -------- | ------- |
117117
| itemId | The id of a Feature Layer item in the same portal where the project is stored. | string | Yes | |
118+
| layerId | The id of the layer in a multiple layer feature service | number | No | 0 |
118119
| url | The url to an ArcGIS Feature Service layer. | string | No | |
119120
| enrichmentDefinition | An object describing how enrichment fields are populated. The geometry type of the Observation Layer must be *Point* | *Enrichment Definition* See below for schema | No | |
120121

121122
### Enrichment Definition
122123

123124
| Name | Description | Type | Required | Default |
124125
| ------ | ----------- | ----- | -------- | ------- |
125-
| title | A short descriptive title for the enrichment definition | string | Yes | |
126-
| description | A short description of the enrichment definition | string | No | |
126+
| description | A short description of the enrichment definition | string | Yes | |
127127
| layers | The Enrichment Layers that are part of this definition | *Enrichment Layer Definition[]* See below for schema | Yes | |
128128

129129
### Enrichment Layer Definition
130130

131131
| Name | Description | Type | Required | Default |
132132
| ------ | ----------- | ----- | -------- | ------- |
133133
| fields | Information on source and destination fields | *Enrichment Field Definition[]* See below for schema | Yes | |
134-
| sourceItemId | The itemId of a layer in the portal hosting the application. | string | Yes | |
135-
| sourceUrl | The url to the service. The geometry type of the service layer must be *Polygon* and the layer must be in the WebMap of the project | string | No | |
134+
| sourceItemId | The itemId of a layer in the portal hosting the application. The geometry type of the service layer must be *Polygon* and the layer must be in the WebMap of the project. This or `sourceUrl` must be set. | string | No | |
135+
| sourceUrl | The url to the service. The geometry type of the service layer must be *Polygon* and the layer must be in the WebMap of the project. This or `sourceItemId` must be set. | string | No | |
136+
| layerId | The id of the layer in a multiple layer feature service | number | No | 0 |
136137

137138
### Enrichment Field Definition
138139

@@ -255,7 +256,7 @@ NOTE: WMTS service layers are cached and **ONLY ONE** can be displayed as the fo
255256
}
256257
```
257258

258-
#### Multiple observation layers (one by item id only, one by item id and url)
259+
#### Multiple observation layers (one with layerId set)
259260

260261
This also shows the `webmapId` property
261262

@@ -277,7 +278,7 @@ This also shows the `webmapId` property
277278
},
278279
{
279280
"itemId": "hijklmnop9876543",
280-
"url": "https://server/service-name/FeatureServer/2"
281+
layerId: 2
281282
}
282283
],
283284
"webmapId": "12345678"
@@ -306,14 +307,11 @@ This also shows the `webmapId` property
306307
"observationLayers": [
307308
{
308309
"itemId": "ead6deb3d93848c4a7fd58025cc2cdaa",
309-
"title": "Abandoned Building Locations with Parcel id",
310-
"url": "https://my.domain.name/arcgis/rest/services/Hosted/abandoned_buildings/FeatureServer",
311310
"enrichmentDefinition": {
312-
"title": "Building Parcel Info",
311+
"description": "Building Parcel Info",
313312
"layers": [
314313
{
315-
"itemId": "fghijklmnop123456xyz",
316-
"sourceUrl": "https://path/to/parcel/boundaries/FeatureServer/0",
314+
"sourceUrl": "https://path/to/parcel/boundaries/FeatureServer",
317315
"fields": [
318316
{
319317
"source": "id",

projects/observationproject-enriched-sample.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
"observationLayers": [
1313
{
1414
"itemId": "portal item id of feature service",
15-
"url": "url to Observation Feature Service - https://server-name/webadaptor/service-name/FeatureServer/layer-id",
1615
"enrichmentDefinition": {
17-
"title": "Title for enrichment definition",
16+
"description": "Description of enrichment definition",
1817
"layers": [
1918
{
2019
"sourceUrl": "url to Feature Service that has geoenrichment fields - https://server-name/webadaptor/service-name/FeatureServer/layer-id",
@@ -24,6 +23,16 @@
2423
"destination": "field name in observation layer"
2524
}
2625
]
26+
},
27+
{
28+
"sourceItemId": "itemId of feature service",
29+
"layerId": 2,
30+
"fieldDefinitions": [
31+
{
32+
"source": "field name in geoenrichment layer",
33+
"destination": "field name in observation layer"
34+
}
35+
]
2736
}
2837
]
2938
}

projects/observationproject-sample.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
},
1212
"observationLayers": [
1313
{
14-
"itemId": "portal item id of feature service",
15-
"url": "url to Observation Feature Service - https://server-name/webadaptor/service-name/FeatureServer/layer-id"
14+
"itemId": "portal item id of feature service"
1615
}
1716
],
1817
"webmapId": "12345678"

0 commit comments

Comments
 (0)