How to add a drop down menu when user selects an icon on a cesium map

1.1k views Asked by At

I want to select an icon on a cesium map and then left click and bring up a drop down selection menu where that icon is.

I am using cesium map and need an easy way to add a drop down.

1

There are 1 answers

0
Cory On BEST ANSWER

I think you should create drop down menu with jquery when user clicked on the entity.

handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
handler.setInputAction(function(click) {
    var pickedObject = viewer.scene.pick(click.position);
    if (Cesium.defined(pickedObject)) {
            // add some jquery code to create dropdown menu
        }
    }
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);