latLngToScreenPoint method

CustomPoint<double> latLngToScreenPoint(
  1. LatLng latLng
)

Implementation

CustomPoint<double> latLngToScreenPoint(LatLng latLng) {
  final nonRotatedPixelOrigin =
      (project(_center, zoom) - _nonrotatedSize / 2.0).round();

  var point = options.crs.latLngToPoint(latLng, zoom);

  final mapCenter = options.crs.latLngToPoint(center, zoom);

  if (rotation != 0.0) {
    point = rotatePoint(mapCenter, point, counterRotation: false);
  }

  return point - nonRotatedPixelOrigin;
}