SphericalUtils class
Spherical geometry utilities (distances, headings, areas, offsets,
interpolation), ported from the android-maps-utils SphericalUtil class.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
centerFromLatLngBounds(
GoogleMapsUtilsLatLngBounds gmuLatLngBounds) → Point< double> -
Returns the center point of the given
gmuLatLngBounds. -
computeAngleBetween(
Point< double> from, Point<double> to) → double -
Returns the angle between
fromandto, in radians. This is the same as the distance on the unit sphere. -
computeArea(
List< Point< path) → doubledouble> > -
Returns the area of a closed
pathon Earth, in square meters. -
computeDistanceBetween(
Point< double> from, Point<double> to) → double -
Returns the distance between
fromandto, in meters. -
computeHeading(
Point< double> from, Point<double> to) → double -
Returns the heading from
fromtoto. Headings are expressed in degrees clockwise from North within the range [-180, 180). -
computeLength(
List< Point< path) → doubledouble> > -
Returns the length of the given
path, in meters, on Earth. -
computeOffset(
Point< double> from, double distance, double heading) → Point<double> -
Returns the point resulting from moving
distancemeters fromfromin the specifiedheading(degrees clockwise from north). -
computeOffsetOrigin(
Point< double> to, double distance, double heading) → Point<double> ? -
Returns the origin when provided with a destination
to,distancein meters, and originalheading. Returnsnullwhen no solution exists. -
computeSignedArea(
List< Point< path) → doubledouble> > -
Returns the signed area of a closed
pathon Earth. The sign of the area may be used to determine the orientation of the path. "Inside" is the surface that does not contain the South Pole. -
computeSignedAreaTest(
List< Point< path, double radius) → doubledouble> > -
Returns the signed area of a closed
pathon a sphere of givenradius. The computed area uses the same units as the radius squared. -
distanceRadians(
double lat1, double lng1, double lat2, double lng2) → double - Returns distance on the unit sphere; the arguments are in radians.
-
getCardinal(
double angle) → String -
Returns a 16-point compass cardinal abbreviation for the given
angle. -
interpolate(
Point< double> from, Point<double> to, double fraction) → Point<double> -
Returns the point which lies the given
fractionof the way betweenfromandto. -
toBounds(
double x, double y, double radiusInMeters) → GoogleMapsUtilsLatLngBounds -
Creates a bounding box centered at (
x,y) with a givenradiusInMeters. -
toBoundsFromPoints(
List< Point< points) → GoogleMapsUtilsLatLngBoundsdouble> > -
Computes the smallest bounding box that contains all
points. -
toDegrees(
double rad) → double -
Converts
radradians to degrees. -
toRadians(
double deg) → double -
Converts
degdegrees to radians. -
toSubBounds(
GoogleMapsUtilsLatLngBounds bounds, {int division = 2}) → List< GoogleMapsUtilsLatLngBounds> -
Splits
boundsinto smaller sub-bounds. The number of resulting bounds equalsdivision².