inverse static method Null safety

List<double> inverse(
  1. String mgrs

Convert MGRS to lat/lon bounding box.

@param {string} mgrs MGRS string. @return {number,number,number,number} An array with left longitude), bottom (latitude), right (longitude) and top (latitude) values in WGS84, representing the bounding box for the provided MGRS reference.


static List<double> inverse(String mgrs) {
  var bbox = UTMtoLL(decode(mgrs.toUpperCase()));
  if (bbox is LonLat) {
    return [bbox.lon,, bbox.lon,];
  } else if (bbox is BBox) {
    return [bbox.left, bbox.bottom, bbox.right,];
  } else {
    throw Exception('Neither bbox, nor lonlat');