LatLng class final
A geographic point on the Earth's surface, defined by its latitude and longitude.
The LatLng class is a simple value object that represents a geographic point on the Earth's surface. It consists of a latitude and longitude pair, each of which is represented as a double value.
Example usage:
final point = LatLng(37.7749, -122.4194);
print(point.latitude); // Prints: 37.7749
print(point.longitude); // Prints: -122.4194
- Implemented types
- Available extensions
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- latitude → double
-
The latitude of this geographic point, in degrees.
final
- longitude → double
-
The longitude of this geographic point, in degrees.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{double? latitude, double? longitude}) → LatLng -
Available on LatLng, provided by the LatLngExtension extension
Creates a copy of this object with the given fields replaced with the new values. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
{JsonCodec codec = const JsonCodec()}) → String -
Returns a JSON-encoded string representation of the object.
override
-
toMap(
) → Map< String, double> -
Available on LatLng, provided by the LatLngExtension extension
Converts this object object to a JSON like map. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
covariant LatLng other) → bool -
The equality operator.
override