How to get current location?

Hi. Im new in Cesium. How to get my current location as point at the map in Cesium application?

Welcome to the Cesium community!

If you have a longitude, latitude, and height, you can fly the camera directly there like this:

viewer.camera.flyTo({
    destination: Cesium.Cartesian3.fromDegrees(20, 10, 1000)//lon, lat, height
});

From the doc: https://cesium.com/docs/cesiumjs-ref-doc/Camera.html?classFilter=camera#flyTo.

To get the user’s location in your app, you can use the browser’s geolocation API, see https://www.w3schools.com/html/html5_geolocation.asp.

What kind of project are you working on?

Great Thanks, Omar!
It’s working!
Currently i learning CesiumJS and planing to use it for natural resources use project.

That sounds cool, once you have something to show it’d be great to see some screenshots or a link in the showcases category on the forum! https://community.cesium.com/c/showcases/8