GeoJSON Layer (GeoJSON)

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

Referenced by: operationalLayers

Properties

Property Details
customParameters A sequence of custom parameters appended to the URL of all requests related to a layer.
disablePopup Indicates whether to allow a client to ignore popups defined by the service item.
id A unique identifying string for the layer.
itemId Optional string containing the item ID if it's registered on ArcGIS Online or your organization's portal.
layerDefinition Additional properties that define drawing information and other configurations for the layer.
See layerDefinition properties table.
layerType String indicating the layer type.
Valid value of this property GeoJSON
listMode To show or hide layers in the layer list
Valid values:
  • hide
  • show
maxScale A number representing the maximum scale at which the layer will be visible. The number is the scale's denominator.
minScale A number representing the minimum scale at which the layer will be visible. The number is the scale's denominator.
opacity The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency.
popupInfo A popupInfo object defining the content of popup windows when you click or query a feature.
refreshInterval Refresh 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.
screenSizePerspective Apply perspective scaling to screen-size symbols.
showLabels Labels will display if this property is set to true and the layer also has a labelingInfo property associated with it. This property can get stored in the web scene config.
showLegend Boolean value indicating whether to display the layer in the legend. Default value is true.
timeAnimation Indicates whether to enable time animation if the layer supports it.
title A user-friendly string title for the layer that can be used in a table of contents.
url The URL to the layer.
visibility Boolean property determining whether the layer is initially visible in the web scene.
visibilityTimeExtent Represents 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

Property Details
definitionExpression SQL-based definition expression string that narrows the data to be displayed in the layer.
drawingInfo.labelingInfo[] An array of labelingInfo objects.
drawingInfo.renderer The renderer object contains the drawing information for the operationalLayer.
elevationInfo Elevation info defines how features are aligned to ground or other layers.
featureReduction An 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.
objectIdField Indicates the name of the object ID field in the dataset.

geojson Layer Example

{
  "id": "geojson_1234",
  "layerType": "GeoJSON",
  "title": "Earthquakes",
  "visibility": true,
  "opacity": 1,
  "url": "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/significant_week.geojson"
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.