Is there any function to translate a latitude/longitude into geodetic format?


I just start into Cesium days ago. Currently, I have try to create an application that will show latitude and logitude whenever user click on the map. However, I want it to be display in 'C D M S.SS' format where "D" stand for degrees, "M" for minutes, "S" for seconds, and "C" for cardinal direction (NSEW).

Is there any function in Cesium that allow me to do this? I'm looking for something similar to ST_AsLatLonText function in postgis.

Here are the code that I use below.

Thanks you in advance.

Don’t think there’s anything built in, but there’s various JS libraries that will do that sort of thing, such as or