itwinjs-core icon indicating copy to clipboard operation
itwinjs-core copied to clipboard

MapLayersWidget - sections of background map are not visible around the imodel

Open Jake-Screen opened this issue 1 year ago • 10 comments

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 map error booster map error booster 2

  • OS: Windows
  • Browser : Chrome
  • iTwin.js Version: 4.4.0-dev.10

Jake-Screen avatar Apr 08 '24 18:04 Jake-Screen

@ashar-bentley @FelixGirard

Jake-Screen avatar Apr 08 '24 18:04 Jake-Screen

Can you please add to your description steps required for somebody else to reproduce the problem?

pmconne avatar Apr 08 '24 19:04 pmconne

The issue happens when the setAllow3dManipulations is set to false

Steps:

  1. 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

  1. Zoom out until you start seeing the background map getting clipped:

image

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: image

ashar-bentley avatar Jul 18 '24 21:07 ashar-bentley

For some iModels we are seeing a more exacerbated version of this problem, where the problem occurs when fully zoomed in.

ashar-bentley avatar Jul 18 '24 21:07 ashar-bentley

@markschlosseratbentley @danieliborra

pmconne avatar Jul 18 '24 21:07 pmconne

We'll take a look at it in our next sprint

danieliborra avatar Aug 07 '24 09:08 danieliborra

We should verify if masking is involved.

markschlosseratbentley avatar Aug 07 '24 14:08 markschlosseratbentley

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.

MarcNeely avatar Oct 10 '24 14:10 MarcNeely

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.

MarcNeely avatar Oct 15 '24 13:10 MarcNeely

A PR for a fix for this has been created here: #7275

MarcNeely avatar Oct 17 '24 17:10 MarcNeely