project method

  1. @override
Point project(
  1. double longitude,
  2. double latitude
)
override

Projects a geographic coordinate longitude, latitude to screen coordinates.

Implementation

@override
Point project(double longitude, double latitude) {
  final lambda = toRadians(longitude - centerLon);
  final phi = toRadians(latitude);

  final rho = math.sqrt(_c - 2 * _n * math.sin(phi)) / _n;
  final theta = _n * lambda;

  final x = rho * math.sin(theta);
  final y = _rho0 - rho * math.cos(theta);

  return applyTransform(x, -y);
}