Home > @magiclane/maps-sdk > MapDetails > getCountryFlagByIndex
MapDetails.getCountryFlagByIndex() method
Returns the country flag image bytes for the specified country index.
Signature:
static getCountryFlagByIndex(index: number, size?: {
width: number;
height: number;
}, format?: ImageFileFormat, allowResize?: boolean): Uint8Array | undefined;Parameters
Parameter | Type | Description |
|---|---|---|
index | number | Internal country index |
size | { width: number; height: number; } | (Optional) Optional desired image size. If omitted the image's natural size is returned |
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