latLngToPoint method

  1. @override
Point<double> latLngToPoint(
  1. LatLng latlng,
  2. double zoom
)
override

Similar to latLngToXY but converts the XY coordinates to a Point.

Implementation

@override
Point<double> latLngToPoint(LatLng latlng, double zoom) {
  final (x, y) = _transformation.transform(
    SphericalMercator.projectLng(latlng.longitude),
    SphericalMercator.projectLat(latlng.latitude),
    scale(zoom),
  );
  return Point<double>(x, y);
}