Select to view content in your preferred language

How can I get FeatureCollectionTable.DisplayName to serialize when FeatureCollection.ToJson() is called?

439
1
03-11-2019 03:38 PM
by Anonymous User
Not applicable

I added a few lines to set DisplayName in the CreateFeatureCollectionLayer.cs file in the samples ...

When the onload event fires, I deserialize ...

I don't see any of the DisplayNames in the json file. (see attached)

How can I get the DisplayNames to be included when I serialize (and deserialize)?

Thanks, Kirk

0 Kudos
1 Reply
by Anonymous User
Not applicable

I notice that if I add Name to the layerDefinition element in the json created by FeatureCollection.ToJson, then deserialize FromJson, the resulting tables have names.

Are there any plans to add a new constructor for FeatureCollectionTable that would let me pass the tableName as an argument? 

... that way people wouldn't have to convert back and forth through json simply to assign table names.

0 Kudos