FeatureLayer performance improvements [beta]

Note: Support for 3D on mobile devices may vary, view the system requirements for more information.

This sample demonstrates how to enable WebGL rendering of a FeatureLayer to display more than 180,000 features in a MapView. By default, FeatureLayer is rendered using Scalable Vector Graphics (SVG), which limits the number of features that can be displayed in the view. FeatureLayers rendered with WebGL overcome that limitation, allowing the user to display hundreds of thousands, even millions, of features in the browser.

To enable WebGL rendering for FeatureLayers, paste the following script in your application prior to loading the ArcGIS API for JavaScript:

  var dojoConfig = {
    has: {
      "esri-featurelayer-webgl": 1

As of version 4.5 of the ArcGIS API for JavaScript, WebGL rendering of FeatureLayer is in beta. To learn more about rendering large datasets with FeatureLayer, read the Render FeatureLayer with WebGL (beta) section of the FeatureLayer class description.

WebGL is already leveraged by VectorTileLayer to display large amounts of data in the browser. While VectorTileLayer can be used to display thematic data similar to the visualization in this sample, the data must be cooked when published, whereas FeatureLayer does not have to go through a cooking process. FeatureLayer is also more dynamic; it can be filtered with definitionExpression, queried, and referenced in a Legend. Its renderer (visualization) can also be easily updated to dynamically change with one variable, or driven by other variables present in the underlying data. To change the visualization of the data in this sample, select any of the actions in the LayerList widget. This will redraw the layer based on a different field or expression indicated by the given renderer.

Additional 2D WebGL samples and resources


Sample search results


There were no match results from your search criteria.