Function getImageUrl

The kind of image wanted, this is used at run-time to determine which url gets returned for overlapping members.

Used in combination with the kind param to also determine the kind of image wanted at compile-time.

  • Gets a direct image url from the provided ServerRegion.

    Type Parameters

    • T extends "region"

    Parameters

    Returns `https://raw.githubusercontent.com/ddnet/ddnet-web/master/www/countryflags/${string}.png`

  • Gets a direct image url from the provided Country.

    Type Parameters

    • T extends "country"

    Parameters

    • country: Country

      The country to get the image for.

    • kind: T

    Returns `https://raw.githubusercontent.com/ddnet/ddnet/master/data/countryflags/${string}.png`

  • Gets a direct image url from the provided Tile.

    Type Parameters

    • T extends "tile"

    Parameters

    • tile: Tile

      The tile to get the image for.

    • kind: T

    Returns `https://raw.githubusercontent.com/ddnet/ddnet-web/master/www/tiles/${string}.png`