project method

  1. @override
CustomPoint<num> project(
  1. LatLng latlng
)
override

Implementation

@override
CustomPoint project(LatLng latlng) {
  const d = math.pi / 180;
  const max = maxLatitude;
  final lat = math.max(math.min(max, latlng.latitude), -max);
  final sin = math.sin(lat * d);

  return CustomPoint(
      r * latlng.longitude * d, r * math.log((1 + sin) / (1 - sin)) / 2);
}