Is there a way to edit an existing QuickCapture project to bring in additional layers?

831
1
Jump to solution
06-27-2019 09:29 AM
Labels (1)
DebsGray
New Contributor III

I have created a QuickCapture project using an existing layer. I was wondering if when you are editing a project, you could add in additional layers instead of adding them all at once at the very beginning of creating a project?

0 Kudos
1 Solution

Accepted Solutions
JohnathanHasthorpe
Esri Regular Contributor

Hi Debs

We are planning this functionality in the future. But for the time being, you can add new layers using the designer's JSON editor. Please see the documentation for this functionality here.

Essentially you can add in a new layer in the project JSON using the dataSources array:

"dataSources": [

{

       "featureServiceItemId": "1f683747c06c4a7e9843a477b2ab41e0",

       "dataSourceId": 0,

       "url": "https://services1.arcgis.com/e7dVfn25KpfE6dDd/arcgis/rest/services/LayerOne/FeatureServer/0" },

{

      "featureServiceItemId": "2b313747c06c4a7e9843a477b2ab41e0",

      "dataSourceId": 1,

      "url": "https://services1.arcgis.com/b45KpfE6dEf121/arcgis/rest/services/LayerTwo/FeatureServer/1" }

]

Each dataSource is defined by 3 properties: 

      -  featureServiceItemId:  The itemid of the feature layer

      -  dataSourceId: A unique ID for the layer that can be used to link it to a button/template

      -  url: The url of the feature layer (including the layer number e.g. /1)

You just need to make sure you are entering valid JSON.

Once you add a new layer, you then need to use the datasourceId to link a button/template to it:

"captureInfo": {
      "continuous": false,
      "exclusivityGroup": null,
      "dataSourceId": 1,
      "type": "esriGeometryPoint"
},

I recommend that you take a moment to look at the JSON structure of your project using the JSON editor, and get familiar with it. To do this, open your project in https://quickcapture.arcgis.com and then click the </> button.

Please let me know if you need any further help with this.

Thanks

John

View solution in original post

0 Kudos
1 Reply
JohnathanHasthorpe
Esri Regular Contributor

Hi Debs

We are planning this functionality in the future. But for the time being, you can add new layers using the designer's JSON editor. Please see the documentation for this functionality here.

Essentially you can add in a new layer in the project JSON using the dataSources array:

"dataSources": [

{

       "featureServiceItemId": "1f683747c06c4a7e9843a477b2ab41e0",

       "dataSourceId": 0,

       "url": "https://services1.arcgis.com/e7dVfn25KpfE6dDd/arcgis/rest/services/LayerOne/FeatureServer/0" },

{

      "featureServiceItemId": "2b313747c06c4a7e9843a477b2ab41e0",

      "dataSourceId": 1,

      "url": "https://services1.arcgis.com/b45KpfE6dEf121/arcgis/rest/services/LayerTwo/FeatureServer/1" }

]

Each dataSource is defined by 3 properties: 

      -  featureServiceItemId:  The itemid of the feature layer

      -  dataSourceId: A unique ID for the layer that can be used to link it to a button/template

      -  url: The url of the feature layer (including the layer number e.g. /1)

You just need to make sure you are entering valid JSON.

Once you add a new layer, you then need to use the datasourceId to link a button/template to it:

"captureInfo": {
      "continuous": false,
      "exclusivityGroup": null,
      "dataSourceId": 1,
      "type": "esriGeometryPoint"
},

I recommend that you take a moment to look at the JSON structure of your project using the JSON editor, and get familiar with it. To do this, open your project in https://quickcapture.arcgis.com and then click the </> button.

Please let me know if you need any further help with this.

Thanks

John

0 Kudos