-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Label/Billboard show/hide bug #4408
Comments
https://groups.google.com/forum/?hl=en#!topic/cesium-dev/hPY2I3HZzyA var viewer = new Cesium.Viewer('cesiumContainer');
var label = viewer.entities.add({
position : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
point: {
pixelSize: 5,
outlineColor: Cesium.Color.BLACK,
outlineWidth: 1
},
label: {
text: 'Label',
font: '20pt Verdana',
pixelOffset: new Cesium.Cartesian2(0, -30),
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
}
});
var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
handler.setInputAction(function() {
label.show = label.show ? false : true;
}, Cesium.ScreenSpaceEventType.LEFT_CLICK); |
Also reported here: https://groups.google.com/forum/?hl=en#!topic/cesium-dev/L5-UMH051RY I labeled this for next release since it's effecting a number of users |
@bagnell It looks like this is caused by clustering. I can only reproduce this with the KML example. Another thing I noticed is that when it worked before clustering turning on the entities was pretty quick, now its really slow (even when clustering isn't enabled). |
@tfili I tracked down the |
KML is defaulting to terrain clamping for billboards even though it shouldn't, which is why performance there is slow there, #4459 should fix the default behavior, but it will still be slow when clamping is on. |
var viewer = new Cesium.Viewer('cesiumContainer'); var label = viewer.entities.add({ var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas); This works like a charm. Thanks alot! |
Reported on the forum: https://groups.google.com/forum/?hl=en#!topic/cesium-dev/u75ie_3xwy0
The text was updated successfully, but these errors were encountered: