itwinjs-core
itwinjs-core copied to clipboard
MapLayersWidget - sections of background map are not visible around the imodel
We are utilizing the MapLayersWidget to provide a background map in our studio application. When adding this to application we use a classId of "UnifiedSelectionViewportControl2D".
Upon loading an iModel from iModel hub, the map appears blank around the area where our model is centered. Upon zooming out, some parts of the map appear, with clipping appearing in different sections of the map. When zoomed far enough out, we can see a circle of area that is not covered in map.
Expected behavior For the map to be visible in the area of our iModel.
Screenshots
- OS: Windows
- Browser : Chrome
- iTwin.js Version: 4.4.0-dev.10
@ashar-bentley @FelixGirard
Can you please add to your description steps required for somebody else to reproduce the problem?
The issue happens when the setAllow3dManipulations is set to false
Steps:
- Open the heatmap sample that has the following view setting set to false:
line 21: viewState.setAllow3dManipulations(false);
https://www.itwinjs.org/sandboxes/iTwinPlatform/Heatmap%20Decorator
- Zoom out until you start seeing the background map getting clipped:
Now open my fork of the same sample with line 21 modified to set the value to true:
line 21: viewState.setAllow3dManipulations(true);
https://www.itwinjs.org/sandboxes/AsharGhani/HeatMapDecoratorWith3D-On
The issue is no longer reproducible:
For some iModels we are seeing a more exacerbated version of this problem, where the problem occurs when fully zoomed in.
@markschlosseratbentley @danieliborra
We'll take a look at it in our next sprint
We should verify if masking is involved.
I don't think there is any masking involved. This is just a side effect of turning off 3d manipulations. The only thing you can do there is zoom and the zoom for this mode doesn't take the background map into account, so it is getting clipped by the far frustum plane.
I believe that I have a fix for this. The basic problem is that the ellipsoid of the earth is not taken into account when zooming in this mode of a 3d file with 3d manipulations and the camera turned off.
A PR for a fix for this has been created here: #7275