Support ArcGIS globe
Background
ArcGIS supports rendering a globe with SceneView.viewingMode = global. This PR tries to add support for ArcGIS globe to @deck.gl/arcgis.
viewState computation is not correct yet. I welcome any advise about how to compute deck viewState from ArcGIS camera.
Change List
- compute viewState depending on view.viewingMode in @deck.gl/arcgis/deck-renderer
- add new example arcgis-globe
Coverage decreased (-0.09%) to 82.312% when pulling a0bf1f2f228a18c434848d8a114e145e41e805dc on zakjan:arcgis-globe into 2398eda6e20556e788070a587fead8ce2fdab9ba on visgl:master.
Can you give more details on how the view state is incorrect? I'm doing some work on syncing the Google Maps view state and will be writing up a doc on this soon. Perhaps it'll be useful for your case also
It's incorrect on my side, I haven't figured out yet the correct computation from ArcGIS globe camera to deck globe viewState. ArcGIS globe camera x/y/z is in meters. See the four TODOs at https://github.com/zakjan/deck.gl/blob/e423ea56836eaa80ee048d49f42f04f5ac418c53/modules/arcgis/src/deck-renderer.js#L44-L56
There is a new example arcgis-globe, where it can be tested.
Current state: deck.gl globe overlay matches roughly with ArcGIS globe. ArcGIS globe features disabled in demo: tilt, rotation, sun.
It's still incorrect though, I haven't found out the correct calculations yet. The main challenge is computing deck.gl altitude and zoom from ArcGIS altitude in meters. I'm not sure why deck.gl requires separate altitude and zoom.
Also, for a precise match there might be an issue that Earth radiuses are different, not configurable. deck.gl uses 6370972, ArcGIS uses 6378137.
Altitude is used both for the projection (think of it as another way to specify FOV) and the view matrix. A similar approach is taken by Mapbox, but this isn't always what other libraries do. For background, you might want to take a look at:
https://github.com/visgl/deck.gl/blob/felix/google-vector/docs/developer-guide/base-map-viewport-alignment.md
https://github.com/visgl/deck.gl/pull/5930
Thanks for the fresh new guide, I'll go through it! Because ArcGIS altitude is in meters, it seems that it serves both purposes, defining FOV and map zoom level.
HI, is there any progress on this issue