latLngForProjectedMeters function

LatLng latLngForProjectedMeters(
  1. ProjectedMeters meters
)

Converts meters in the Web Mercator projection to a coordinate.

See mln_lat_lng_for_projected_meters in the C API reference.

Implementation

LatLng latLngForProjectedMeters(ProjectedMeters meters) =>
    withNativeArena((arena) {
      ensureAbiVersion();
      final outCoordinate = arena<raw.mln_lat_lng>();
      _check(
        raw.mln_lat_lng_for_projected_meters(
          _writeProjectedMeters(meters, arena).ref,
          outCoordinate,
          nativeDiagnostic,
        ),
      );
      return _readLatLng(outCoordinate.ref);
    });