That's the backend task that
as programme you get data sent it to server (to you ).
You can access it as
Send this data
To server.(to you )
And you will get the latitude of your user.similarily for longitude,altitude,speed .....
Sorry dude I don't know back end more.
I don't think this is html 5 geolocation api.
This has been done using js library leaflet.js but very nice
And geolocation api as much I have heard works only on secure origin i.e, https
I have tried it on sololearn but as it's playground is not https.... I got this error.