The problem is that main orb object handles different views through orb.setView where each view can have different settings so orb.view.setSettings is not able to apply correct Typescript interface (at least with the current latest TS version).
The solution could be to create a new instance on view changes, e.g.
const orb = new Orb({ generalSettings });
const view = orb.createView((context) => new DefaultView(container1, { viewSettings }));
// Use view from now on
view.render(() => {
view.recenter();
});
const newView = orb.createView((context) => new MapView(container2, { viewSettings }));
Issue: Typescript interface is not correctly applied to view (
DefaultView
,MapView
) settingsDetails can be read on Stackoverflow: How to setup typescript generics in class constructors and functions
The problem is that main
orb
object handles different views throughorb.setView
where each view can have different settings soorb.view.setSettings
is not able to apply correct Typescript interface (at least with the current latest TS version).The solution could be to create a new instance on
view
changes, e.g.