-
Notifications
You must be signed in to change notification settings - Fork 38
Closed as not planned
Labels
bugSomething isn't workingSomething isn't working
Description
Package
vector_map_tiles_mbtiles
Bug Description
Now if you are using mvt/pbf exception thrown:
file is not a database (code 26)
SELECT * FROM metadata
Steps to Reproduce
Try to use mvt file from:
https://docs.mapbox.com/data/tilesets/guides/vector-tiles-introduction/
Expected Results
Works with mvt/pbf formats
Actual Results
Exception happened during provider creation
Code Sample
Future<MbTilesVectorTileProvider> _getProvider() async {
// this is public API key from mapbox provider
// https://docs.mapbox.com/data/tilesets/guides/vector-tiles-introduction/
final url =
'http://a.tiles.mapbox.com/v4/mapbox.mapbox-streets-v8/14/4823/6160.mvt?access_token=pk.eyJ1IjoieXNhbXBpciIsImEiOiJjbWFuemJrZDUwMW42MmlzaDBmNnM4cGZxIn0.9Wl3gVkm1IQQXgn6yny44Q';
final response = await http.get(Uri.parse(url));
final dir = await getApplicationCacheDirectory();
final file = File('${dir.path}/test.pbf')..writeAsBytesSync(response.bodyBytes);
final mbtiles = MbTiles(mbtilesPath: file.path, gzip: true);
return MbTilesVectorTileProvider(mbtiles: mbtiles);
}Platforms
all
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working