getSubdomain method

String getSubdomain(
  1. Coords<num> coords,
  2. TileLayerOptions options
)

Get a subdomain value for a tile, based on it's coordinates and the current TileLayerOptions

Implementation

String getSubdomain(Coords coords, TileLayerOptions options) {
  if (options.subdomains.isEmpty) {
    return '';
  }
  final index = (coords.x + coords.y).round() % options.subdomains.length;
  return options.subdomains[index];
}