Package world.mappable.mapkit.location

Class Location

java.lang.Object
    ↳ world.mappable.mapkit.location.Location

class Location implements Serializable

The geographical position of the object.

Summary

Constructors

Signature and Description

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

Location()
Use constructor with parameters in your code.

Methods

Type and modifiers

Method and Description

Point

getPosition()
The geographical position.

java.lang.Double

getAccuracy()
Location accuracy in meters.

java.lang.Double

getAltitude()
The altitude of the location in meters.

java.lang.Double

getAltitudeAccuracy()
The accuracy of the altitude in meters.

java.lang.Double

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

java.lang.Double

getSpeed()
The speed in meters per second.

long

getAbsoluteTimestamp()
Absolute timestamp, in milliseconds since January 1, 1970.

long

getRelativeTimestamp()
Relative timestamp, number of milliseconds passed on steady clock.

void

serialize(world.mappable.runtime.bindings.Archive archive)

Constuctors

Location

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


Location

Location()

Use constructor with parameters in your code.

This one is for bindings only!


Methods

getPosition

@NonNull
Point getPosition()

The geographical position.


getAccuracy

@Nullable
java.lang.Double getAccuracy()

Location accuracy in meters.

Optional field, can be null.


getAltitude

@Nullable
java.lang.Double getAltitude()

The altitude of the location in meters.

Optional field, can be null.


getAltitudeAccuracy

@Nullable
java.lang.Double getAltitudeAccuracy()

The accuracy of the altitude in meters.

Optional field, can be null.


getHeading

@Nullable
java.lang.Double getHeading()

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

Optional field, can be null.


getSpeed

@Nullable
java.lang.Double getSpeed()

The speed in meters per second.

Optional field, can be null.


getAbsoluteTimestamp

long getAbsoluteTimestamp()

Absolute timestamp, in milliseconds since January 1, 1970.


getRelativeTimestamp

long getRelativeTimestamp()

Relative timestamp, number of milliseconds passed on steady clock.

Use for interval calculation.


serialize

@Override
void serialize(world.mappable.runtime.bindings.Archive archive)