MPFastSphericalUtils

class MPFastSphericalUtils

[INTERNAL] MPFastSphericalUtils

Use this for indoors, for example, within the same venue. The refLatitude could be taken from the venue's anchor/position

Constructors

Link copied to clipboard
open fun MPFastSphericalUtils()
Link copied to clipboard
open fun MPFastSphericalUtils(refLatitude: Double)
Units in meters
Link copied to clipboard
open fun MPFastSphericalUtils(refLatitude: Double, units: Double)

Functions

Link copied to clipboard
open fun area(@NonNull polygon: Array<Array<Array<Double>>>): Double
Given a polygon (an array of rings, where each ring is an array of points), returns the area.
open fun area(@NonNull multiPolygon: Array<Array<Array<Array<Double>>>>): Double
open fun area(@NonNull southwest: MPLatLng, @NonNull northeast: MPLatLng): Double
Link copied to clipboard
open fun bearing(@NonNull from: MPLatLng, @NonNull to: MPLatLng): Double
Returns the bearing between two points in degrees.
Link copied to clipboard
open fun distance(@NonNull from: MPLatLng, @NonNull to: MPLatLng): Double
open fun distance(    fromLatitude: Double,     fromLongitude: Double,     toLatitude: Double,     toLongitude: Double): Double
Given two points, returns the distance.
Link copied to clipboard
open fun getSquaredDistanceToLine(    @NonNull point: MPPoint,     @NonNull lineP0: MPPoint,     @NonNull lineP1: MPPoint): Double
open fun getSquaredDistanceToLine(    @NonNull point: MPLatLng,     @NonNull lineP0: MPLatLng,     @NonNull lineP1: MPLatLng): Double
open fun getSquaredDistanceToLine(    pntX: Double,     pntY: Double,     lineP0x: Double,     lineP0y: Double,     lineP1x: Double,     lineP1y: Double): Double
Link copied to clipboard
open fun interpolate(    @NonNull from: MPLatLng,     @NonNull to: MPLatLng,     t: Double): MPLatLng
Link copied to clipboard
open fun manhattanDistance(@NonNull from: MPLatLng, @NonNull to: MPLatLng): Double
Given two points, returns the distance.
Link copied to clipboard
open fun sqrDistance(@NonNull from: MPPoint, @NonNull to: MPPoint): Double
open fun sqrDistance(@NonNull from: MPLatLng, @NonNull to: MPLatLng): Double
open fun sqrDistance(    fromLatitude: Double,     fromLongitude: Double,     toLatitude: Double,     toLongitude: Double): Double
Given two points, returns the squared distance.
Link copied to clipboard
open fun updateReferenceLatitude(refLatitude: Double): MPFastSphericalUtils
Updates the ruler with a new reference

Properties

Link copied to clipboard
val UNIT_FEET: Double
Link copied to clipboard
val UNIT_INCHES: Double
Link copied to clipboard
val UNIT_KILOMETERS: Double
Link copied to clipboard
val UNIT_METERS: Double
Link copied to clipboard
val UNIT_MILES: Double
Link copied to clipboard
val UNIT_NAUTICALMILES: Double
Link copied to clipboard
val UNIT_YARDS: Double