LatLng class

Represents a geographical point with latitude and longitude.

Constructors

LatLng.new(double latitude, double longitude)
const
LatLng.fromJson(Map<String, dynamic> json)
Creates a LatLng from a JSON map in the format {'coordinates': [longitude, latitude]}.
LatLng.fromList(List list)
Creates a LatLng from a list of doubles [longitude, latitude].
factory
LatLng.fromSexagesimal(String str)
Converts sexagesimal string into a lat/long value
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
latitude double
final
latitudeInRad double
Latitude in radians.
no setter
longitude double
final
longitudeInRad double
Longitude in radians.
no setter
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
round({int decimals = 6}) LatLng
Rounds the latitude and longitude to a specified number of decimal places.
toJson() Map<String, dynamic>
Converts the LatLng to a JSON map in the format {'coordinates': [longitude, latitude]}.
toList() List<double>
Converts the LatLng to a list of doubles [longitude, latitude].
toSexagesimal() String
Converts lat/long values into sexagesimal
toString() String
A string representation of this object.
override

Operators

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