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

Picking in Clustering sandcastle demo doesn't do anything #5286

Closed
hpinkos opened this issue May 8, 2017 · 3 comments
Closed

Picking in Clustering sandcastle demo doesn't do anything #5286

hpinkos opened this issue May 8, 2017 · 3 comments
Labels
cleanup good first issue An opportunity for first time contributors

Comments

@hpinkos
Copy link
Contributor

hpinkos commented May 8, 2017

http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Clustering.html&label=Showcases

I noticed this block of code in the Clustering sandcastle example:

    var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
    handler.setInputAction(function(movement) {
        var pickedLabel = viewer.scene.pick(movement.position);
        if (Cesium.defined(pickedLabel)) {
            var ids = pickedLabel.id;
            if (Cesium.isArray(ids)) {
                for (var i = 0; i < ids.length; ++i) {
                    ids[i].label.fillColor = Cesium.Color.RED;
                }
            }
        }
    }, Cesium.ScreenSpaceEventType.LEFT_CLICK);

But no matter what you click on, pickedLabel.id is always undefined.

@bagnell what was this meant to do?

@hpinkos hpinkos added the cleanup label May 8, 2017
@bagnell
Copy link
Contributor

bagnell commented May 10, 2017

pickedLabel.id should be an array of the entities in the cluster.

@rahwang
Copy link
Contributor

rahwang commented May 10, 2017

@hpinkos hpinkos added the good first issue An opportunity for first time contributors label May 31, 2017
@hpinkos
Copy link
Contributor Author

hpinkos commented May 31, 2017

Pretty sure this is what we want to do:

  • Add an id to the default entity cluster label in EntityCluster
  • Add an id to the custom style billboard in the Sandcastle example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup good first issue An opportunity for first time contributors
Projects
None yet
Development

No branches or pull requests

3 participants