Coordinates class Core

Coordinates class

The main value object that represents a geographic position in WGS‑84. It is used throughout the SDK wherever a point on the globe is required and is suitable for display, measurement and simple spatial reasoning.

Used within objects such as Landmark, Marker, OverlayItem.

Constructors

Coordinates.new({double latitude = 2147483647, double longitude = 2147483647, double? altitude = 0, @Deprecated('horizontal & vertical accuracy were removed from Coordinates.') double? horizontalaccuracy = 0, @Deprecated('horizontal & vertical accuracy were removed from Coordinates.') double? verticalaccuracy = 0, int? sceneobject = 0})
Creates a coordinates object from latitude, longitude, and altitude.
Coordinates.fromJson(Map<String, dynamic> json)
factory
Coordinates.fromLatLong(double latitude, double longitude, [double? altitude = 0])
Creates a coordinates object from latitude, longitude, and optional altitude.

Properties

altitude double?
Altitude in meters.
getter/setter pair
copy Coordinates
Creates a new coordinates object with the same properties as the original.
no setter
hashCode int
The hash code for this object.
no setteroverride
horizontalaccuracy double?
Horizontal accuracy of the location in meters.
getter/setter pair
isValid bool
Checks if the coordinates are valid.
no setter
latitude double
Latitude in degrees. Valid values: -90.0 .. +90.0.
getter/setter pair
longitude double
Longitude in degrees. Valid values: -180.0 .. +180.0.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sceneobject int?
Parent scene object to which coordinates belongs.
getter/setter pair
verticalaccuracy double?
Vertical accuracy of the location in meters.
getter/setter pair

Methods

azimuth(Coordinates target) double
Calculates the azimuth between the two points according to the ellipsoid model of WGS84.
copyWithMetersOffset({required int metersLatitude, required int metersLongitude}) Coordinates
Creates a new coordinates object with the given meters offset.
distance(Coordinates other, {bool ignoreAltitude = false}) double
Calculate the distance in meters between two WGS84 coordinates.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Resets coordinates to default values.
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(covariant Coordinates other) bool
The equality operator.
override