Quantcast
Viewing latest article 6
Browse Latest Browse All 15

Enable WebGL Feature Layer in Web AppBuilder Developer Edition 2.8

The WebGL rendering of feature Layer allows you to display more data in the map and update the visualization of features more rapidly. Although it is not supported in Web AppBuilder Developer Editon 2.8, you can manually opt in with the steps below.

1. Find the init.js file in the client/stemapp folder
2. Add a line to dojoConfig:

 

dojoConfig = {
   parseOnLoad: false,
   async: true,
   tlmSiblingOfDojo: false,
   has: {
   'extend-esri': 1,
   // add this line
   'esri-featurelayer-webgl': 1
   }
};

3. Save the file
3. Start Web AppBuilder Developer Edition 2.8 and create a new 2D app

 

To verify whether the layer is rendered in WebGL, access the layer through this.map.getLayer in the Widget.js file. Then call the following properties and method:

 

var layerId = this.map.graphicsLayerIds[0];
var layer = this.map.getLayer(layerId);

 

console.log("webgl enabled on map? ", this.map.webglEnabled);
console.log("webgl enabled on layer? ", layer.webglEnabled);
console.log("layer drawn with webgl? ", layer.hasWebGLSurface());

 

Also, see known limitations for the WebGL Feature Layer.


Viewing latest article 6
Browse Latest Browse All 15

Trending Articles