I've successfully called the NAServer route API and using returnRoutes=true, I have an object within my javascript that contains the results of my routing request.
How can I add this to a feature layer so it gets permanently stored?
I've tried using layer.add and applyEdits but nothing seems to happen, and I don't appear to get any error messages.
This is my first time battling with javascript and the ESRI SDK, so I might be making foolish errors. So,
1) Is the route object returned from the routing service a valid geometry to save in a feature layer?
2) Do I have to create a feature layer first to save it to? Does it have to have the exact same attributes?
3) Has anybody ever done this, and can point me at some sample code that might help?
Many thanks in advance
Rob