LatLng class

Annotations
  • @JS('L.latLng')

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.

Properties

alt double
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
lat double
getter/setter pair
lng double
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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.

Operators

operator ==(Object other) bool
The equality operator.
inherited