question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Label/Billboard show/hide bug

See original GitHub issue

Reported on the forum: https://groups.google.com/forum/?hl=en#!topic/cesium-dev/u75ie_3xwy0

  1. Load the example and zoom in to see the labels
  2. Hit hide - This works correctly
  3. Hit show - Only the labels come back, the billboards don’t
  4. Now neither the show or hide button have any effect
var viewer = new Cesium.Viewer('cesiumContainer');
var options = {
    camera : viewer.scene.camera,
    canvas : viewer.scene.canvas
};
var kml = '../../SampleData/kml/facilities/facilities.kml';
var kmlds;

viewer.dataSources.add(Cesium.KmlDataSource.load(kml, options))
.then(function(ds) {
    kmlds = ds;
});

Sandcastle.addToolbarButton('Hide', function() {
    kmlds.show = false;
});
Sandcastle.addToolbarButton('Show', function() {
    kmlds.show = true;
});

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
hpinkoscommented, Oct 6, 2016

https://groups.google.com/forum/?hl=en#!topic/cesium-dev/hPY2I3HZzyA Creating the entities from the Entity API causes the same problem:

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);
0reactions
Kulvinderjattcommented, Mar 13, 2020

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);

This works like a charm. Thanks alot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bountysource
Label/Billboard show/hide bug. ... Help and Information. Frequently Asked Questions · Bugs and Feature Requests · Fees ...
Read more >
is it possible to have a billboard as a link to an external site?
This may be a label, billboard, etc. Labels and billboards are normal JS objects, and can have arbitrary fields attached to them.
Read more >
Quick Terrain Modeler 800 User S Manual PDF - Scribd
show/hide models process, the functions will not apply to them. These functions are as follows: Area Stats: Calculate area statistics for all points...
Read more >
lAy - ALBA.Net
Little sis big sis t shirts, Hollywood movies watch online 2016, Vijay ballapuram, ... Extraktionsapparat soxhlet, Show hide css hover, European new right, ......
Read more >
Cesium billboard example - Joyas Magel
... entity: Polygon · Polyline · Billboard · Label. Billboard is a billboard primitive ... provide a lot of flexibility such as the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found