Package-level declarations

Properties

Link copied to clipboard
val Polygon.area: Double

The area of this Polygon on Earth in square meters.

Link copied to clipboard
val Polygon.signedArea: Double

Computes the signed area under a closed path on Earth. The sign of the area may be used to determine the orientation of the path.

Link copied to clipboard

The spherical length of this Polyline on Earth as measured in meters.

Functions

Link copied to clipboard
inline operator fun LatLng.component1(): Double

Returns the LatLng.latitude of this LatLng.

Link copied to clipboard
inline operator fun LatLng.component2(): Double

Returns the LatLng.longitude of this LatLng.

Link copied to clipboard
inline fun LatLng.computeSphericalOffsetOrigin(distance: Double, heading: Double): LatLng?

Attempts to compute the origin LatLng from this LatLng where distance meters have been traveled with heading value heading.

Link copied to clipboard
inline fun Polygon.contains(latLng: LatLng): Boolean

Computes whether or not latLng is contained within this Polygon.

inline fun Polyline.contains(latLng: LatLng, tolerance: Double = 0.1): Boolean

Computes where the given latLng is contained on or near this Polyline within a specified tolerance in meters.

Link copied to clipboard
inline fun List<LatLng>.containsLocation(latLng: LatLng, geodesic: Boolean): Boolean

Computes whether the latLng lies inside this.

Link copied to clipboard
inline fun List<LatLng>.isClosedPolygon(): Boolean

Checks whether or not this LatLng list is a closed Polygon.

Link copied to clipboard
inline fun List<LatLng>.isLocationOnPath(latLng: LatLng, geodesic: Boolean, tolerance: Double = 0.1): Boolean

Computes whether the given latLng lies on or is near this polyline within tolerance (in meters).

Link copied to clipboard
inline fun Polygon.isOnEdge(latLng: LatLng, tolerance: Double = 0.1): Boolean

Checks whether or not latLng lies on or is near the edge of this Polygon within a tolerance (in meters) of tolerance. The default value is PolyUtil.DEFAULT_TOLERANCE.

inline fun List<LatLng>.isOnEdge(latLng: LatLng, geodesic: Boolean, tolerance: Double = 0.1): Boolean

Checks whether or not latLng lies on or is near the edge of this polygon within the tolerance (in meters). The default value is PolyUtil.DEFAULT_TOLERANCE.

Link copied to clipboard
inline fun List<LatLng>.latLngListEncode(): String

Encodes this LatLng list in a String using the Polyline Algorithm Format.

Link copied to clipboard
inline fun List<LatLng>.simplify(tolerance: Double): List<LatLng>

Simplifies this list of LatLng using the Douglas-Peucker decimation. Increasing the value of tolerance will result in fewer points.

Link copied to clipboard
inline fun LatLng.sphericalDistance(to: LatLng): Double

Computes the spherical distance between this LatLng and to.

Link copied to clipboard
inline fun LatLng.sphericalHeading(toLatLng: LatLng): Double

Computes the heading from this LatLng to toLatLng.

Link copied to clipboard
inline fun List<LatLng>.sphericalPathLength(): Double

Computes the length of this path on Earth.

Link copied to clipboard
inline fun List<LatLng>.sphericalPolygonArea(): Double

Computes the area under a closed path on Earth.

Link copied to clipboard
inline fun List<LatLng>.sphericalPolygonSignedArea(): Double

Computes the signed area under a closed path on Earth. The sign of the area may be used to determine the orientation of the path.

Link copied to clipboard
inline fun String.toLatLngList(): List<LatLng>

Decodes this encoded string into a LatLng list.

Link copied to clipboard
inline fun LatLng.withSphericalLinearInterpolation(to: LatLng, fraction: Double): LatLng

Returns an interpolated LatLng between this LatLng and to by the provided fractional value fraction.

Link copied to clipboard
inline fun LatLng.withSphericalOffset(distance: Double, heading: Double): LatLng

Offsets this LatLng from the provided distance and heading and returns the result.