getSubdomain method

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

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

Implementation

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