In my code, I have created a new FeatureLayer using client-side graphics:
var fl = new FeatureLayer({
source: array_of_Graphics_Objects,
...
});
map.add(fl);
The FeatureLayer is created and displaying successfully in the MapView. I would now like to publish it to my ArcGIS Online account so the contents are saved as a hosted FeatureLayer. Any help on how to go about this would be appreciated.
Thank you.
Solved! Go to Solution.
We currently do not have this functionality with the 4x version of the JS API. Soon we will have the ability to save webmaps. You can test this out with the js-next:
feedback-js-api-next/CHANGELOG.md at master · Esri/feedback-js-api-next · GitHub
We currently do not have this functionality with the 4x version of the JS API. Soon we will have the ability to save webmaps. You can test this out with the js-next:
feedback-js-api-next/CHANGELOG.md at master · Esri/feedback-js-api-next · GitHub
Thank you very much. This may be a bit outside the scope of this question, but I believe I can mimic the functionality I'm looking for by using the arcgis-rest-js modules to createItem() in create a new feature layer in ArcGIS Online, then use the javascript api's featureLayer.applyEdits() functionality to add in Graphics objects as new features. Can you/anyone confirm if this could work as intended?