JavaScript Geolocation coordinates Property
JavaScript Geolocation coordinates Property
The coordinates property is used to return the position and altitude of the device on Earth. Some of its properties are:-
- latitude
- longitude
- altitude
- accuracy
- altitudeAccuracy
- heading
- speed
Further Explanation:-
Property | Description |
---|---|
coordinates.latitude | It returns position latitude in decimal degrees. |
coordinates.longitude | It returns position longitude in decimal degrees. |
coordinates.altitude | It returns position altitude in meters from sea level. |
coordinates.accuracy | It returns the accuracy of the latitude and longitude in meters. |
coordinates.altitudeAccuracy | It returns the accuracy of the altitude property in meters |
coordinates.heading | It returns the direction in which the device is traveling. It is specified in degrees. |
coordinates.speed | It returns the velocity of the device in meters per second. |