Zum Hauptinhalt gehen

Add Features....?

Kommentare

5 Kommentare

  • Bryan Bingham

    In the Add Feature activity, set the layer property to: =$getlayeractivityname.layer and the features property to the feature you want to create (=$newFeature.feature).  You will likely need to use a create feature activity to get a valid feature object (attributes & geometry) that can be passed to server/Enterprise/AGOL through the Add Feature activity in the workflow.

    0
  • Jostein Svegården

    GIS Support, did you solve your problem? I tried to do the same thing as you described, but get the same error. Is it not possible to add new features to a feature layer created with Add Feature Layer?

    0
  • GIS Support

    Hi Jostein,

    I did get it to work but in a very convoluted workaround. From what I can tell, you can't add Features directly to the existing Feature Layer, it seems to be 'locked up'.

    What I was doing was keeping two copies of the data, a display copy and then also a copy as Application level data. When the user makes a second selection for the purpose of adding, I retrieve the Application level data, add to that, then completely remove and re-create the display data based on the Application level data.

    Hope that helps

    0
  • Jostein Svegården

    GIS Support, thanks. I would like to know how you managed to "completely remove and re-create the display data". I have tried to add features to my added feature layer by a workaround where I add them to $layer1.layer.source.items. The new features do get added, but there is clearly more that has to be done to make them visible in the map. I thought about replacing the added feature layer with a new based on "Application level data" as you say, but I haven't found a way to remove the first feature layer that my workflow added. Any input on how you did this is appreciated!

    0
  • GIS Support

    I also see some convolutedness in my code where I've added a third 'independent' layer to pass features back and forth. Not sure if this was entirely necessary but I was grasping at straws at the time. It works so this is how my code sits for now.

    For the remove and add I was using Remove Map Layer and Add Feature Layer. I've exported the Workflow, let me know your email if you want to see it.

    Would be nice to see if this can be simplified....

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.