Table of Contents

Class GeolocationPosition

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The GeolocationPosition interface represents the position of the concerned device at a given time. The position, represented by a GeolocationCoordinates object, comprehends the 2D position of the device, on a spheroid representing the Earth, but also its altitude and its speed.

[Value("GeolocationPosition")]
public class GeolocationPosition
Inheritance
GeolocationPosition
Inherited Members

Remarks

Constructors

GeolocationPosition()

public GeolocationPosition()

Properties

Coords

The coords read-only property of the GeolocationPosition interface returns a GeolocationCoordinates object representing a geographic position. It contains the location, that is longitude and latitude on the Earth, the altitude, and the speed of the object concerned, regrouped inside the returned value. It also contains accuracy information about these values.

[Value("coords")]
public GeolocationCoordinates Coords { get; }

Property Value

GeolocationCoordinates

A GeolocationCoordinates object instance.

Remarks

Timestamp

The timestamp read-only property of the GeolocationPosition interface represents the date and time that the position was acquired by the device.

[Value("timestamp")]
public ulong Timestamp { get; }

Property Value

ulong

A number containing a timestamp, given as Unix time in milliseconds.

Remarks

Methods

ToJSON()

The toJSON() method of the GeolocationPosition interface is a {{Glossary("Serialization","serializer")}}; it returns a JSON representation of the GeolocationPosition object.

[Value("toJSON")]
public Object ToJSON()

Returns

Object

A {{jsxref("JSON")}} object that is the serialization of the GeolocationPosition object.

Remarks