LatLng class
Geographic coordinates in degrees.
LatLng latlng = LatLng(51.519475, -19.37555556); or with altitude LatLng latlng = LatLng(51.519475, -19.37555556, 20.0);
- Inheritance
-
- Object
- Point<
double> - UPoint
- Coordinate
- LatLng
Constructors
- LatLng(dynamic latitude, dynamic longitude, [dynamic altitude = 0.0])
- LatLng.from(dynamic value)
-
factory
Properties
- alt → double
-
no setter
- altitudeStr → String
-
no setter
- formatter → NumberFormat
-
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- key → String
-
no setterinherited
- lat → double
-
no setter
- latitudeInRad → double
-
no setter
- latitudeStr → String
-
no setter
- lng → double
-
no setter
- longitudeInRad → double
-
no setter
- longitudeStr → String
-
no setter
- magnitude → double
-
Get the straight line (Euclidean) distance between the origin (0, 0) and
this point.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- x → double
-
finalinherited
- y → double
-
finalinherited
- z → double
-
finalinherited
Methods
-
ceil(
) → Coordinate -
inherited
-
distanceTo(
Point< double> other) → double -
Returns the distance between
this
andother
.inherited -
equal(
dynamic other, [dynamic maxMargin = 0.0001]) → bool -
Returns
true
if the given position is at the same position (within a small margin of error).override -
floor(
) → Coordinate -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notEqual(
dynamic other, [dynamic maxMargin = 0.0001]) → bool -
override
-
round(
{int decimals = 6}) → LatLng -
override
-
scaleBy(
UPoint point) → Coordinate -
inherited
-
squaredDistanceTo(
Point< double> other) → double -
Returns the squared distance between
this
andother
.inherited -
toPoint(
) → UPoint -
inherited
-
toSexagesimal(
) → String - Converts lat/long values into sexagesimal
-
toSimpleString(
) → String -
toString(
) → String -
A string representation of this object.
override
-
unscaleBy(
UPoint point) → Coordinate -
inherited
Operators
-
operator *(
num factor) → Coordinate -
Scale this point by
factor
as if it were a vector.inherited -
operator +(
Point< num> other) → Coordinate -
Add
other
tothis
, as if both points were vectors.inherited -
operator -(
Point< num> other) → Coordinate -
Subtract
other
fromthis
, as if both points were vectors.inherited -
operator /(
num factor) → Coordinate -
inherited
-
operator ==(
Object other) → bool -
Whether
other
is a point with the same coordinates as this point.override