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

There is a problem with setting showBackground to true for label #12390

Open
PFeiJia opened this issue Dec 24, 2024 · 0 comments
Open

There is a problem with setting showBackground to true for label #12390

PFeiJia opened this issue Dec 24, 2024 · 0 comments

Comments

@PFeiJia
Copy link

PFeiJia commented Dec 24, 2024

What happened?

The Label property show defaults to false and showBackground defaults to true. Adding labels with LabelCollection and setting the Label's show to true should display the Label background, but it doesn't

Reproduction steps

const viewer = new Cesium.Viewer("cesiumContainer");

const labels = viewer.scene.primitives.add(new Cesium.LabelCollection());

const label = labels.add({
show:false,
showBackground: true,
position : new Cesium.Cartesian3(1.0, 2.0, 3000000.0),
text : 'label showBackground',
});

setTimeout(()=>{
label.show = true;
},1000);

Sandcastle example

No response

Environment

Browser: Google
CesiumJS Version: 1.122
Operating System:Windows 11

@PFeiJia PFeiJia changed the title There is a problem with the tag's showBackground setting to true There is a problem with the label showBackground setting to true Dec 24, 2024
@PFeiJia PFeiJia changed the title There is a problem with the label showBackground setting to true There is a problem with setting showBackground to true for label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant