local_mbtiles_server 0.1.0 copy "local_mbtiles_server: ^0.1.0" to clipboard
local_mbtiles_server: ^0.1.0 copied to clipboard

Serve SQLCipher-encrypted and plain MBTiles over localhost HTTP so any map SDK (MapLibre, Mapbox, etc.) can load offline tiles via standard URL templates.

0.1.0 #

Initial release.

Added #

  • MbtilesSource — open plain or SQLCipher-encrypted MBTiles via sqflite_sqlcipher; pass password for encrypted files (passphrase or raw-key x'…hex…' form).
  • LocalMbtilesServer — loopback HTTP tile server (127.0.0.1 by default) backed by shelf.
  • Tile serving — GET /{sourceId}/{z}/{x}/{y}[.{ext}] with web-map XYZ coordinates and TMS row conversion for MBTiles storage.
  • Supported formats — PNG, JPEG, WebP (raster); PBF/MVT (vector); Content-Type and optional Content-Encoding: gzip set automatically.
  • Multi-source registry — register, unregister, and serve several MBTiles files from one server.
  • MbtilesServerHealth and LocalMbtilesServer.health — server status, source count, port, and running state.
  • LocalMbtilesServer.getMetadata(sourceId) — MBTiles metadata by registered source id.
  • Public API — MbtilesServerConfig, RouteParser, TileFormat, MbtilesMetadata, TileCoordinates, and typed exceptions.
  • Example app — encrypted raster MBTiles demo with localhost fetch UI and a MapLibre preview screen (example/).

Notes #

  • Encrypted MBTiles are decrypted on demand per tile request (SQLite page level); the file stays encrypted on disk.
  • MbtilesSource resolves tile format at open; getMetadata() reads the metadata table on each call.
  • HTTP serves tiles only; health and metadata are available via the Dart API (health, getMetadata).
  • Requires Android or iOS for real MBTiles I/O (sqflite_sqlcipher native plugin).
  • Android apps loading http://127.0.0.1 tiles need android:usesCleartextTraffic="true".
3
likes
160
points
130
downloads

Documentation

API reference

Publisher

verified publishercodeclever.tech

Weekly Downloads

Serve SQLCipher-encrypted and plain MBTiles over localhost HTTP so any map SDK (MapLibre, Mapbox, etc.) can load offline tiles via standard URL templates.

Repository (GitHub)
View/report issues

Topics

#mbtiles #maps #offline #sqlcipher

License

BSD-3-Clause (license)

Dependencies

flutter, meta, shelf, sqflite_sqlcipher

More

Packages that depend on local_mbtiles_server