Built-in coordinate projections (currently only between WGS84 and Web Mercator).
Here projected coordinates are metric coordinates with both x and y values
having the valid value range of (-20037508.34, 20037508.34).
🗺️ With proj4dart
Coordinate projections based on the external
proj4dart package requires
imports like:
Then a sample to use coordinate projections:
Please see the documentation of
proj4dart package about
it’s capabilities, and accuracy of forward and inverse projections.
🧩 Geometries and features
Geometry classes introduced in
simple geometries and feature objects
introduced in geospatial features have also
project method that allow applying projections directly on them.
It’s also possible to implement your own custom projections by extending
ProjectionAdapter mixin in your projection class. See
Dart code
of projections between WGS 84 (geographic) and Web Mercator (projected with
metric coordinates) as an example. Custom projections can be applied to geometry
and feature objects just like projections provided by packages discussed above.