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

Attributions not showing in 3D #1225

Open
jmgomezpoveda opened this issue Aug 23, 2024 · 3 comments
Open

Attributions not showing in 3D #1225

jmgomezpoveda opened this issue Aug 23, 2024 · 3 comments

Comments

@jmgomezpoveda
Copy link
Contributor

I have added attributions to all the layers in my map. In 2D I can see the "i" icon that on clicking it the list of attributions expands.

Once I switch to 3D, the whole icon is not visible. Even if I manually remove its "display: none" settings, attributions are empty.

Are attributions not supported in 3D? The Cesium map is still using the same layers, so I need to give the right credit.

@XiaofengZeng
Copy link

Hi, @jmgomezpoveda.

The "i" icon you mentioned might refer to features in a vector layer where images are used for styling.

  • The olcesium vector synchronizer converts each feature into a primitive for rendering. When the synchronization is about to finish, it associates the primitive, layer, and feature using the setReferenceForPicking(). However, the logic for triggering click events in 3D needs some adjustments.

I hope this helps you out.

@jmgomezpoveda
Copy link
Contributor Author

The control is a normal "ol-control", which when going to 3D is getting a "display: none" property. When disabling that property, I can see the "i" box, but when clicking on it I get no attributions. It's like attributions linked to layers are not reflected in 3D, so ol-cesium just hides the "i" altogether.

@XiaofengZeng
Copy link

In olcesium, there are two types of data synchronizers:

In both 2D and 3D scenarios, the framework differences lead to varied interaction logic for events, so it's important to handle cases depending on the current scene to ensure that the desired attributes can be displayed. Thus, specific situations need to be debugged and analyzed using developer tools.

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