Flutter demo that opens a SQLCipher-encrypted raster MBTiles sample, serves tiles over localhost HTTP, and previews them as a MapLibre overlay.
| File | assets/fixtures/demo_raster.mbtiles (~56 KB) |
| Format | PNG overlay |
| Zooms | 12–15 |
| Bounds | San Francisco demo bbox (-122.45,37.75 → -122.40,37.80) |
| Password | demo-password (passphrase → MbtilesSource.open) |
| Source id | demo |
Synthetic colored tiles (not real map imagery). Outside the bbox or below zoom 12 you only see the MapLibre base style.
Regenerate:
bash example/tool/generate_demo_raster_mbtiles.shRequires the sqlcipher CLI (brew install sqlcipher on macOS).
cd example
flutter run- Tap Fetch status & metadata (copies the asset, opens it with the
passphrase, starts
LocalMbtilesServer). - Tap Show tile on map — zoom in on SF to see the overlay; zoom out or pan away to see the base map alone.
Cleartext localhost tile URLs need:
android:usesCleartextTraffic="true"(already set in this example’s AndroidManifest.xml).
- Demo pack uses a passphrase (
demoSqlCipherPassword). sqlCipherPasswordFromRawKeyBase64inlib/sqlcipher_password.dartshows how to turn a base64 raw key into the"x'…hex…'"form for other files.