CrsSimple class

A simple CRS that maps longitude and latitude into x and y directly. May be used for maps of flat surfaces (e.g. game maps).

Note that the y axis should still be inverted (going from bottom to top). distance() returns simple euclidean distance.

Inheritance

Constructors

CrsSimple()
const

Properties

code String
Crs code
no setteroverride
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 setteroverride
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 setteroverride
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 setteroverride
projection Projection
Crs projection
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transformation Transformation
Crs transformation
no setteroverride

Methods

distance(LatLng position, LatLng destination) double
Returns the distance between two geographical coordinates.
override
getProjectedBounds(double? zoom) Bounds?
Returns the projection's bounds scaled and transformed for the provided zoom.
inherited
latlngToPoint(LatLng? position, double? zoom) UPoint
Projects latlng coordinates into pixel coordinates for a given zoom.
inherited
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.
inherited
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).
inherited
scale(double? zoom) double
Returns the scale used when transforming projected coordinates into pixel coordinates for a particular zoom.
override
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.
inherited
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.
inherited
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.
inherited
zoom(double scale) double
Inverse of scale(), returns the zoom level corresponding to a scale factor of scale.
override

Operators

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