deck.gl
deck.gl copied to clipboard
[Bug] ArcGIS module broken in v9
Description
The ArcGIS integration is not working
Flavors
- [ ] Script tag
- [ ] React
- [ ] Python/Jupyter notebook
- [ ] MapboxOverlay
- [ ] GoogleMapsOverlay
- [ ] CartoLayer
- [ ] ArcGIS
Expected Behavior
No response
Steps to Reproduce
Run /examples/get-started/pure-js/arcgis
or /examples/get-started/react/arcgis
Environment
- Framework version: [email protected]
- Browser: all
- OS: all
Logs
No response
Taking a crack at this. The error, appears to be that the deckFbo isn't being created correctly, but initializeResources
does seem to be called from deck-layer-view-2d.js. A console log of the context object shows an instance of WebGLRenderingContext
and based of this PR it looks like it doesn't work with WebGl 1 and would be expecting WebGL2RenderingContext.
@jaredscarr thanks :) yes it is the case that we need the context to be WebGL2
It looks like with v9 the call to initialzeResources is expecting a Device, but is being passed a context . I have found the upgrade guide which shows how to create a Device. I attempted the directions to attach the context to a new Device, but get an error that Device.attach is not a function.
const gl = this.context;
const device = Device.attach(gl);
It seems like the issue is, we need to take the gl context that ArcGIS creates, and convert it/wrap it into a device. Is that correct? If so, are there any examples in the v9 codebase of how the gl context is created/how the device is created?
Like this?
https://github.com/visgl/deck.gl/blob/2408740cb0af6790f55c6e69a7a3e53db1ae8ab1/modules/core/src/lib/deck.ts#L380