An object defining a layer of features whose geometry and attributes will be stored directly within the web map. This is used when features are referenced by the client and no url is being used. Feature Collection can be generated from shapefiles, CSVs, GPX files, or map notes. Map notes allows you to add your own data directly to a map. With a map notes layer, you use features to symbolize something you want to show on your map. You can also add descriptive information that appears in pop-ups when the feature is clicked. Map notes are stored directly within the web map and not as a separate item.

Referenced by: Feature Layer (ArcGISFeatureLayer)

Properties

PropertyDetails
groupIdFieldThe name of the attribute field of features in the feature collection that contains group identifier. The identifier will be one of those specified in groups.
groups[]Specifies the type of groups available in the feature collection.
layers[]An array of layer objects defining the styling, geometry, and attribute information for the features.
See layers properties table.
showLegendBoolean value indicating whether to display the layer in the legend. Default value is true.

layers properties

PropertyDetails
featureSetA featureSet object containing the geometry and attributes of the features in the layer.
layerDefinitionThe layerDefinition object defines the attribute schema and drawing information for the layer.
nextObjectIdIterates within a featureset. Number objectId value is incremented 1 based on last Object ID defined for the feature in a featureset. Used with feature collections.
popupInfoA popupInfo object defining the popup window content for the layer.
showLegendBoolean value indicating whether to display the layer in the legend. Default value is true.

Example

{
"showLegend": false,
"groupIdField": "GROUPID",
"groups": [
{
"groupId": 1,
"groupType": "pointSymbolCallout"
}
]
}