LatLng class
Constructors
LatLng (double ? latitude , double ? longitude , [double ? altitude ])
Creates an object representing a geographical point with the given latitude and
longitude (and optionally altitude).
LatLng.fromList (List coordinates )
Expects an array of the form Number, Number
or Number, Number, Number
instead
LatLng.fromObject (LatCoordinate object )
Expects an plain object of the form {lat: Number, lng: Number} or {lat: Number, lng: Number, alt: Number} instead.
Methods
distanceTo (LatLng other )
→ double
Returns the distance (in meters) to the given LatLng calculated using the Spherical Law of Cosines.
equals (LatLng otherLatLng , [double ? maxMargin ])
→ bool
Returns true if the given LatLng point is at the same position (within a small margin of error). The margin of error can be overridden by setting maxMargin to a small number.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBounds (double number )
→ LatLngBounds
Returns a new LatLngBounds object in which each boundary is sizeInMeters/2 meters apart from the LatLng.
toString ()
→ String
Returns a string representation of the point (for debugging purposes).
override
wrap ()
→ LatLng
Returns a new LatLng object with the longitude wrapped so it's always between -180 and +180 degrees.