Select to view content in your preferred language

How open a layer from arcgis online to add more features.

1171
4
12-13-2017 06:29 PM
JuanOropeza
Occasional Contributor

I was following this tutorial for .Net and UWP. 

Author, edit, and save maps to your portal—ArcGIS Runtime SDK for .NET | ArcGIS for Developers 

There I connect to my ArcGis Online account using my user/password. I create a Feature Collection local add features and save the map + feature collection on my content in my Online account.

But what I need is get one layer already on my ArcGis Online add more features and save it. 

0 Kudos
4 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi,

If you have an existing ArcGIS Online feature layer you can open that as a portal item and work with it as either a ServiceFeatureTable or a FeatureCollectionTable depending on whether the item references a feature service or a feature collection. For an example see Create a feature collection layer from a portal item—ArcGIS Runtime SDK for .NET Samples | ArcGIS fo... 

Cheers

Mike

0 Kudos
JuanOropeza
Occasional Contributor

When you import data from your pc this become a hosted feature layer I think that mean is a ServiceFeatureTable. Is there an example to open one of those from your ArcGisOnline? Or one example to create a FeatureCollection Table from a Service Feature? Also an example to add new features to the Service/Collection.

0 Kudos
AnttiKajanus1
Deactivated User

Please have a look at this sample Service feature table (cache)—ArcGIS Runtime SDK for .NET Samples | ArcGIS for Developers for the service feature table usage, then you can find more information about editing from Edit features—ArcGIS Runtime SDK for .NET (WPF) | ArcGIS for Developers topic. There is also Edit and sync features—ArcGIS Runtime SDK for .NET Samples | ArcGIS for Developers  sample that shows how to do edits on local table, it's basically the same in ServiceFeatureTable but you have to explicitly call ServiceFeatureTable.ApplyEditsAsync Method to save your changes to the service. Hope that helps.

0 Kudos
JuanOropeza
Occasional Contributor

In the example they create a function for click event

 You can provide this capability by listening to a click event on your map view, which in turn will call a function for adding a new feature.

But they dont show how listening to the MapView click event. How I match the function to the click?

0 Kudos