Feature Layer from Feature Collection applyEdits don't work

2898
20
Jump to solution
04-20-2017 03:45 AM
ZdeněkSoldán
Occasional Contributor

Hello,

In a widget I create a new Feature Layer from Feature Collection. From web service I want to add features to this Feature Layer. When I fire applyEdits() function to add the features everything goes well without any error message. But the Feature Layer is still empty. I tried to add edits-complete event and it also fired after complete adding features, so everything seems to be good but the Feature Layer is still empty.

My code is almost the same as this sample code Feature collection | ArcGIS API for JavaScript 3.20  

But I don't know where could be the problem because the whole code works. 

Have anyone an idea?

Thanks for any help.

0 Kudos
20 Replies
ZdeněkSoldán
Occasional Contributor

Robert,

I found what was wrong. The problem was really in the response from web service. Our projection must have minus sign before number and x and y coords are swapped in web service. 

Now everything works. 

Thank you for your time.

0 Kudos