fromBytes static method
decodes the given bytes (.mvt
/.pbf
) to a VectorTile
Implementation
static VectorTile fromBytes({required Uint8List bytes}) {
final tile = raw.VectorTile.fromBuffer(bytes);
List<VectorTileLayer> layers = tile.layers.map((rawLayer) {
return VectorTileLayer.fromRaw(rawLayer: rawLayer);
}).toList(growable: false);
return VectorTile(layers: layers);
}