Crs class abstract

Object that defines coordinate reference systems for projecting geographical points into pixel (screen) coordinates and back (and to coordinates in other units for WMS services). See Coordinate Reference System.

The main objective of a CRS is to handle the conversion between surface points of objects of different dimensions. In our case 3D and 2D objects.

Implementers

Constructors

Crs()
const

Properties

code String
Crs code
no setter
hashCode int
The hash code for this object.
no setterinherited
infinite bool
If true, the coordinate space will be unbounded (infinite in both axes).
no setter
latBounds → Tuple2<double, double>?
Returns a Tuple2<double 1, double 2) where longitude has been wrapped according to the CRS's wrapLng properties, if they are outside the CRS's bounds.
no setter
lngBounds → Tuple2<double, double>?
Returns a Tuple2<double 1, double 2) where latitude has been wrapped according to the CRS's wrapLat properties, if they are outside the CRS's bounds.
no setter
projection Projection?
Crs projection
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transformation Transformation?
Crs transformation
no setter

Methods

distance(LatLng position, LatLng destination) double?
Returns the distance between two geographical coordinates.
getProjectedBounds(double? zoom) Bounds?
Returns the projection's bounds scaled and transformed for the provided zoom.
latlngToPoint(LatLng? position, double? zoom) UPoint
Projects latlng coordinates into pixel coordinates for a given zoom.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pointToLatLng(UPoint point, double? zoom) LatLng?
The inverse of latlngToPoint. Projects pixel coordinates on a given zoom into latlng coordinates.
project(LatLng? latlng) UPoint?
Projects geographical coordinates into coordinates in units accepted for this CRS (e.g. meters for EPSG:3857, for passing it to WMS services).
scale(double? zoom) double?
Returns the scale used when transforming projected coordinates into pixel coordinates for a particular zoom.
toString() String
A string representation of this object.
inherited
unproject(UPoint point) LatLng?
Given a projected coordinate returns the corresponding LatLng. The inverse of project.
wrapLatLng(LatLng latlng) LatLng
Returns a LatLng where lat and lng has been wrapped according to the CRS's wrapLat and wrapLng properties, if they are outside the CRS's bounds.
wrapLatLngBounds(LatLngBounds bounds) LatLngBounds
Returns a LatLngBounds with the same size as the given one, ensuring that its center is within the CRS's bounds.
zoom(double scale) double
Inverse of scale(), returns the zoom level corresponding to a scale factor of scale.

Operators

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