GraphicsOverlay vs FeatureCollectionTable

08-15-2017 09:04 PM
Occasional Contributor

I'm looking at a few of the samples. 

There are some GraphicsOverlayexamples

These create points, lines and polygons for display on the screen. 

Presumably, the data just in memory. 

There is another example called CreateFeatureCollectionLayer.

This creates points, lines, and polygons for display on the screen. 

While there are many ways to create FeatureCollection, this example creates it from scratch and puts data in it. 

The data is just . . . well, I don't know if it is just in memory.  

But if it does make it to persistent storage, I don't how you would get it back later. 

I see there are methods to save it to a portal item. Not sure that would apply to Basic licensing. Nothing to save it locally, though. 

So, if they are both in memory objects, why would I use one vs the other?


0 Kudos
3 Replies
Occasional Contributor

Does anyone who has used them have some insight?

0 Kudos
Esri Frequent Contributor

FeatureCollectionTable is persisted in the Map, so when you save the Map, it's embedded inside it. You can also save it to the portal - if you do that, once you save the Map, the map will now point to the portal item, instead of embedding all the features inside the map JSON (this is useful if you want to reuse it between many maps).

You can also call ToJson() on the FeatureCollection itself, and persist it your own way.

0 Kudos
Occasional Contributor

It looks like the save methods of Map are meant to save to a PortalItem, not locally.

I'd need a Basic license for that, so that's out for a consumer grade app.

Maybe this is some of the information I am looking for:

Features and graphics—ArcGIS Runtime SDK for .NET | ArcGIS for Developers  


Since mobile geodatabases are read only in my licensing level, I was looking for the right way to store user data in the form of lines, points, and shapes. It will probably come from a local SQLite file, though it might be Spatialite if I can swing it. 

The best option I could come up with is to continually refresh the data in a Graphics Overlay (or a bunch of FeatureTables) whenever the map view changes by querying the SQLite database for things that need to be drawn. 

It appears that FeatureTables are meant for persistence, but only in ways that my licensing doesn't allow. So that difference disappears. 

So perhaps I go by which one is easier to code. 

0 Kudos