createFromContent static method
Creates a Mapfile instance from a byte array in memory.
This is useful for loading map files that are not stored on the local file
system, such as those downloaded from a network.
content is the byte content of the .map file.
preferredLanguage can be used to select a specific language for labels.
Implementation
///
/// This is useful for loading map files that are not stored on the local file
/// system, such as those downloaded from a network.
/// [content] is the byte content of the .map file.
/// [preferredLanguage] can be used to select a specific language for labels.
static Future<Mapfile> createFromContent({required Uint8List content, String? preferredLanguage}) async {
assert(content.isNotEmpty);
Mapfile mapFile = Mapfile._(preferredLanguage);
await mapFile._initContent(content);
return mapFile;
}