smallestRegion method

RegionFeature? smallestRegion(
  1. double lon,
  2. double lat
)

Returns the smallest feature of any kind containing the point, if any.

Implementation

RegionFeature? smallestRegion(double lon, double lat) {
  final region = whichPolygon(lon, lat);
  return region == null ? null : regionsByCode[region.id];
}