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