The CSV layer type references a CSV or TXT file from a publicly-accessible web server. It then dynamically loads into the scene at run time. The CSV layer will maintain a reference to the CSV resource.

Referenced by: operationalLayers

Properties

PropertyDetails
attributeTableInfoAn attributeTableInfo object defining how the data will be presented in tabular format.
columnDelimiterA string defining the character used to separate columns in a CSV file.
Valid values:
  • \t (tab)
  •   (space)
  • , (comma)
  • ; (semicolon)
  • | (pipe)
customParametersA sequence of custom parameters appended to the URL of all requests related to a layer.
disablePopupIndicates whether to allow a client to ignore popups defined by the service item.
idA unique identifying string for the layer.
itemIdOptional string containing the item ID if it’s registered on ArcGIS Online or your organization’s portal.
layerDefinitionAdditional properties that define drawing information and other configurations for the layer.
See layerDefinition properties table.
layerTypeString indicating the layer type.
Valid value of this property CSV
listModeTo show or hide the layer in the layer list
Valid values:
  • hide
  • show
locationInfoA locationInfo object defining how location information will be retrieved from a CSV file.
opacityThe degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency.
popupInfoA popupInfo object defining the content of popup windows when you click or query a feature.
refreshIntervalRefresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled.
screenSizePerspectiveApply perspective scaling to screen-size symbols.
showLabelsLabels will display if this property is set to true and the layer also has a labelingInfo property associated with it.
showLegendBoolean value indicating whether to display the layer in the legend. Default value is true.
timeAnimationIndicates whether to enable time animation if the layer supports it. Default value is true.
titleA user-friendly string title for the layer that can be used in a table of contents.
urlThe URL to the layer.
visibilityBoolean property determining whether the layer is initially visible in the web scene.
visibilityTimeExtentRepresents time extent that will control when a layer should be visible based on webscene’s current time. Visibility time extent only affects the layer visibility and will not filter the data.

layerDefinition properties

PropertyDetails
definitionExpressionSQL-based definition expression string that narrows the data to be displayed in the layer.
drawingInfo.labelingInfo[]An array of labelingInfo objects.
drawingInfo.rendererThe renderer object contains the drawing information for the operationalLayer.
drawingInfo.transparencyNumber value ranging between 0 (no transparency) to 100 (completely transparent).
elevationInfoElevation info defines how features and other scene elements are aligned to ground or other layers.
featureReductionAn object that specifies how features are reduced or aggregated, with the goal of decluttering the view or presenting the user with an aggregate visualization.
fields[]An array of field objects containing information about the attribute fields for the feature collection or layer.
floorInfoContains floor-awareness information for the layer.
maxScaleRepresents the maximum scale (most zoomed in) at which the layer is visible in the view. If the web scene is zoomed in beyond this scale, the layer will not be visible. A value of 0 means the layer does not have a maximum scale. If set, the maxScale value should always be smaller than the minScale value, and greater than or equal to the service specification.
minScaleRepresents the minimum scale (most zoomed out) at which the layer is visible in the view. If the web scene is zoomed out beyond this scale, the layer will not be visible. A value of 0 means the layer does not have a minimum scale. If set, the minScale value should always be larger than the maxScale value, and lesser than or equal to the service specification.
timeInfoAn object that defines properties to enable time on a layer or table.

csv Layer Example

{
"id": "15844915609-layer-0",
"layerType": "CSV",
"title": "earthquake",
"url": "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_week.csv",
"columnDelimiter": ",",
"opacity": 1,
"visibility": true,
"layerDefinition": {
"drawingInfo": {
"renderer": {
"type": "simple",
"symbol": {
"type": "PointSymbol3D",
"symbolLayers": [
{
"material": {
"color": [
238,
69,
0
],
"transparency": 50
},
"type": "Icon",
"resource": {
"primitive": "circle"
},
"size": 17.25,
"outline": {
"color": [
255,
255,
255
],
"size": 0.5
}
}
]
}
}
}
}
}