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

Coordinate control for cesiumjs #50

Open
adeelahmed1981 opened this issue Apr 8, 2021 · 2 comments
Open

Coordinate control for cesiumjs #50

adeelahmed1981 opened this issue Apr 8, 2021 · 2 comments

Comments

@adeelahmed1981
Copy link

Hi,
Is there any coordinate control avalible for cesium viewer as we have navigation control? .i have seen such kind control in terriajs viewer.There control show lat,long and elevation on mouse move .
Thanks

@alberto-acevedo
Copy link
Owner

Take a look to this demo in Cesium SandCastle that shows how to add a label and display the coordinates from the mousemove event.

https://sandcastle.cesium.com/index.html?#c=lVVtb9s2EP4rB3+RjLq0k+1DIdnBuizDBiTosGbtNhgYaOpsEaFIgaTsOEX/+460XvzSDJg/iby75557eHeeTuEPhyCUrGupN1ArrtGBN+BQofByi2oPpSwQam69A7MGXyJslFkhuMauuUC21Eu95Ra2EndoYQEad3CLTjYV+xTv0kTE463RnkuNNpnAl6UG+rmn/XtfGVeXaDGDNVcOJ62pNI0q3mtZcY+QgbdNZ/JoLQH9Zs2WyNmsSycsku9nY1XxeHBJx0v9dZwHjsQysmEvxlSPJm1PqL30El1wOrtivCjSlqgsMkgq0yQtBcVXqLKujPCbTqE2jgKNhp7RLelGX1xfs7/vfv8wgcGf6tudVPW1pdqycAI1MsFJ3Mjkbku87qXzdE2SEheHldkiiblutAh5Uxx3jMKLxDr29CLndW3Q/7j/tYggSUjZRyjqBWdkMQQdaMQnZ725DaGSHwINIBr2qDViB2G8ECSA2Vhel1IM+gwZRSfQkFHwCi1ntRRPd13C9Kipek2/S0kfJamsPyfQff41ngxldLXJNaR9pvHxq3Uceo6LIZr1IY/m9sjnCCo/RVJGb6RvCvzobZioRcf5gfuSefMTbiyiS48zsj5oTB4/y2cs0qvZBTL3/x+4jXkN99AfrH+VxfAal16x4VloWvILXfuay5qm/B/n9wrJ8d33+fGEnGVcvDImObyC7fHZE2qSJvDmQuw3QKMQDada0f04OZPTomtUgLqAz0NX70LjavIKze1L6YbowoimoqgwRHcKw2ecpeWooHFcjsZMahrQXx4f7r8J3846dRlBf/lvmeM6zE+3w1KPJqN51PfmYPlBVrWxHhqrUsamHita5CTndNWIJ/RMuLjc5tMuaF7ILS20RUcZomGRvLyVusDnDK5ns1neT2sGfOWMajzmUKLclD67ms3q5xx2svBldn042GiBq3hYGe9NlUE8hLrfCqMMbepdKT0mN/MpcTihcvYXQayE4s6RZd0o9VG+4HL0jTBleEGP/IEWkOL74FJe3dwfLhlj8ykdL6O8MWrF7RHivw

You need to use Cesium.sampleTerrain to get the terrain elevation asynchronously. Take a look to this link that describes the solution:
https://community.cesium.com/t/display-mouse-position-and-elevation-value-question/1058

v/r,

Alberto

@adeelahmed1981
Copy link
Author

thanks @alberto-acevedo for you help I will try it then let you know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants