ORSCoordinate class

A Coordinate Data Model independent of any other external libraries. Contains a double Latitude, a double Longitude value and an optional double Altitude value.

Should be easily convertible to a LatLng, GeoPoint etc for use in projects.

Constructors

ORSCoordinate({required double latitude, required double longitude, double? altitude})
Generates a coordinate from a latitude and longitude.
const
ORSCoordinate.fromJson(Map<String, dynamic> json)
Generates a ORSCoordinate from a Map having String keys 'latitude' and 'longitude', respectively each having double values.
factory
ORSCoordinate.fromList(List json)
Generates a ORSCoordinate from a List having double values.
factory

Properties

altitude double?
The altitude of the coordinate.
final
hashCode int
The hash code for this object.
no setteroverride
latitude double
The latitude of the coordinate.
final
longitude double
The longitude of the coordinate.
final
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
toJson() Map<String, dynamic>
Returns a Map having String keys 'latitude' and 'longitude', respectively having latitude and longitude as double values.
toList() List<double>
Returns a List having double values. longitude and latitude are the first two values respectively. altitude is the third value if it exists (otherwise it is 0.0).
toString() String
A string representation of this object.
override

Operators

operator +(ORSCoordinate other) ORSCoordinate
Adding two coordinates.
operator -(ORSCoordinate other) ORSCoordinate
Subtracting two coordinates.
operator ==(Object other) bool
The equality operator.
override