convertHolyCoords method

LatLng? convertHolyCoords(
  1. Point point
)

Implementation

LatLng? convertHolyCoords(Point point) {
  var pointSrc = point;
  var projDst = Projection.get('EPSG:4326')!;

  // Find Projection by name or define it if not exists
  var projSrc = Projection.get('EPSG:2154') ??
      Projection.add(
        'EPSG:2154',
        '+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
      );

  var pointForward = projSrc.transform(projDst, pointSrc);

  return LatLng(
    pointForward.y,
    pointForward.x,
  );
}