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
constructor()
constructor(refLatitude: Double)
Units in meters
constructor(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(pntX: Double, pntY: Double, lineP0x: Double, lineP0y: Double, lineP1x: Double, lineP1y: Double): Double
Link copied to clipboard
Link copied to clipboard
Given two points, returns the distance.
Link copied to clipboard
open fun sqrDistance(@NonNull from: MPPoint, @NonNull to: MPPoint): Double
open fun sqrDistance(fromLatitude: Double, fromLongitude: Double, toLatitude: Double, toLongitude: Double): Double
Given two points, returns the squared distance.
Link copied to clipboard
Updates the ruler with a new reference

Properties

Link copied to clipboard
val UNIT_FEET: Double = 3280.839895013123
Link copied to clipboard
val UNIT_INCHES: Double = 39370.078740157485
Link copied to clipboard
Link copied to clipboard
val UNIT_METERS: Double = 1000.0
Link copied to clipboard
val UNIT_MILES: Double = 0.621371192237334
Link copied to clipboard
val UNIT_NAUTICALMILES: Double = 0.5399568034557235
Link copied to clipboard
val UNIT_YARDS: Double = 1093.6132983377079