latLngToPoint method

CustomPoint<num> latLngToPoint(
  1. LatLng latlng,
  2. double zoom
)

Converts a point on the sphere surface (with a certain zoom) in a map point.

Implementation

CustomPoint latLngToPoint(LatLng latlng, double zoom) {
  try {
    var projectedPoint = projection.project(latlng);
    var scale = this.scale(zoom);
    return transformation.transform(projectedPoint, scale.toDouble());
  } catch (e) {
    return CustomPoint(0.0, 0.0);
  }
}