FeatureLayer Layer source does not support applyEdits capability

792
7
Jump to solution
03-03-2019 08:34 AM
YarivHabot
New Contributor

I'm creating a FeatureLayer, its source is an array of objects.

Everything works well until I try to add a point to the layer using applyEdits. It throws an exception saying "FeatureLayer Layer source does not support applyEdits capability".

What does this error mean? How do I make the layer support applyEdits?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Yariv,

   I not 100% sure but I think in 4.8 you made edits to the source by just directly editing the source graphics. There is no need to use applyEdits as there is no server involved. In 4.10 you will use applyEdits for FeatureLayers that come from client side graphics.

View solution in original post

0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus

Yariv,

  Which version of the JS API are you referring to?

0 Kudos
YarivHabot
New Contributor

4.8

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Yariv,

   I not 100% sure but I think in 4.8 you made edits to the source by just directly editing the source graphics. There is no need to use applyEdits as there is no server involved. In 4.10 you will use applyEdits for FeatureLayers that come from client side graphics.

0 Kudos
YarivHabot
New Contributor

Thank you, but I'm not sure I understand. I would like to add a point. Once the FeatureLayer has loaded, with the points I added to its source, how do I add a new point?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

You just add the new point to the graphic array that you used as the FL source.

0 Kudos
YarivHabot
New Contributor

Thank you very much!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Don’t forget to mark this question as answered by clicking on the mark correct link on the reply that answered your question.

0 Kudos