Class Location

com.yandex.mapkit.location

java.lang.Object ⇽ Location

public class Location

The geographical position of the object.

Constructors

Location(@NonNull Point position, @Nullable Double accuracy, @Nullable Double altitude, @Nullable Double altitudeAccuracy, @Nullable Double heading, @Nullable Double speed, long absoluteTimestamp, long relativeTimestamp)
Location()

Use constructor with parameters in your code.

Methods

long getAbsoluteTimestamp()

Absolute timestamp, in milliseconds since January 1, 1970.

Double getAccuracy()

Location accuracy in meters.

Double getAltitude()

The altitude of the location in meters.

Double getAltitudeAccuracy()

The accuracy of the altitude in meters.

Double getHeading()

The current heading in degrees relative to true north, clockwise.

Point getPosition()

The geographical position.

long getRelativeTimestamp()

Relative timestamp, number of milliseconds passed on steady clock.

Double getSpeed()

The speed in meters per second.

void serialize(Archive archive)

Constructor Detail

Location

public Location (@NonNull Point position, @Nullable Double accuracy, @Nullable Double altitude, @Nullable Double altitudeAccuracy, @Nullable Double heading, @Nullable Double speed, long absoluteTimestamp, long relativeTimestamp)

Location

public Location ()

Use constructor with parameters in your code.

This one is for bindings only!

Method Detail

getAbsoluteTimestamp

public long getAbsoluteTimestamp ()

Absolute timestamp, in milliseconds since January 1, 1970.

getAccuracy

public Double getAccuracy ()

Location accuracy in meters.

Optional field, can be null.

getAltitude

public Double getAltitude ()

The altitude of the location in meters.

Optional field, can be null.

getAltitudeAccuracy

public Double getAltitudeAccuracy ()

The accuracy of the altitude in meters.

Optional field, can be null.

getHeading

public Double getHeading ()

The current heading in degrees relative to true north, clockwise.

Optional field, can be null.

getPosition

public Point getPosition ()

The geographical position.

getRelativeTimestamp

public long getRelativeTimestamp ()

Relative timestamp, number of milliseconds passed on steady clock.

Use for interval calculation.

getSpeed

public Double getSpeed ()

The speed in meters per second.

Optional field, can be null.

serialize

public void serialize (Archive archive)