The CSV layer type references a CSV or TXT file from a publicly-accessible web server. It then dynamically loads into the map 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.
blendModeBlend modes are used to create various effects by blending colors of top and background layers. normal blend mode is the default.
Valid values: average, color, color-burn, color-dodge, darken, destination-atop, destination-in, destination-out, destination-over, difference, exclusion, hard-light, hue, invert, lighten, lighter, luminosity, minus, multiply, normal, overlay, plus, reflect, saturation, screen, soft-light, source-atop, source-in, source-out, vivid-light, xor
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.
effectEffect provides various filter functions to achieve different visual effects similar to how image filters (photo apps) work.
featureEffectFeature Effect emphasizes or deemphasizes features that satisfy a filter using graphical effects
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.
layerDefinitionA layerDefinition object defining the attribute schema and drawing information for the layer.
layerTypeString indicating the layer type.
Valid value of this property CSV
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.
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.
titleA user-friendly string title for the layer that can be used in a table of contents.
typeDeprecated, use layerType instead.
urlThe URL to the layer.
visibilityBoolean property determining whether the layer is initially visible in the web map.
visibilityTimeExtentRepresents time extent that will control when a layer should be visible based on webmap’s current time. Visibility time extent only affects the layer visibility and will not filter the data.

Example

{
"id": "csv_7927",
"layerType": "CSV",
"title": "Earthquakes",
"visibility": true,
"opacity": 1,
"url": "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_month.csv",
"columnDelimiter": ",",
"blendMode": "overlay",
"layerDefinition": {
"geometryType": "esriGeometryPoint",
"objectIdField": "__OBJECTID",
"typeIdField": "",
"fields": [],
"types": [],
"capabilities": "Query",
"name": "csv",
"extent": {
"xmin": -20034970.25849882,
"ymin": -9494815.985282788,
"xmax": 20026086.963133518,
"ymax": 14269743.874052156,
"spatialReference": {
"wkid": 102100
}
}
},
"popupInfo": {},
"locationInfo": {
"locationType": "coordinates",
"latitudeFieldName": "latitude",
"longitudeFieldName": "longitude"
}
}