Replaced editable feature layer in Web Map

1684
7
Jump to solution
01-11-2017 12:51 PM
JoseSanchez
Occasional Contributor III

Hello everyone,

I copied a Web Map from an ArcGIS Online Development environment (my account) and removed one Feature Layer pointing to SDE development in the map to replace it with the same feature layer but this one pointing to the same layer but in a production SDE instance. Now when I run my Web Application Builder application the Edit Popup window, it does not show the template to edit this layer. Before the drop down box "Feature Layers" showed the layer I am editing, and in Search Templates the symbols of the template.

My Web Application Builder application works fine when I copy the Web Map from development to production, the Edit Popup window shows everything. But after changing the Feature Layer, the Edit Popup window is empty.

This is what I did:

Create a Web Map in a production account for a Envelopment account just saving the map.

 - Changed ItemID in config.json to call the new Web Map

 - Removed the Feature Layer and added a new Feature Layer with the same name but this one pointing to production.

Thanks

0 Kudos
1 Solution

Accepted Solutions
JoseSanchez
Occasional Contributor III

This is the first time I am doing a deployment in ArcGIS Online. And I thin that my questions are:

  - how to copy from one AGOL account to another AGOL account a Web Map and a Feature Layer

 - how to correctly insert the new feature layer in the Web Map, in order to work with the Web AppBuilder (WAB) application that was pointing to the first account.

I developed everything from my developer account:

  - in ArcMap, a mxd with one SDE editable layer

  - In ArcGIs Server a map service + feature service from the previous map

  - in ArcGIS Online: Feature layer pointing the the editable SDE layer, Web Map, Web Map Application

  - in Web AppBuidler, created a Web Application from Web Map

this solution works fine.

To deploy this solution, we created a new ArcGIs Online account reserved for items ready fro production, lets call it "AGOLProd"

So this is what I did,  login to ArcIS Online with AGOLProd, go to Groups and open my Web Map from development and saved it in "AGOLProd". Because this Web Map uses a Feature Layer I created this Feature layer with the same name and pointing to the same place in "AGOLProd".

After changing the value of itemId in the file "config.json" to point to the new Web Map in my "AGOLProd". Two cases:

 - if I keep the map as it is, it shows the feature layer to be edited as template in the Edit window

 - if I replace in the Web Map the feature layer, thne my Web AppBuilder (WAB)  does not show the layer in the Edit windows.

View solution in original post

0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus

Jose,

   You likely forgot to add your feature edit templates to the MXD for the new layer you are pointing to. ArcMap > Right Click Layer in the TOC > Edit Features > Organize Feature Templates

JoseSanchez
Occasional Contributor III

Hi Robert,

The map service and mxd are the same.  I am testing the deployment process, so the map service points to the layer in development.

In ArCatalog I can open the Web Map and edit the new feature layer. But it looks like in the java code it does not find the template to edit.

Where does the Edit Widget reference the template to edit?

Thanks

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jose,


  The widget gets the template from the map service. When changing data sources it is always best to check the edit templates as in my last post and then to always re-publish the service.

0 Kudos
JoseSanchez
Occasional Contributor III

I mean in ArcGIS Online "I can open the Web Map and edit the new feature layer."

My question is about how to deploy a Web Map, a Feature Layer and a Web AppBuilder (WAB) app.  We have a production environment, and I am having trouble deploying an editable feature layer.

In the Web Map that feeds the Web AppBuilder (WAB) app, I just deleted the existing feature layer and replaced with a new one created inside the publisher account. Then I shared the map and feature service with a Group. This part works fine. I can edit directly in ArcGIs Online with Web Map.

If I test my Web AppBuilder (WAB) app with the original feature layer I can edit it, but when remove the feature layer and add the new feature layer, it doesn't work because the edit window is empty it does not show any layer or template to edit. Also I did a test keeping the old feature layer and adding the new one, and it this case it shows both of them. The old one with its same name, but the new one it lists it under "All".

I did not "Make a Web Application" because I already have my Web AppBuilder (WAB) app running in IIS, and customized.

Thanks

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jose,


   So you do not have ArcGIS Server and you are using a AGOL hosted feature service?

0 Kudos
JoseSanchez
Occasional Contributor III

This is the first time I am doing a deployment in ArcGIS Online. And I thin that my questions are:

  - how to copy from one AGOL account to another AGOL account a Web Map and a Feature Layer

 - how to correctly insert the new feature layer in the Web Map, in order to work with the Web AppBuilder (WAB) application that was pointing to the first account.

I developed everything from my developer account:

  - in ArcMap, a mxd with one SDE editable layer

  - In ArcGIs Server a map service + feature service from the previous map

  - in ArcGIS Online: Feature layer pointing the the editable SDE layer, Web Map, Web Map Application

  - in Web AppBuidler, created a Web Application from Web Map

this solution works fine.

To deploy this solution, we created a new ArcGIs Online account reserved for items ready fro production, lets call it "AGOLProd"

So this is what I did,  login to ArcIS Online with AGOLProd, go to Groups and open my Web Map from development and saved it in "AGOLProd". Because this Web Map uses a Feature Layer I created this Feature layer with the same name and pointing to the same place in "AGOLProd".

After changing the value of itemId in the file "config.json" to point to the new Web Map in my "AGOLProd". Two cases:

 - if I keep the map as it is, it shows the feature layer to be edited as template in the Edit window

 - if I replace in the Web Map the feature layer, thne my Web AppBuilder (WAB)  does not show the layer in the Edit windows.

0 Kudos
JoseSanchez
Occasional Contributor III

Found it!

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

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