Where can I find the feature Layer ID

5260
6
01-13-2017 11:10 AM
JoseSanchez
Occasional Contributor III

Hello everyone,

Where can I find in ArcGIS Online the Feature Layer ID in this sample

"id":"Wildfire_4234"

Edit—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers 

 

 "layerInfos": [{       "featureLayer": {        "id":"Wildfire_4234"      },

Thanks

0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus

Jose,

   You should not have to manually edit the json file. If you use the Widgets settings UI then it will do all that for you. If you want to reset the widget in your app then just delete the edit widget save the app and re-add the edit widget.

JoseSanchez
Occasional Contributor III

Hi Robert,

In my case I already have the whole Web AppBuilder JavaScript  application with customized source code in the Edit Widget, ready. This Web AppBuilder javascript  runs in IIS development server.

If I delete the edit widget, save the app and re-add the edit widget, then I have to Download the source code again because I have lost  the source code customization.

How do you handle deployments to production in ArcGIS Online?

Thanks.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jose,

   I don't use AGOL for that as I have my own ArcGIS Server and web server that host all my apps. So in your situation you do need to find the id and edit the edit widgets json manually.

You can retrieve the layer ID from the web map ID as shown in the below example:

http://<your portal url>/sharing/rest/content/items/32a83775654249dcae6b8f2eff5d4072/data/?f=pjson

JoseSanchez
Occasional Contributor III

Robert,

We have our own ArcGIS Server, and IIS web server. We no not have ArcGIS Portal.

So in your case when you customize the source code of a Web Mapping Application, how do you keep the code modified if you need to change for example the Widget Editor .

Thanks

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jose,

   I build my apps in WAB Developer Edition and once I have them configured to my liking I download them and deploy them to my production web server. If I need to make a major change then I go back to the app in WAB and make that change and if the change was to just one widget then I just get the widgets json file from the apps configs folder and copy that json to my production web server. If it was a code change to a widget then I copy the widget to the web server as well. In an extreme case where I made a change to the jimu.js core files then I would re-download the whole app again and move it to the web server again.

DavidPfeiffer
New Contributor

For those who still have the question, "Where do I find my layer ID for locally hosted ArcGIS Server REST layers", I will share my workaround:

1) Create a legend within dev edition of Web AppBuilder for ArcGIS

2) Save

3) Navigate to C:\Your\App\Builder\Folder\apps\x\configs\Legend\config_widgets_Legend_Widget.json

4) Each layer ID will be listed in the array "layerState":{"Layer_ID_####"}