I am building a dojo app using the ESRI JavaScript version 4.5. I built it using these instructions from ESRI:
https://developers.arcgis.com/javascript/latest/guide/using-bower/
I'm trying to render my feature layers with WebGL. In order to do this, I need to include this script tag before loading the JavaScript API into the app:
<script>
var dojoConfig = {
has: {
"esri-featurelayer-webgl": 1
}
}
</script>
I downloaded the ESRI JavaScript API to my machine, so I don't have to load it into the app. Where do I include this script tag to make WebGL work?
1 Answer 1
Make sure you check out the sample application in the jsapi-resources repo.
You'll want to add that flag in the defaultConfig
of the Dojo build profile. In that sample, the flag is set to 0
, so you can just change it to 1
when you do your build.
Hope that helps!