Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map controls not visible when upgrading to olCesium 2.13 / OL 7.3 #1016

Open
ChrisFleet opened this issue Mar 31, 2023 · 1 comment
Open

Comments

@ChrisFleet
Copy link

I'm very grateful to those who are maintaining ol-cesium, and hope a quick question is possible - although I realise this must be due the way I am implementing the code and not a problem with the code itself.

I have a map application using ol3cesium v1.23 working okay at https://maps.nls.uk/geo/explore/3d/.
I have recently added ol-ext to this to allow printing/image saving, and although the print process is okay, it does not save the image. It seems that this is because the print dialog is waiting for the map to render (with a postcompose or postrender event) but no event is fired.

As this is old code, I have tried upgrading to olCesium 2.13 and OpenLayers 7.3 at https://maps.nls.uk/geo/explore/3d-new/.

The application works but all the map controls (Zoom, MousePosition, Scale, Print etc.) are not visible. They are being added to the ol-overlaycontainter-stopevent class but it seems this is being obscured.

If I disable olcesium, with the lines below, then the controls are visible, but the map is then just in 2D:

const ol3d = new olcs.OLCesium({map: map});
ol3d.setEnabled(false);

I'd very much welcome any suggestions on how to fix this.

@gberaudo gberaudo changed the title Map controls not visible when upgrading to olCesium 2.13 Map controls not visible when upgrading to olCesium 2.13 / OL 7.3 Apr 26, 2023
@theopauw
Copy link

theopauw commented May 1, 2023

Ran into the same issue and this is the workaround I used:

const olContainerDiv = document.querySelector(".ol-overlaycontainer-stopevent");
olContainerDiv.style.zIndex = 1;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants