I'm interested in passing a geometry object with certain attributes to an exposed feature class for committed edits. Essentially, I want to manually create a new feature without the template pane or editor widget. The geometry and attributes are both pre-defined, and the user just needs to select one pair from a group and push an "Add to Geodatabase" button.

I'm reading through the documentation and I can't see a clear way to do this. I see that if I don't want the pane or widget, then I need to use a geometry service, but I don't see a "create feature" method, or something that accepts a geometry object or attributes.

1 Answer 1


have you seen this sample?

in general, whether you use the TemplatePicker or not, the approach you should take is the same. That is to instantiate a Graphic object using your geometry and attributes and pass the graphic within FeatureLayer.applyEdits().

depending on the argument position of the graphic, this method allows adding new features, editing existing feature geometry or attributes and deleting as well.

  • Thanks John, this is exactly what was needed. I think I breezed over this sample because it included the template picker, but I see that's not a vital part of the process.
    – user30052
    Jun 28, 2014 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.