onclick not defined when i try to move to a location on cesium

I am able to fix it.

What was the fix?

Hi Omar,

I fixed the onclick issue using add event listner as:

(function (_city) {

document.getElementById(_city.name).addEventListener(“click”, function (e) {

flyToCity(viewer, _city.latitude, _city.longitude);

}

)

}(city));