mbtiles 0.3.0 copy "mbtiles: ^0.3.0" to clipboard
mbtiles: ^0.3.0 copied to clipboard

Mapbox MBTiles v1.3 files, support for vector and raster tiles.

mbtiles #

Mapbox MBTiles v1.3 files, support for vector and raster tiles.

  • Supported raster tiles: jpg, png, webp
  • Supported vector tiles: pbf
  • Web is not supported because of its missing support for SQLite.

Pub Version likes Pub Points Pub Popularity

GitHub last commit stars GitHub issues codecov

Getting started #

pubspec.yaml

dependencies:
  # this package:
  mbtiles: ^0.3.0
  # coordinates will be returned as `LatLng`, include the following package 
  # if you want to work with them.
  latlong2: ^0.9.0
  # sqlite libraries in case not otherwise bundled (requires flutter):
  sqlite3_flutter_libs: ^0.5.18

Usage #

// Get paths for the current platform (Windows would need "\" instead of "/"). 
// This is not needed if you use `sqlite3_flutter_libs` on Android or iOS.
final sqlitePath = 'assets/${Platform.operatingSystem}/sqlite3';

// open mbtiles
final mbtiles = MBTiles(
  mbtilesPath: 'assets/mbtiles/countries-raster.mbtiles',
  sqlitePath: sqlitePath,
);

// get metadata
final metadata = mbtiles.getMetadata();
// get tile data
final tile = mbtiles.getTile(z: 0, x: 0, y: 0);

// close mbtiles
mbtiles.dispose();

See the example program for more information.

Additional information #

3
likes
0
pub points
82%
popularity

Publisher

verified publisherjoscha-eckert.de

Mapbox MBTiles v1.3 files, support for vector and raster tiles.

Repository (GitHub)
View/report issues

Topics

#mbtiles #map

License

unknown (LICENSE)

Dependencies

latlong2, meta, sqlite3

More

Packages that depend on mbtiles