ESRI Graphic has "toJson()" method, but Feature Layer has not such a methos. How do I save a feature layer into json text file?
You can query the features you're interested in, iterate them and run .toJSON() on each feature. There's no quick way to export all features to JSON though, due to stuff like server query limits.
Oh and FeatureLayer queries return a FeatureSet, and that has a toJSON() method on it too. https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html
@ReneRubalcava ,I used the query to get a FeatureSet, and succeeded to save the feature layer to text and also to recreate it from that text.Thank you very much!
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.