Home > @magiclane/maps-sdk > MapDetails > getCountryFlag
MapDetails.getCountryFlag() method
Returns raw image bytes for the country flag by ISO 3166-1 alpha-3 code.
If the provided countryCode is invalid a default question-mark image may be returned by the platform implementation.
Signature:
static getCountryFlag(countryCode: string, size?: {
width: number;
height: number;
}, format?: ImageFileFormat, allowResize?: boolean): Uint8Array | undefined;Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
countryCode |
string |
ISO 3166-1 alpha-3 code of the country |
|
size |
{ width: number; height: number; } |
(Optional) Optional desired image size |
|
format |
ImageFileFormat |
(Optional) Optional image format |
|
allowResize |
boolean |
(Optional) |
size properties:
- width: number
- height: number
Returns:
Uint8Array | undefined
Raw image bytes for the flag, or undefined if unavailable