LngLat

A geographical location which contains a single latitude, longitude pair, with optional altitude.

Latitude and longitude are expressed as decimal degrees in the WGS84 datum. By default, altitude is 0.0, or sea level.

MapLibre GL displays maps in the Mercator Projection and projects geographical data automatically, so all data enters in the WGS84 datum.

Constructors

Link copied to clipboard
constructor()

Construct a new latitude, longitude point at (0, 0)

constructor(longitude: Double, latitude: Double)

Construct a new latitude, longitude point given double arguments

constructor(longitude: Double, latitude: Double, altitude: Double)

Construct a new latitude, longitude, altitude point given double arguments

constructor(location: Location)

Construct a new latitude, longitude, altitude point given location argument

constructor(lngLat: LngLat)

Construct a new latitude, longitude, altitude point given another latitude, longitude, altitude point.

constructor(in: Parcel)

Constructs a new longitude, latitude, altitude tuple given a parcel.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The altitude, in meters.

Link copied to clipboard

The latitude, in degrees.

Link copied to clipboard

The longitude, in degrees.

Functions

Link copied to clipboard
fun along(lngLats: List<Point>, distance: Double, units: String): Point
Link copied to clipboard
open override fun describeContents(): Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

Link copied to clipboard
fun distanceTo(other: LngLat): Double

Calculate distance between two points

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Indicates whether some other object is "equal to" this one.

Link copied to clipboard
open override fun hashCode(): Int

Returns a hash code value for the object.

Link copied to clipboard
fun toFeature(): Feature

Feature 반환

Link copied to clipboard
fun toPoint(): Point

Point 변환

Link copied to clipboard
open override fun toString(): String

Returns a string representation of the object.

Link copied to clipboard
fun wrap(): LngLat

Return a new LngLat object with a wrapped Longitude. This allows original data object to remain unchanged.

Link copied to clipboard
open override fun writeToParcel(out: Parcel, flags: Int)

Flatten this object in to a Parcel.